mac80211 questions

hong zhang henryzhang62 at yahoo.com
Tue May 3 21:30:26 EDT 2011


If you want to associate to AP. You better use wpa_supplicant (wireless API).

--- On Thu, 4/28/11, Tchang Chen (ST-CO/ENG1.3) <Chen.Tchang at nl.bosch.com> wrote:

From: Tchang Chen (ST-CO/ENG1.3) <Chen.Tchang at nl.bosch.com>
Subject: RE: mac80211 questions
To: "hong zhang" <henryzhang62 at yahoo.com>
Cc: "libnl at lists.infradead.org" <libnl at lists.infradead.org>
Date: Thursday, April 28, 2011, 9:29 AM



 
Hello Hong,
 
Here is the whole action sequence (I added some extra print 
statements for debugging purposes).
 
lspci
00:00.0 Host bridge: Xilinx Corporation: 
Unknown device 0300 (rev 1a)
00:01.0 Multimedia audio controller: ALi 
Corporation M5451 PCI AC-Link Controller Audio Device (rev 02)
00:02.0 ISA 
bridge: ALi Corporation M1533/M1535/M1543 PCI to ISA Bridge [Aladdin 
IV/V/V+]
00:03.0 Modem: ALi Corporation M5457 AC'97 Modem 
Controller
00:09.0 PCI bridge: Texas Instruments PCI2250 PCI-to-PCI Bridge 
(rev 02)
00:0c.0 Non-VGA unclassified device: ALi Corporation M7101 Power 
Management Controller [PMU]
00:0f.0 USB Controller: ALi Corporation USB 1.1 
Controller (rev 03)
01:03.0 Network controller: Ralink corp. RT2561/RT61 rev 
B 802.11g
~ # modprobe rt2x00lib
~ # modprobe 
rt2x00pci
~ # modprobe rt61pci
rt61pci 0000:01:03.0: 
enabling device (0000 -> 0002)
rt61pci 0000:01:03.0: enabling bus 
mastering
rt61pci 0000:01:03.0: enabling Mem-Wr-Inval
phy0 -> 
rt61pci_validate_eeprom: EEPROM recovery - NIC: 0xff80
phy0 -> 
rt2x00_set_chip: Info - Chipset detected - rt: 2561, rf: 0003, rev: 
000c.
ieee80211 phy0: Selected rate control algorithm 
'minstrel_ht'
Registered led device: rt61pci-phy0::radio
Registered led 
device: rt61pci-phy0::assoc
~ # 
lsmod
rt61pci 26972 0 - Live 0xe00b7000
rt2x00pci 3706 1 
rt61pci, Live 0xe00a5000
rt2x00lib 32489 2 rt61pci,rt2x00pci, Live 
0xe0076000
~ # iwconfig wlan0 essid CTC
~ # 
iwconfig wlan0 channel 6
~ # iwconfig wlan0 enc off rate 12Mb/s
~ # 
iwconfig wlan0 ap 00:13:F7:44:21:74
~ # 
iwconfig
lo        no 
wireless extensions.
 
eth0      no wireless 
extensions.
 
wlan0     IEEE 802.11bg  
ESSID:"CTC"  
          
Mode:Managed  Frequency:2.437 GHz  Access Point: 
Not-Associated   

          Tx-Power=0 
dBm   
          
Retry  long limit:7   RTS thr:off   Fragment 
thr:off
          Encryption 
key:off
          Power 
Management:off
          

