1 ================================================================================
4 (c) Copyright © 2003-2006, Marvell International Ltd.
7 This software file (the "File") is distributed by Marvell International
8 Ltd. under the terms of the GNU General Public License Version 2, June 1991
9 (the "License"). You may use, redistribute and/or modify this File in
10 accordance with the terms and conditions of the License, a copy of which
11 is available along with the File in the license.txt file or by writing to
12 the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
13 02111-1307 or on the worldwide web at http://www.gnu.org/licenses/gpl.txt.
15 THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
16 IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
17 ARE EXPRESSLY DISCLAIMED. The License provides additional details about
18 this warranty disclaimer.
19 ================================================================================
25 o. Copy the firmware image (e.g. usb8388.bin) to /lib/firmware/
27 o. Load driver by using the following command:
29 insmod usb8388.ko [fw_name=usb8388.bin]
36 This manual describes the usage of private commands used in Marvell WLAN
37 Linux Driver. All the commands available in Wlanconfig will not be available
41 iwpriv <ethX> <command> [sub-command] ...
44 iwpriv ethX scantype [sub-command]
45 iwpriv ethX getSNR <n>
47 iwpriv ethX getRSSI <n>
48 iwpriv ethX setrxant <n>
50 iwpriv ethX settxant <n>
52 iwpriv ethX authalgs <n>
53 iwpriv ethX pre-TBTT <n>
54 iwpriv ethX 8021xauthalgs <n>
55 iwpriv ethX encryptionmode <n>
56 iwpriv ethX setregioncode <n>
57 iwpriv ethX getregioncode
58 iwpriv ethX setbcnavg <n>
60 iwpriv ethX setdataavg <n>
61 iwpriv ethX setlisteninter <n>
62 iwpriv ethX getlisteninter
63 iwpriv ethX setmultipledtim <n>
64 iwpriv ethX getmultipledtim
65 iwpriv ethX atimwindow <n>
71 iwpriv ethX reasso-off
72 iwpriv ethX scanmode [sub-command]
73 iwpriv ethX setwpaie <n>
74 iwpriv ethX wlanidle-off
75 iwpriv ethX wlanidle-on
78 iwpriv ethX getadhocstatus
79 iwpriv ethX adhocgrate <n>
82 iwpriv ethX inactvityto <n>
83 iwpriv ethX sleeppd <n>
84 iwpriv ethX enable11d <n>
85 iwpriv ethX tpccfg <n>
86 iwpriv ethX powercfg <n>
87 iwpriv ethX setafc <n>
91 iwpriv ethX ledgpio <n>
92 iwpriv ethX scanprobes <n>
93 iwpriv ethX lolisteninter <n>
94 iwpriv ethX rateadapt <n> <m>
95 iwpriv ethX txcontrol <n>
96 iwpriv ethX psnullinterval <n>
97 iwpriv ethX prescan <n>
100 iwpriv ethX beaconinterval
103 The blinding table (BT) contains a list of mac addresses that should be
104 ignored by the firmware. It is primarily used for debugging and
105 testing networks. It can be edited and inspected with the following
109 iwpriv ethX bt_add <mac_address>
110 iwpriv ethX bt_del <mac_address>
111 iwpriv ethX bt_list <id>
114 The forwarding table (FWT) is a feature used to manage mesh network
115 routing in the firmware. The FWT is essentially a routing table that
116 associates a destination mac address (da) with a next hop receiver
117 address (ra). The FWT can be inspected and edited with the following
118 iwpriv commands, which are described in greater detail below.
119 Eventually, the table will be automatically maintained by a custom
122 NOTE: FWT commands replace the previous DFT commands. What were the DFT
123 commands?, you might ask. They were an earlier API to the firmware that
124 implemented a simple MAC-layer forwarding mechanism. In the unlikely
125 event that you were using these commands, you must migrate to the new
126 FWT commands which can be used to achieve the same functionality.
128 iwpriv ethX fwt_add [parameters]
129 iwpriv ethX fwt_del [parameters]
130 iwpriv ethX fwt_lookup [parameters]
131 iwpriv ethX fwt_list [parameters]
132 iwpriv ethX fwt_list_route [parameters]
133 iwpriv ethX fwt_list_neigh [parameters]
134 iwpriv ethX fwt_reset [parameters]
135 iwpriv ethX fwt_cleanup
140 The MESH commands are used to configure various features of the mesh
141 routing protocol. The following commands are supported:
143 iwpriv ethX mesh_get_ttl
144 iwpriv ethX mesh_set_ttl ttl
147 Those commands are used to send additional commands to the Marvell WLAN
148 card via the Linux device driver.
150 The ethX parameter specifies the network device that is to be used to
151 perform this command on. it could be eth0, eth1 etc.
154 This is used to get the current version of the driver and the firmware.
157 This command is used to set the scan type to be used by the driver in
158 the scan command. This setting will not be used while performing a scan
159 for a specific SSID, as it is always done with scan type being active.
161 where the sub-commands are: -
162 active -- to set the scan type to active
163 passive -- to set the scan type to passive
164 get -- to get the scan type set in the driver
167 This command gets the average and non average value of Signal to Noise
168 Ratio of Beacon and Data.
171 0 -- Beacon non-average.
173 2 -- Data non-average.
176 If no value is given, all four values are returned in the order mentioned
179 Note: This command is available only when STA is connected.
182 This command gets the average and non average value os Receive Signal
183 Strength of Beacon and Data.
186 0 -- Beacon non-average.
188 2 -- Data non-average.
191 Note: This command is available only when STA is connected.
194 This command gets the average and non average value of Noise Floor of
198 0 -- Beacon non-average.
200 2 -- Data non-average.
203 Note: This command is available only when STA is connected.
206 This command is used to set the mode for Rx antenna.
208 The options that can be sent are:-
214 iwpriv ethX setrxant 0x01: select Antenna 1.
217 This command is used to get the mode for Rx antenna.
221 This command is used to set the mode for Tx antenna.
222 The options that can be sent are:-
227 iwpriv ethX settxant 0x01: select Antenna 1.
230 This command is used to get the mode for Tx antenna.
233 This command is used by the WPA supplicant to set the authentication
234 algorithms in the station.
237 This command is used by the WPA supplicant to set the 8021.x authentication algorithm type
240 where values can be:-
249 This command is used by the WPA supplicant to set the encryption algorithm.
251 where values can be:-
259 This command is used to set pre-TBTT time period where value is in microseconds.
262 This command is used to set the region code in the station.
263 where value is 'region code' for various regions like
264 USA FCC, Canada IC, Spain, France, Europe ETSI, Japan ...
267 iwpriv ethX setregioncode 0x10: set region code to USA (0x10).
270 This command is used to get the region code information set in the
274 Set the weighting factor for calculating RSSI.
277 Get weighting factor for calculating RSSI.
280 Set the weighting factor for calculating SNR.
283 This command is used to set the listen interval in the
286 where the value ranges between 1 - 255
289 This command is used to get the listen interval value set in the
293 This command is used to set the multiple dtim value in the
295 where the value is 1,2,3,4,5,0xfffe
296 0xfffe means the firmware will use listen interval in association
297 command for waking up
300 This command is used to get the multiple dtim value set in the station.
303 This command is used to set the atim value in the
306 where the value ranges between 0 - 50
309 This command is used to send the de-authentication to the AP with which
310 the station is associated. This command is valid only when
311 station is in Infrastructure mode.
313 Note: This command is available only when STA is connected.
316 This command is used to stop beacon transmission from the station and
317 go into idle state in ad-hoc mode.
319 Note: This command is available only when STA is connected.
322 This command is used to turn on the RF antenna.
325 This command is sued to turn off the RF antenna.
328 This command is used to set the station to scan for either IBSS
329 networks or BSS networks or both BSS and IBSS networks. This
330 command can be used with sub commands,
333 bss -- Scan All the BSS networks.
334 ibss -- Scan All the IBSS networks.
335 any -- Scan both BSS and IBSS networks.
340 This command is used by WPA supplicant to send the WPA-IE to the driver.
343 This command is used to get into idle state.
345 Note: This command is available only when STA is connected.
348 This command is used to get off the idle state.
350 Note: This command is available only when STA is connected.
354 This command is used to get the 802.11 statistics available in the
357 Note: This command is available only when STA is connected.
360 This command is used to get the ad-hoc Network Status.
362 The various status codes are:
369 Note: This command is available only when STA is connected.
372 This command is used to enable(1) g_rate, Disable(0) g_rate
373 and request(2) the status which g_rate is disabled/enabled,
382 This command is used to set/get LEDs.
384 iwpriv ethX ledgpio <LEDs>
385 will set the corresponding LED for the GPIO Line.
388 will give u which LEDs are Enabled.
391 iwpriv eth1 ledgpio 1 0 2 1 3 4
398 shows LED information in the format as mentioned above.
400 Note: LED0 is invalid
401 Note: Maximum Number of LEDs are 16.
404 This command is used by the host to set/get the inactivity timeout value,
405 which specifies when WLAN device is put to sleep.
408 iwpriv ethX inactivityto [<timeout>]
410 where the parameter are:
411 timeout: timeout value in milliseconds.
414 iwpriv eth1 inactivityto
415 "get the timeout value"
417 iwpriv eth1 inactivityto X
418 "set timeout value to X ms"
422 This command is used to configure the sleep period of the WLAN device.
425 iwpriv ethX sleeppd [<sleep period>]
427 where the parameter are:
428 Period: sleep period in milliseconds. Range 10~60.
431 iwpriv eth1 sleeppd 10
432 "set period as 10 ms"
434 "get the sleep period configuration"
437 This command is used to control 11d
447 Enables or disables automatic transmit power control.
449 The first parameter turns this feature on (1) or off (0). When turning
450 on, the user must also supply four more parameters in the following
452 -UseSNR (Use SNR (in addition to PER) for TPC algorithm),
453 -P0 (P0 power level for TPC),
454 -P1 (P1 power level for TPC),
455 -P2 (P2 power level for TPC).
458 iwpriv ethX tpccfg: Get current configuration
459 iwpriv ethX tpccfg 0: disable auto TPC
460 iwpriv ethX tpccfg 0x01 0x00 0x05 0x0a 0x0d: enable auto TPC; do not use SNR;
461 P0=0x05; P1=0x0a; P2=0x0d;
462 iwpriv ethX tpccfg 0x01 0x01 0x05 0x0a 0x0d: enable auto TPC; use SNR;
463 P0=0x05; P1=0x0a; P2=0x0d.
466 Enables or disables power adaptation.
468 The first parameter turns this feature on (1) or off (0). When turning
469 on, the user must also supply three more parameters in the following
471 -P0 (P0 power level for Power Adaptation),
472 -P1 (P1 power level for Power Adaptation),
473 -P2 (P2 power level for Power Adaptation).
476 iwpriv ethX powercfg: Get current configuration
477 iwpriv ethX powercfg 0: disable power adaptation
478 iwpriv ethX powercfg 1 0x0d 0x0f 0x12: enable power adaptation;
479 P0=0x0d; P1=0x0f; P2=0x12.
482 This command returns automatic frequency control parameters. It returns
484 -P0: automatic is on (1), or off (0),
485 -P1: current timing offset in PPM (part per million), and
486 -P2: current frequency offset in PPM.
489 Set automatic frequency control options.
491 The first parameter turns automatic on (1) or off (0).
492 The user must supply two more parameters in either case, in the following
497 -P0 (automatic adjustment frequency threshold in PPM),
498 -P1 (automatic adjustment period in beacon period),
502 -P0 (manual adjustment timing offset in PPM), and
503 -P1 (manual adjustment frequency offset in PPM).
506 iwpriv ethX setafc 0 10 10: manual adjustment, both timing and frequcncy
509 iwpriv ethX setafc 1 10 10 enable afc, automatic adjustment,
510 frequency threshold 10 PPM, for every 10 beacon periods.
515 This command sets number of probe requests per channel.
518 iwpriv ethX scanprobes 3 (set scan probes to 3)
519 iwpriv ethX scanprobes (get scan probes)
522 This command sets the value of listen interval.
525 iwpriv ethX lolisteninter 234 (set the lolisteninter to 234)
526 iwpriv ethX lolisteninter (get the lolisteninter value)
529 This command sets the data rates bitmap.
531 0: Disable auto rate adapt
532 1: Enable auto rate adapt
553 iwpriv ethX rateadapt
554 read the currect data rate setting
555 iwpriv ethX rateadapt 1 0x07
556 enable auto data rate adapt and
557 data rates are 1Mbps, 2Mbsp and 5.5Mbps
561 This command is used to set the Tx rate, ack policy, and retry limit on a per packet basis.
565 bit[3:0] -- 0 1 2 3 4 5 6 7 8 9 10 11 12 13-16
566 Data Rate(Mbps) -- 1 2 5.5 11 Rsv 6 9 12 18 24 36 48 54 Rsv
569 if bit[12] == 1, bit[11:8] specifies the Tx retry limit.
571 bit[14:13] specifies per packet ack policy:
573 1 0 use immediate ack policy for this packet
574 1 1 use no ack policy for this packet
575 0 x use the per-packet ack policy setting
578 iwpriv ethX txcontrol 0x7513
579 Use no-ack policy, 5 retires for Tx, 11Mbps rate
584 This command is used to set/request NULL package interval for Power Save
585 under infrastructure mode.
589 n>0 -- Set interval as n (seconds)
592 This command is used to enable (1)/disable(0) auto prescan before assoicate to the ap
600 This command gets non average value of Signal to Noise Ratio of Data and rate index.
602 The following table shows RateIndex and Rate
621 This command gets current Tx rate index of the first packet associated with Rate Adaptation.
623 The following table shows RateIndex and Rate
642 This command is used to sets beacon interval in adhoc mode when an argument is given, and gets current adhoc
643 beacon interval when no argument is given. The valid beacon interval is between 20 - 1000,
644 default beacon interval is 100.
647 iwpriv ethX bcninterval 100 (set adhoc beacon interval to 100)
648 iwpriv ethX bcninterval (get adhoc beacon interval)
651 This command is used to insert an entry into the FWT table. The list of
652 parameters must follow the following structure:
654 iwpriv ethX fwt_add da ra [metric dir ssn dsn hopcount ttl expiration sleepmode snr]
656 The parameters between brackets are optional, but they must appear in
657 the order specified. For example, if you want to specify the metric,
658 you must also specify the dir, ssn, and dsn but you need not specify the
659 hopcount, expiration, sleepmode, or snr. Any unspecified parameters
660 will be assigned the defaults specified below.
662 The different parameters are:-
663 da -- DA MAC address in the form 00:11:22:33:44:55
664 ra -- RA MAC address in the form 00:11:22:33:44:55
665 metric -- route metric (cost: smaller-metric routes are
666 preferred, default is 0)
667 dir -- direction (1 for direct, 0 for reverse,
669 ssn -- Source Sequence Number (time at the RA for
670 reverse routes. Default is 0)
671 dsn -- Destination Sequence Number (time at the DA
672 for direct routes. Default is 0)
673 hopcount -- hop count (currently unused, default is 0)
674 ttl -- TTL (Only used in reverse entries)
675 expiration -- entry expiration (in ticks, where a tick is
676 1024us, or ~ 1ms. Use 0 for an indefinite
678 sleepmode -- RA's sleep mode (currently unused, default is
680 snr -- SNR in the link to RA (currently unused,
683 The command does not return anything.
686 This command is used to remove an entry to the FWT table. The list of
687 parameters must follow the following structure:
689 iwpriv ethX fwt_del da ra [dir]
691 where the different parameters are:-
692 da -- DA MAC address (in the form "00:11:22:33:44:55")
693 ra -- RA MAC address (in the form "00:11:22:33:44:55")
694 dir -- direction (1 for direct, 0 for reverse,
697 The command does not return anything.
700 This command is used to get the best route in the FWT table to a given
701 host. The only parameter is the MAC address of the host that is being
704 iwpriv ethX fwt_lookup da
707 da -- DA MAC address (in the form "00:11:22:33:44:55")
709 The command returns an output string identical to the one returned by
710 fwt_list described below.
714 This command is used to list a route from the FWT table. The only
715 parameter is the index into the table. If you want to list all the
716 routes in a table, start with index=0, and keep listing until you get a
717 "(null)" string. Note that the indicies may change as the fwt is
718 updated. It is expected that most users will not use fwt_list directly,
719 but that a utility similar to the traditional route command will be used
720 to invoke fwt_list over and over.
722 iwpriv ethX fwt_list index
724 The output is a string of the following form:
726 da ra metric dir ssn dsn hopcount ttl expiration sleepmode snr
728 where the different fields are:-
729 da -- DA MAC address (in the form "00:11:22:33:44:55")
730 ra -- RA MAC address (in the form "00:11:22:33:44:55")
731 metric -- route metric (cost: smaller-metric routes are preferred)
732 dir -- direction (1 for direct, 0 for reverse)
733 ssn -- Source Sequence Number (time at the RA for reverse routes)
734 dsn -- Destination Sequence Number (time at the DA for direct routes)
735 hopcount -- hop count (currently unused)
736 ttl -- TTL (only used in reverse entries)
737 expiration -- entry expiration (in ticks, where a tick is 1024us, or ~ 1ms. Use 0 for an indefinite entry)
738 sleepmode -- RA's sleep mode (currently unused)
739 snr -- SNR in the link to RA (currently unused)
742 This command is used to list a route from the FWT table. The only
743 parameter is the route ID. If you want to list all the routes in a
744 table, start with rid=0, and keep incrementing rid until you get a
745 "(null)" string. This function is similar to fwt_list. The only
746 difference is the output format. Also note that this command is meant
747 for debugging. It is expected that users will use fwt_lookup and
748 fwt_list. One important reason for this is that the route id may change
749 as the route table is altered.
751 iwpriv ethX fwt_list_route rid
753 The output is a string of the following form:
755 da metric dir nid ssn dsn hopcount ttl expiration
757 where the different fields are:-
758 da -- DA MAC address (in the form "00:11:22:33:44:55")
759 metric -- route metric (cost: smaller-metric routes are preferred)
760 dir -- direction (1 for direct, 0 for reverse)
761 nid -- Next-hop (neighbor) host ID (nid)
762 ssn -- Source Sequence Number (time at the RA for reverse routes)
763 dsn -- Destination Sequence Number (time at the DA for direct routes)
764 hopcount -- hop count (currently unused)
765 ttl -- TTL count (only used in reverse entries)
766 expiration -- entry expiration (in ticks, where a tick is 1024us, or ~ 1ms. Use 0 for an indefinite entry)
769 This command is used to list a neighbor from the FWT table. The only
770 parameter is the neighbor ID. If you want to list all the neighbors in a
771 table, start with nid=0, and keep incrementing nid until you get a
772 "(null)" string. Note that the nid from a fwt_list_route command can be
773 used as an input to this command. Also note that this command is meant
774 mostly for debugging. It is expected that users will use fwt_lookup.
775 One important reason for this is that the neighbor id may change as the
776 neighbor table is altered.
778 iwpriv ethX fwt_list_neigh nid
780 The output is a string of the following form:
782 ra sleepmode snr references
784 where the different fields are:-
785 ra -- RA MAC address (in the form "00:11:22:33:44:55")
786 sleepmode -- RA's sleep mode (currently unused)
787 snr -- SNR in the link to RA (currently unused)
788 references -- RA's reference counter
791 This command is used to reset the FWT table, getting rid of all the
792 entries. There are no input parameters.
794 iwpriv ethX fwt_reset
796 The command does not return anything.
799 This command is used to perform user-based garbage recollection. The
800 FWT table is checked, and all the entries that are expired or invalid
801 are cleaned. Note that this is exported to the driver for debugging
802 purposes, as garbage collection is also fired by the firmware when in
803 space problems. There are no input parameters.
805 iwpriv ethX fwt_cleanup
807 The command does returns the number of invalid/expired routes deleted.
810 This command returns a card's internal time representation. It is this
811 time that is used to represent the expiration times of FWT entries. The
812 number is not consistent from card to card; it is simply a timer count.
813 The fwt_time command is used to inspect the timer so that expiration
814 times reported by fwt_list can be properly interpreted.
820 The mesh ttl is the number of hops a mesh packet can traverse before it
821 is dropped. This parameter is used to prevent infinite loops in the
822 mesh network. The value returned by this function is the ttl assigned
823 to all mesh packets. Currently there is no way to control the ttl on a
824 per packet or per socket basis.
826 iwpriv ethX mesh_get_ttl
830 Set the ttl. The argument must be between 0 and 255.
832 iwpriv ethX mesh_set_ttl <ttl>
834 =========================
836 =========================
839 Use the -i option to retrieve version information from the driver.
843 version: COMM-USB8388-318.p4
844 firmware-version: 5.110.7
847 Use the -e option to read the EEPROM contents of the card.
850 ethtool -e ethX [raw on|off] [offset N] [length N]
852 -e retrieves and prints an EEPROM dump for the specified ethernet
853 device. When raw is enabled, then it dumps the raw EEPROM data
854 to stdout. The length and offset parameters allow dumping cer-
855 tain portions of the EEPROM. Default is to dump the entire EEP-
858 # ethtool -e eth0 offset 0 length 16
861 0x0000 38 33 30 58 00 00 34 f4 00 00 10 00 00 c4 17 00
863 ========================
865 ========================
867 those commands are used via debugfs interface
873 These commands are used to read the MAC, BBP and RF registers from the
874 card. These commands take one parameter that specifies the offset
875 location that is to be read. This parameter must be specified in
876 hexadecimal (its possible to preceed preceding the number with a "0x").
878 Path: /debugfs/libertas_wireless/ethX/registers/
881 echo "0xa123" > rdmac ; cat rdmac
882 echo "0xa123" > rdbbp ; cat rdbbp
883 echo "0xa123" > rdrf ; cat rdrf
887 These commands are used to write the MAC, BBP and RF registers in the
888 card. These commands take two parameters that specify the offset
889 location and the value that is to be written. This parameters must
890 be specified in hexadecimal (its possible to preceed the number
894 echo "0xa123 0xaa" > wrmac
895 echo "0xa123 0xaa" > wrbbp
896 echo "0xa123 0xaa" > wrrf
899 This command is used to set the sleepclock configurations
901 Path: /debugfs/libertas_wireless/ethX/
904 cat sleepparams: reads the current sleepclock configuration
906 echo "p1 p2 p3 p4 p5 p6" > sleepparams: writes the sleepclock configuration.
909 p1 is Sleep clock error in ppm (0-65535)
910 p2 is Wakeup offset in usec (0-65535)
911 p3 is Clock stabilization time in usec (0-65535)
912 p4 is Control periodic calibration (0-2)
913 p5 is Control the use of external sleep clock (0-2)
914 p6 is reserved for debug (0-65535)
918 The subscribed_events directory contains the interface for the
919 subscribed events API.
921 Path: /debugfs/libertas_wireless/ethX/subscribed_events/
923 Each event is represented by a filename. Each filename consists of the
924 following three fields:
925 Value Frequency Subscribed
927 To read the current values for a given event, do:
929 To set the current values, do:
930 echo "60 2 1" > event
932 Frequency field specifies the reporting frequency for this event.
933 If it is set to 0, then the event is reported only once, and then
934 automatically unsubscribed. If it is set to 1, then the event is
935 reported every time it occurs. If it is set to N, then the event is
936 reported every Nth time it occurs.
939 Value field specifies the number of consecutive missing beacons which
940 triggers the LINK_LOSS event. This event is generated only once after
941 which the firmware resets its state. At initialization, the LINK_LOSS
942 event is subscribed by default. The default value of MissedBeacons is
946 Value field specifies the consecutive failure count threshold which
947 triggers the generation of the MAX_FAIL event. Once this event is
948 generated, the consecutive failure count is reset to 0.
949 At initialization, the MAX_FAIL event is NOT subscribed by
953 This event is generated when the average received RSSI in beacons goes
954 above a threshold, specified by Value.
957 This event is generated when the average received RSSI in beacons goes
958 below a threshold, specified by Value.
961 This event is generated when the average received SNR in beacons goes
962 above a threshold, specified by Value.
965 This event is generated when the average received SNR in beacons goes
966 below a threshold, specified by Value.
969 This command is used to do a specific scan.
971 Path: /debugfs/libertas_wireless/ethX/
973 Usage: echo "SSID" > extscan
976 echo "LINKSYS-AP" > extscan
978 To see the results of use getscantable command.
982 Display the current contents of the driver scan table (ie. get the
985 Path: /debugfs/libertas_wireless/ethX/
991 Initiate a customized scan and retrieve the results
994 Path: /debugfs/libertas_wireless/ethX/
997 echo "[ARGS]" > setuserscan
1001 chan=[chan#][band][mode] where band is [a,b,g] and mode is
1002 blank for active or 'p' for passive
1003 bssid=xx:xx:xx:xx:xx:xx specify a BSSID filter for the scan
1004 ssid="[SSID]" specify a SSID filter for the scan
1005 keep=[0 or 1] keep the previous scan results (1), discard (0)
1006 dur=[scan time] time to scan for each channel in milliseconds
1007 probes=[#] number of probe requests to send on each chan
1008 type=[1,2,3] BSS type: 1 (Infra), 2(Adhoc), 3(Any)
1010 Any combination of the above arguments can be supplied on the command line.
1011 If the chan token is absent, a full channel scan will be completed by
1012 the driver. If the dur or probes tokens are absent, the driver default
1013 setting will be used. The bssid and ssid fields, if blank,
1014 will produce an unfiltered scan. The type field will default to 3 (Any)
1015 and the keep field will default to 0 (Discard).
1018 1) Perform an active scan on channels 1, 6, and 11 in the 'g' band:
1019 echo "chan=1g,6g,11g" > setuserscan
1021 2) Perform a passive scan on channel 11 for 20 ms:
1022 echo "chan=11gp dur=20" > setuserscan
1024 3) Perform an active scan on channels 1, 6, and 11; and a passive scan on
1025 channel 36 in the 'a' band:
1027 echo "chan=1g,6g,11g,36ap" > setuserscan
1029 4) Perform an active scan on channel 6 and 36 for a specific SSID:
1030 echo "chan=6g,36a ssid="TestAP"" > setuserscan
1032 5) Scan all available channels (B/G, A bands) for a specific BSSID, keep
1033 the current scan table intact, update existing or append new scan data:
1034 echo "bssid=00:50:43:20:12:82 keep=1" > setuserscan
1036 6) Scan channel 6, for all infrastructure networks, sending two probe
1037 requests. Keep the previous scan table intact. Update any duplicate
1038 BSSID/SSID matches with the new scan data:
1039 echo "chan=6g type=1 probes=2 keep=1" > setuserscan
1041 All entries in the scan table (not just the new scan data when keep=1)
1042 will be displayed upon completion by use of the getscantable ioctl.
1044 ==============================================================================