User Tools

Site Tools


en:users:drivers:wil6210

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:users:drivers:wil6210 [2015/11/15 07:58]
Vladimir Kondratiev
en:users:drivers:wil6210 [2015/11/15 14:34]
Vladimir Kondratiev
Line 1: Line 1:
  
 Go back –> [[en/​users/​Drivers/​Atheros|Atheros Linux wireless drivers]] ​ Go back –> [[en/​users/​Drivers/​Atheros|Atheros Linux wireless drivers]] ​
- 
-  
  
  
Line 21: Line 19:
  
 ===== Network features ===== ===== Network features =====
- 
 For the [[WiFi|WiFi]] connection, implemented is 802.11ad spec. Supported are channels 1..3 with corresponded frequencies 58320, 60480, 62640 MHz.  For the [[WiFi|WiFi]] connection, implemented is 802.11ad spec. Supported are channels 1..3 with corresponded frequencies 58320, 60480, 62640 MHz. 
  
Line 45: Line 42:
   * Basic support for 802.11ad merged into kernel 3.6    * Basic support for 802.11ad merged into kernel 3.6 
   * The driver merged into kernel 3.8.    * The driver merged into kernel 3.8. 
-  * Patches for hostapd/​wpa_supplicant ​submitted, some part is already ​merged.  +  * Patches ​for basic 11ad support ​for hostapd/​wpa_supplicant merged. ​
- +
- +
-==== iw commands supported ==== +
- +
-iw link: query link status. Report current MCS+
  
 ==== Sniffer ==== ==== Sniffer ====
- 
 To configure wil6210 in sniffer mode (assume $WLAN set to network interface name): ​ To configure wil6210 in sniffer mode (assume $WLAN set to network interface name): ​
- 
  
 <​code>#​ iw $WLAN set type monitor</​code>​ <​code>#​ iw $WLAN set type monitor</​code>​
-Due to hardware/​firmware deficiency, sniffer ​can capture either only control PHY (CP) or only data PHY (DP)To configure for desired PHY type doafter configuring ​for monitor ​mode:  +Sniffer ​can capture either only control PHY (CP) or all framesNote however, 
- +data sent at high MCS is hard to acquire by the antennas configured ​for quasi-omni ​mode.
-For CP: +
  
 +To configure for control PHY type do, after configuring for monitor mode: 
  
 <​code>#​ iw $WLAN set monitor control</​code>​ <​code>#​ iw $WLAN set monitor control</​code>​
-For DP:  
  
- 
-<​code>#​ iw $WLAN set monitor none</​code>​ 
 Finally, bring interface up:  Finally, bring interface up: 
- 
  
 <​code>#​ ifconfig $WLAN up</​code>​ <​code>#​ ifconfig $WLAN up</​code>​
Line 75: Line 61:
 ==== AP mode ==== ==== AP mode ====
  
-To start AP mode, use recent wpa_supplicant (assume relevant patches already merged). Sample config for non-secure mode:  +To start AP mode, use recent wpa_supplicant (assume relevant patches already merged). 
 +Sample config for non-secure mode: 
  
 <​code>​ap_scan=2 <​code>​ap_scan=2
Line 86: Line 72:
         key_mgmt=NONE         key_mgmt=NONE
 }</​code>​ }</​code>​
 +
 Sample config for secure mode. Note GCMP cipher: ​ Sample config for secure mode. Note GCMP cipher: ​
- 
  
 <​code>​ap_scan=2 <​code>​ap_scan=2
Line 104: Line 90:
 ===== For developer ===== ===== For developer =====
  
 +Information below is not necessary for operating driver, it is interesting 
 +only for those developing/​customizing driver, or experimenting with the 60GHz technology.
  
 ==== Module parameters ==== ==== Module parameters ====
Line 134: Line 121:
 ==== WMI commands ==== ==== WMI commands ====
  
-Control communication with the card is done through so called WMI commands and events. Target access to the mailbox within memory in BAR0 used. There are 2 similar mailbox structures: one for host->​card commands, and one for card->​host events. ​ +Control communication with the card is done through so called WMI commands and events. 
 +Target access to the mailbox within memory in BAR0 used. There are 2 similar mailbox structures: 
 +one for host->​card commands, and one for card->​host events. ​
  
 ==== Tx/Rx ==== ==== Tx/Rx ====
  
-DMA using '​vring'​ structures. Vring in consistent memory; hold descriptors that points to the data buffers. Card to write status back to the descriptor.  +DMA using '​vring'​ structures. Vring allocated ​in consistent memory; 
- +hold descriptors that points to the data buffers. Card to write status back to the descriptor. ​
-There is one Rx vring. Tx vrings - multiple, per DA*TID+
  
 +There is one Rx vring. Tx vrings - multiple, per DA*TID, AP also has broadcast Tx vring. ​
  
 ==== Firmware error recovery ==== ==== Firmware error recovery ====
  
 Should firmware crash, or in case of scan timeout, driver try to recover from error by resetting card. This works for **station** only. In the **AP** mode, driver will not perform recovery. It will, however, report error to the user space. There are 2 modes of firmware recovery, depending on the driver parameter **no_fw_recovery**: ​ Should firmware crash, or in case of scan timeout, driver try to recover from error by resetting card. This works for **station** only. In the **AP** mode, driver will not perform recovery. It will, however, report error to the user space. There are 2 modes of firmware recovery, depending on the driver parameter **no_fw_recovery**: ​