~ # ifconfig wlan0 192.168.2.11 
up
phy0 -> rt2x00lib_start: Info - Entering 
rt2x00lib_start ....
phy0 -> rt2x00lib_request_firmware: Info - Loading 
firmware file 'rt2561.bin'.
phy0 -> rt2x00lib_request_firmware: Info - 
Firmware detected - version: 0.8.
phy0 -> rt2x00lib_request_firmware: Info 
- Firmware checked - FW_OK
phy0 -> rt2x00lib_load_firmware: Info - 
Firmware loaded, retval = 0.
phy0 -> rt2x00lib_start: Info - Firmware has 
been loaded '0'.
phy0 -> rt2x00lib_start: Info - Device has been 
initialized '0'.
phy0 -> rt2x00lib_enable_radio: Info - Initializing all 
data queues ...
phy0 -> rt2x00queue_init_queues: Info - Resetting queue 
....
phy0 -> rt2x00queue_init_queues: Info - queue->limit = 24
phy0 
-> rt2x00queue_init_queues: Info - Resetting queue ....
phy0 -> 
rt2x00queue_init_queues: Info - queue->limit = 24
phy0 -> 
rt2x00queue_init_queues: Info - Resetting queue ....
phy0 -> 
rt2x00queue_init_queues: Info - queue->limit = 24
phy0 -> 
rt2x00queue_init_queues: Info - Resetting queue ....
phy0 -> 
rt2x00queue_init_queues: Info - queue->limit = 24
phy0 -> 
rt2x00queue_init_queues: Info - Resetting queue ....
phy0 -> 
rt2x00queue_init_queues: Info - queue->limit = 24
phy0 -> 
rt2x00queue_init_queues: Info - Resetting queue ....
phy0 -> 
rt2x00queue_init_queues: Info - queue->limit = 4
phy0 -> 
rt2x00lib_enable_radio: Info - All data queues have been initialized ...
phy0 
-> rt2x00lib_enable_radio: Info - Set device state to RADIO on, status = 
0.
phy0 -> rt2x00lib_enable_radio: Info - Setting state, led_radio and 
led_activity.
phy0 -> rt2x00lib_enable_radio: Info - Enabling RX 
....
phy0 -> rt2x00lib_enable_radio: Info - Starting watchdog 
monitoring...
phy0 -> rt2x00lib_enable_radio: Info - Waking the queues 
....
phy0 -> rt2x00lib_start: Info - Radio has been enabled 
'0'.
ieee80211 phy0: Idle on, Count= 0
ieee80211 phy0: device now 
idle
phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 0 - CWmin: 3, 
CWmax: 4, Aifs: 2, TXop: 102.
phy0 -> rt2x00mac_conf_tx: Info - Configured 
TX queue 1 - CWmin: 4, CWmax: 5, Aifs: 2, TXop: 188.
phy0 -> 
rt2x00mac_conf_tx: Info - Configured TX queue 2 - CWmin: 5, CWmax: 10, Aifs: 3, 
TXop: 0.
phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 3 - CWmin: 
5, CWmax: 10, Aifs: 7, TXop: 0.
ieee80211 phy0: device no longer idle - 
scanning
~ # ieee80211 phy0: Idle on, Count= 0
ieee80211 phy0: device now 
idle
ieee80211 phy0: Idle on, Count= 0
ieee80211 phy0: Idle on, Count= 
0
iwconfig
lo        
no wireless extensions.
 
eth0      no wireless 
extensions.
 
wlan0     IEEE 802.11bg  
ESSID:"CTC"  
          
Mode:Managed  Frequency:2.437 GHz  Access Point: 
Not-Associated   

          Tx-Power=20 
dBm   
          
Retry  long limit:7   RTS thr:off   Fragment 
thr:off
          Encryption 
key:off
          Power 
Management:off
          

~ # ifconfig wlan0 192.168.2.11 
down
ieee80211 phy0: Idle on, Count= 0
~ # 
~ # ifconfig wlan0 192.168.2.11 
up
phy0 -> rt2x00lib_start: Info - Entering 
rt2x00lib_start ....
phy0 -> rt2x00lib_load_firmware: Info - Firmware 
loaded, retval = 0.
phy0 -> rt2x00lib_start: Info - Firmware has been 
loaded '0'.
phy0 -> rt2x00lib_start: Info - Device has been initialized 
'0'.
phy0 -> rt2x00lib_enable_radio: Info - Initializing all data queues 
...
phy0 -> rt2x00queue_init_queues: Info - Resetting queue ....
phy0 
-> rt2x00queue_init_queues: Info - queue->limit = 24
phy0 -> 
rt2x00queue_init_queues: Info - Resetting queue ....
phy0 -> 
rt2x00queue_init_queues: Info - queue->limit = 24
phy0 -> 
rt2x00queue_init_queues: Info - Resetting queue ....
phy0 -> 
rt2x00queue_init_queues: Info - queue->limit = 24
phy0 -> 
rt2x00queue_init_queues: Info - Resetting queue ....
phy0 -> 
rt2x00queue_init_queues: Info - queue->limit = 24
phy0 -> 
rt2x00queue_init_queues: Info - Resetting queue ....
phy0 -> 
rt2x00queue_init_queues: Info - queue->limit = 24
phy0 -> 
rt2x00queue_init_queues: Info - Resetting queue ....
phy0 -> 
rt2x00queue_init_queues: Info - queue->limit = 4
phy0 -> 
rt2x00lib_enable_radio: Info - All data queues have been initialized 
...
 
<Here the program stalls in module rt2x00dev.c, 
function rx2x00lib_enable_radio
  at the point that the state is being set to 
STATE_RADIO_ON, see below ...>
  
/*
  * Initialize all data queues.
  
*/
 /* Added by C. Tchang */  
 INFO(rt2x00dev, 
"Initializing all data queues ...\n");
 /* End added */ 

 
 rt2x00queue_init_queues (rt2x00dev);
 
 /* 
Added by C. Tchang */  
 INFO(rt2x00dev, "All data queues have 
been initialized ...\n");
 /* End added */ 
 
 /*
  * Enable radio.
  */
 status 
=
     
rt2x00dev->ops->lib->set_device_state(rt2x00dev, 
STATE_RADIO_ON);
 
 /* Added by C. Tchang 
*/  
 INFO(rt2x00dev, "Set device state to RADIO on, status = 
%d.\n", status);
 /* End added */    

 
 if (status)
  return 
status;
 
---------------------------------------------------
Q1: What could be 
the reason for this behavior ?
 
I suppose there 
should be some acknowledge (or time-out) of the state 
transition.
Q2: How can I 
locate the respons of the Wireless card ? 
 
Q3: How can this be 
resolved ?
 
 
Thx (again) for your 
support,
 
Chen
 



From: hong zhang [mailto:henryzhang62 at yahoo.com] 

Sent: Thursday, April 28, 2011 4:05 AM
To: Tchang Chen 
(ST-CO/ENG1.3)
Cc: libnl at lists.infradead.org
Subject: RE: 
mac80211 questions




  
  
    Which command does association?
I do not see any 
      commands of both wireless extension and iw for scan, associate.

--- 
      On Wed, 4/27/11, Tchang Chen (ST-CO/ENG1.3) 
      <Chen.Tchang at nl.bosch.com> wrote:

      
From: 
        Tchang Chen (ST-CO/ENG1.3) <Chen.Tchang at nl.bosch.com>
Subject: 
        RE: mac80211 questions
To: "hong zhang" 
        <henryzhang62 at yahoo.com>
Cc: "libnl at lists.infradead.org" 
        <libnl at lists.infradead.org>
Date: Wednesday, April 27, 2011, 
        5:23 AM


        
        Hello Hong,
         
        Thanks for your reply to my libnl 
        questions.
        I currently use the old Wireless 
        Extensions to configure my link.
        I don't think using Wireless Extensions 
        (in stead of iw) is the problem, but more the 
        mac80211
        or even the link to the hardware 
        signals.
         
        After loading the modules (mac80211, 
        rt2x00lib, rt2x00pci and rt61pci) for a 
        Ralink RT2561 mini-PCI wireless card, I 
        tried to setup a wireless link
        (essid, channel, rate, end key 
        off, ap have been correctly set).
         
        I get the following 
        feedback:
         
        ~ # ifconfig wlan0 192.168.2.2 
        up
phy0 -> rt2x00lib_request_firmware: Info - Loading firmware 
        file 'rt2561.bin'.
phy0 -> rt2x00lib_request_firmware: Info - 
        Firmware detected - version: 0.8.
phy0 -> 
        rt2x00lib_request_firmware: Info - Firmware checked - FW_OK
phy0 
        -> rt2x00lib_load_firmware: Info - Firmware loaded, retval = 
        0.
phy0 -> rt2x00lib_start: Info - Device has been initialized 
        '0'.
phy0 -> rt2x00lib_start: Info - Radio has been enabled 
        '0'.
ieee80211 phy0: device now idle
phy0 -> rt2x00mac_conf_tx: 
        Info - Configured TX queue 0 - CWmin: 3, CWmax: 4, Aifs: 2, TXop: 
        102.
phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 1 - 
        CWmin: 4, CWmax: 5, Aifs: 2, TXop: 188.
phy0 -> rt2x00mac_conf_tx: 
        Info - Configured TX queue 2 - CWmin: 5, CWmax: 10, Aifs: 3, TXop: 
        0.
phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 3 - 
        CWmin: 5, CWmax: 10, Aifs: 7, TXop: 0.
ieee80211 phy0: device no longer idle - 
        scanning
ieee80211 phy0: device now 
        idle
         
        iwconfig
lo        no 
        wireless extensions.
         
        eth0      no 
        wireless extensions.
         
        wlan0     IEEE 
        802.11bg  
        ESSID:"CTC"
          
        Mode:Managed  Frequency:2.437 GHz  Access 
        Point: 
        Not-Associated
          
        Tx-Power=20 
        dBm
          
        Retry  long limit:7   RTS thr:off   Fragment 
        thr:off
          
        Encryption 
        key:off
          Power 
        Management:off
         
        The system did not manage to associate 
        with the AP.
         
        Q1: What can be the reason(s) for not 
        obtaining an association with the AP ?
         
        Q2:  Where can I find more detailed information about 
        the corresponding action sequences ?
         
        Q3: Which source files in mac80211 are 
        involved ?
               I 
        could not locate net/mac80211/ieee80211_sta.c in 
        2.6.37-4.
         
        Q4: Do you perhaps have any further 
        suggestions how to debug this issue ?
         
        Hope you can help me 
        again,
         
        Best regards,
         
        Chen
         

        
        
        From: hong zhang 
        [mailto:henryzhang62 at yahoo.com] 
Sent: Wednesday, April 27, 
        2011 3:10 AM
To: libnl at lists.infradead.org; Tchang Chen 
        (ST-CO/ENG1.3)
Subject: Re: Libnl 
        questions


        
        
          
          
            

--- On Tue, 4/26/11, Tchang Chen 
              (ST-CO/ENG1.3) <Chen.Tchang at nl.bosch.com> 
              wrote:

              
From: Tchang Chen 
                (ST-CO/ENG1.3) <Chen.Tchang at nl.bosch.com>
Subject: 
                Libnl questions
To: "libnl at lists.infradead.org" 
                <libnl at lists.infradead.org>
Date: Tuesday, April 26, 
                2011, 4:16 AM


                
                #yiv1734722961  .yiv1734722961EmailQuote {
PADDING-LEFT:4pt;MARGIN-LEFT:1pt;BORDER-LEFT:#800000 2px solid;}

                
                Hi,
                 
                I would like to use iw-0.9.22 in combination with cfg80211, 
                libnl and Linux kernel 2.6.37-4.
                I noticed that cfg80211 is part of the Linux kernel 
                distribution 2.6.37-4.
                 
                Q1: Can I use the latest libnl-3.0  in combination 
                with the software mentioned above ?
                      Or do I have to apply an 
                earlier version ? If so, which version will fit best 
                ?

ANS: Yes, you should be able to do it.

                 
                Q2: I understand that nl80211 and cfg80211 are intended to 
                replace Wireless-Extensions.
                      Do is the additional value 
                of nl80211 ? Will cfg80211 be sufficient for setup and 
                configuration ?
                
ANS: Yes, iw is degined to communicate with wireless 
                driver using nl80211/cfg80211 and wireless stack. 


                Q3: I suspect that libnl should be implemented as user 
                kernel module in kernel space.
                      Is this assumption correct 
                ?
                
 ANS: Actually, libnl is used for user space and 
                kernel space.


                Q4: Are there any other issues, which should be taken in 
                mind  for achieving a succesful implementation ?
                
ANS: You use it and tell us what you find 
                out.
 

                My hardware platform: 
                PetaLinux v2.1 (embedded Linux 2.6.37-4 for a MicroBlaze 
                softcore processor on a FPGA)
                

                Hope you can help me with these questions,
                 
                Thx and best regards,
                 
                Chen
                 
                 
                Chen C. Tchang
                BOSCH Security systems B.V.
                ST-CO/ENG1.3 Development
                Kapittelweg 10,
                4827 HG Breda
                The Netherlands
                 
                 
-----Inline Attachment 
                Follows-----


                _______________________________________________
libnl 
                mailing list
libnl at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/libnl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20110503/45ed0677/attachment-0001.html>


More information about the libnl mailing list