-    *                         * Automatic  +  ​* Automatic  
-    ​* ​                        ​* ​ * when **no_fw_recovery** not set (default), driver starts recovery attempt immediately. If firmware keeps crashing, driver will stop after 5 attempts performed within short time.  +  * when **no_fw_recovery** not set (default), driver starts recovery attempt immediately. If firmware keeps crashing, driver will stop after 5 attempts performed within short time.  
-                            *   Manual  +  * Manual  
-    ​* ​                        ​* ​   ​* when **no_fw_recovery** set (**Y** or **1**), driver will report firmware error to the user space and wait for command to continue. To query error state and continue with recovery, use **recovery** file on the driver'​s debugfs: read it  +  * when **no_fw_recovery** set (**Y** or **1**), driver will report firmware error to the user space and wait for command to continue. To query error state and continue with recovery, use **recovery** file on the driver'​s debugfs: read it  
-    ​* ​                        ​* ​    +
 <​code>​cat /​sys/​kernel/​debug/​ieee80211/​phy/​wil6210/​recovery</​code>​ <​code>​cat /​sys/​kernel/​debug/​ieee80211/​phy/​wil6210/​recovery</​code>​
 to query status, it will reads: ​ to query status, it will reads: ​
 <​code>​ mode = [auto|manual] state = [idle|pending|running]</​code>​ <​code>​ mode = [auto|manual] state = [idle|pending|running]</​code>​
 If **state** is //​pending//,​ it is time to collect all crash information as desired, and continue with recovery by writing **run** into **recovery**: ​ If **state** is //​pending//,​ it is time to collect all crash information as desired, and continue with recovery by writing **run** into **recovery**: ​
-    *                         ​* ​    * <​code>​echo -n "​run"​ > /​sys/​kernel/​debug/​ieee80211/​phy/​wil6210/​recovery</​code>​+  ​* <​code>​echo -n "​run"​ > /​sys/​kernel/​debug/​ieee80211/​phy/​wil6210/​recovery</​code>​
  
 ==== Debug facilities ==== ==== Debug facilities ====
Line 164: Line 152:
  
 Almost all messages printed to the dmesg, are "​dynamic debug" ones. See Documentation/​dynamic-debug-howto.txt for details. Module "​wil6210"​ uses format prefixes to identify message groups: ​ Almost all messages printed to the dmesg, are "​dynamic debug" ones. See Documentation/​dynamic-debug-howto.txt for details. Module "​wil6210"​ uses format prefixes to identify message groups: ​
-    *                         ​* ​      * "DBG[ IRQ]" for interrupt related messages. Prints every IRQ.  +   * "DBG[ IRQ]" for interrupt related messages. Prints every IRQ.  
-    ​* ​                        ​* ​      * "​DBG[TXRX]"​ for Tx/Rx path. Prints every Tx/Rx package.  +   ​* "​DBG[TXRX]"​ for Tx/Rx path. Prints every Tx/Rx package.  
-    ​* ​                        ​* ​      * "DBG[ WMI]" for WMI commands subsystem  +   ​* "DBG[ WMI]" for WMI commands subsystem  
-    ​* ​                        ​* ​      * "DBG[ FW ]" for FW download  +   ​* "DBG[ FW ]" for FW download  
-    ​* ​                        ​* ​      * "​DBG[MISC]"​ for various un-categorized cases Groups IRQ and TXRX are heavy traffic; enable only when required. Group WMI is relatively low traffic, it prints only WMI messages. It is good idea to enable all but IRQ and TXRX when debugging. ​+   ​* "​DBG[MISC]"​ for various un-categorized cases Groups IRQ and TXRX are heavy traffic; enable only when required. Group WMI is relatively low traffic, it prints only WMI messages. It is good idea to enable all but IRQ and TXRX when debugging. ​ 
 +   * "DBG[ IOC]" for IOCTL 
  
  
Line 176: Line 165:
  
 All wil6210 specific files placed under directory '​wil6210'​. Facilities provided: ​ All wil6210 specific files placed under directory '​wil6210'​. Facilities provided: ​
-    *                         ​* ​        * register access. All ICR (Interrupt Control Registers) groups represented as directories,​ with entries per register, allowing read/write. ITR (Interrupt Threshold Registers) represented as well.  +  ​* register access. All ICR (Interrupt Control Registers) groups represented as directories,​ with entries per register, allowing read/write. ITR (Interrupt Threshold Registers) represented as well.  
-    ​* ​                        ​* ​        * raw memory access. All memory sections represented as '​blob'​ files, providing read only access to the memory on card. Sections include:  +  * raw memory access. All memory sections represented as '​blob'​ files, providing read only access to the memory on card. Sections include:  
-<​code>​+-------------------------------+---------------+ +<​code>​+---------------------------------+---------------+ 
-| blob_xxx ​ | BAR0    | Size    | Comment ​      | +| blob_xxx ​   | BAR0    | Size    | Comment ​      | 
-| file name | offset ​ |         ​| ​              | +| file name   ​| offset ​ |         ​| ​              | 
-+-----------+---------+---------+---------------+ ++-------------+---------+---------+---------------+ 
-| rgf       ​|     0x0 |  0xa000 | Register file | +| rgf         ​|     0x0 |  0xa000 | Register file | 
-fw_code ​  | 0x40000 | 0x40000 | FW code       | +AGC_tbl ​    ​| ​ 0xa000 |  0x1000 | AGC table     | 
-| fw_data ​  ​| 0x80000 |  0x8000 | FW data       | +| rgf_ext ​    ​| ​ 0xb000 |  0x1000 | Ext. rgf      | 
-| fw_peri ​  ​| 0x88000 | 0x18000 | FW peripheral | +| mac_rgf_ext |  0xc000 |   ​0x200 | Mac Ext. rgf  | 
-| uc_code ​  ​| 0xa0000 | 0x10000 | Ucode code    | +| fw_code ​    | 0x40000 | 0x40000 | FW code       | 
-| uc_data ​  ​| 0xb0000 |  0x4000 | Ucode data    | +| fw_data ​    ​| 0x80000 |  0x8000 | FW data       | 
-+-----------+---------+---------+---------------+</​code>​+| fw_peri ​    ​| 0x88000 | 0x18000 | FW peripheral | 
 +| uc_code ​    ​| 0xa0000 | 0x10000 | Ucode code    | 
 +| uc_data ​    ​| 0xb0000 |  0x4000 | Ucode data    | 
 ++-------------+---------+---------+---------------+</​code>​ 
 Raw memory access used by firmware/​ucode trace extractor. See below. Also, raw memory dump may be obtained for later analysis. ​ Raw memory access used by firmware/​ucode trace extractor. See below. Also, raw memory dump may be obtained for later analysis. ​
-    *                         ​* ​          * DWORD memory read, as FW see it. Files '​mem_addr'​ and '​mem_val'​ provide access to the memory, using FW addresses (FW memory mapping is somewhat different from what host see in BAR0). Write address to the '​mem_addr',​ then read '​mem_val'​. It will reads like "​[0x%08x] = 0x%08x\n",​ addr, value  +  ​* DWORD memory read, as FW see it. Files '​mem_addr'​ and '​mem_val'​ provide access to the memory, using FW addresses (FW memory mapping is somewhat different from what host see in BAR0). Write address to the '​mem_addr',​ then read '​mem_val'​. It will reads like "​[0x%08x] = 0x%08x\n",​ addr, value  
-    ​* ​                        ​* ​          * mailbox for WMI commands events. File '​mbox'​ reads like: +  * mailbox for WMI commands events. File '​mbox'​ reads like: 
 <​code>​ring tx = { <​code>​ring tx = {
   base = 0x008802e8   base = 0x008802e8
Line 233: Line 226:
  
 Printed for each ring (all addresses in FW memory mapping): ​ Printed for each ring (all addresses in FW memory mapping): ​
-    *                         ​* ​            * base address of ring in card's memory  +  ​* base address of ring in card's memory  
-    ​* ​                        ​* ​            * ring size in bytes and entries  +  * ring size in bytes and entries  
-    ​* ​                        ​* ​            * tail and head pointers  +  * tail and head pointers  
-    ​* ​                        ​* ​            * max. entry size. It is fake for Rx - FW may allocate entry of arbitrary size  +  * max. entry size. It is fake for Rx - FW may allocate entry of arbitrary size  
-    ​* ​                        ​* ​            * mailbox entries, format for entry: ​+  * mailbox entries, format for entry: ​
 <​code> ​      /-- '​E'​ for empty entry, '​F'​ for full <​code> ​      /-- '​E'​ for empty entry, '​F'​ for full
        | /+-- '​t'​ for tail, '​h'​ for head        | /+-- '​t'​ for tail, '​h'​ for head
Line 261: Line 254:
  
 Information printed: ​ Information printed: ​
-    *                         ​* ​                * addresses, physical (pa) and virtual (va)  +  ​* addresses, physical (pa) and virtual (va)  
-    ​* ​                        ​* ​                * size, entries  +  * size, entries  
-    ​* ​                        ​* ​                * software head and tail pointers  +  * software head and tail pointers  
-    ​* ​                        ​* ​                * hardware tail, format: [fw addr] -> value  +  * hardware tail, format: [fw addr] -> value  
-    ​* ​                        ​* ​                * One letter per vring entry, '​H'​ for hardware owned and '​S'​ for software owned ones. +  * One letter per vring entry, '​H'​ for hardware owned and '​S'​ for software owned ones. 
 ===== Contributions to wil6210 ===== ===== Contributions to wil6210 =====
  
en/users/drivers/wil6210.txt · Last modified: 2015/11/15 14:34 by Vladimir Kondratiev