summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
Commit message (Collapse)AuthorAgeFilesLines
* mwifiex: optimize driver initialization codeAmitkumar Karwar2011-04-193-64/+33Star
| | | | | | | | | | | | 1) removal of unnecessary mwifiex_device structure 2) avoid passing adapter pointer to mwifiex_init_sw() 3) remove local variable drv_mode_info in mwifiex_add_card() 4) type change in mwifiex_bss_attr to match mwifiex_private 5) removal of more wordy comments Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: remove some macro definitionsAmitkumar Karwar2011-04-195-7/+4Star
| | | | | | | | use corresponding macros defined in include/linux/ieee80211.h Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: remove redundant local variables and commentsYogesh Ashok Powar2011-04-1913-277/+105Star
| | | | | | | | | | | Remove some local variables (mainly function return values) that are used only once. Also, one dummy function and some wordy comments are removed. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlegacy: use pci_dev->revisionSergei Shtylyov2011-04-191-1/+1
| | | | | | | | | | Commit be663ab67077fac8e23eb8e231a8c1c94cb32e54 (iwlwifi: split the drivers for agn and legacy devices 3945/4965) added code to read the 4965's revision ID from the PCI configuration register while it's already stored by PCI subsystem in the 'revision' field of 'struct pci_dev'... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_htc: Cleanup HTC debugfsRajkumar Manoharan2011-04-193-137/+27Star
| | | | | | | | | Move the ath9k_htc debugfs under ieee80211 to be inline with ath9k driver and it also helps to simplify debug code. Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Acked-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_htc: Add debugfs support to change debug maskRajkumar Manoharan2011-04-192-0/+50
| | | | | | Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Acked-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath: fix 0x6C for beaconing/passive scan flags based on country IELuis R. Rodriguez2011-04-191-0/+1
| | | | | | | | | | | | | | | The 0x6C regulatory domain is just like the 0x6A regulatory domain but differs in that 0x6C will allow adhoc and active scan on its channels only if we are associated to an AP with a country IE that allows those channels. The ath_reg_apply_beaconing_flags() does just this -- we respect the manufacturer's intent on only enabling beaconing modes of operation if and only if blessed by the country IE. Cc: David Quan <david.quan@atheros.com> Cc: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'wireless-next-2.6' of ↵John W. Linville2011-04-1919-265/+113Star
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6
| * iwlagn: remove led_opsWey-Yi Guy2011-04-181-4/+0Star
| | | | | | | | | | | | No longer use, remove it Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlagn: remove legacy opsWey-Yi Guy2011-04-181-10/+0Star
| | | | | | | | | | | | No longer used by _agn devices, remove it Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlagn: remove un-necessary ieee80211_opsWey-Yi Guy2011-04-187-37/+22Star
| | | | | | | | | | | | After driver split, no need to use ieee80211_ops, remove it Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlagn: no 5.2GHz/HT40 support for bgn devicesWey-Yi Guy2011-04-182-2/+2
| | | | | | | | | | | | For bgn devices, there were no HT40 channels value in EEPROM Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlagn: temperature should be measure for all _agn devicesWey-Yi Guy2011-04-187-47/+3Star
| | | | | | | | | | | | | | Thermal throttling functions are available for all _agn devices, call the functions directly. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlagn: always support uCode traceWey-Yi Guy2011-04-186-11/+1Star
| | | | | | | | | | | | All _agn devices support continuous uCode trace, remove checking Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlagn: use huge command for beaconJohannes Berg2011-04-181-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When testing some new P2P code, Angie found that the driver might crash because the beacon command ended up being bigger than a regular command. This is quite obvious -- a normal command is limited to roughly 360 bytes but a beacon may be much larger of course. To fix this, use the huge command buffer. Reported-by: Angie Chinchilla <angie.v.chinchilla@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlagn: verify that huge commands are synchronousJohannes Berg2011-04-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Since huge commands all share a single buffer, there can only be a single one in flight at a time since otherwise they'd overwrite each other. This is true in the driver now, but it seems like a possible source of bugs, so add a test to verify that huge commands are always sent synchronously. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlagn: remove most BUG_ON instancesJohannes Berg2011-04-187-27/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a number of things in the driver that may result in a BUG(), which is suboptimal since it's hard to get debugging information out of the driver in that case and the user experience is also not good :-) Almost all BUG_ON instances can be converted to WARN_ON with a few lines of appropriate error handling, so do that instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlagn: use direct call for led functionsWey-Yi Guy2011-04-1811-125/+27Star
| | | | | | | | | | | | After driver split, no need to call led functions through callback Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | ath: Add a missing world regulatory domain 0x6CSenthil Balasubramanian2011-04-142-3/+6
| | | | | | | | | | | | | | | | | | Some customers use 0x6C world regulatory domain and this patch adds the support. Cc: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | rtlwifi: Fix unitialized variable warningsLarry Finger2011-04-144-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In http://lkml.indiana.edu/hypermail/linux/kernel/1104.1/01955.html, Geerti Uytterhoeven reports the following warnings for the rtlwifi drivers. src/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c: warning: 'cck_index' may be used uninitialized in this function: => 637 src/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c: warning: 'cck_index_old' may be used uninitialized in this function: => 637 src/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c: warning: 'box_extreg' may be used uninitialized in this function: => 303 src/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c: warning: 'box_reg' may be used uninitialized in this function: => 303 src/drivers/net/wireless/rtlwifi/rtl8192ce/rf.c: warning: 'chnlgroup' may be used uninitialized in this function: => 205 src/drivers/net/wireless/rtlwifi/rtl8192ce/rf.c: warning: 'u4_regvalue' may be used uninitialized in this function: => 450 src/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c: warning: 'hq_sele' may be used uninitialized in this function: => 924 Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mwifiex: rename function mwifiex_is_ba_stream_availBing Zhao2011-04-142-3/+4
| | | | | | | | | | | | | | | | | | The old function name sounds like checking for existing BA stream. The function actually checks if we have room for creating new BA stream or not. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mwifiex: remove unused function parametersAmitkumar Karwar2011-04-1414-136/+80Star
| | | | | | | | | | | | | | | | | | Some function parameters become useless after previous cleanup changes. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mwifiex: remove redundant "return" at end of void functionYogesh Ashok Powar2011-04-1410-44/+1Star
| | | | | | | | | | | | | | | | | | The return statement at the last line of a void function is not necessary. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mwifiex: cleanup ioctl wait queue and abstraction layerAmitkumar Karwar2011-04-1419-1434/+502Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) remove mwifiex_alloc_fill_wait_queue() and mwifiex_request_ioctl() 2) avoid dynamic allocation of wait queue 3) remove unnecessary mwifiex_error_code macros that were used mainly by the wait queue status code 4) remove some abstraction functions 5) split mwifiex_prepare_cmd() to mwifiex_send_cmd_async() and mwifiex_send_sync() to handle asynchronous and synchronous commands respectively Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath5k: disable 5 GHz support for the dualband PHY chip on dual-radio AR5312Felix Fietkau2011-04-143-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two variants of AR5312 dual-band devices, one single-radio and the other one dual-radio. On the dual-radio board, the first MAC only supports 5 GHz, even though it has a dual-band PHY. The 2.4 GHz part of this phy is used in pass-through mode, connecting the second MAC with the second PHY. Disable 2.4 GHz for the first MAC on an AR5312, but only if the board configuration indicates a dual-radio device. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath5k: fix the EEPROM check for hw AES crypto supportFelix Fietkau2011-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | EEPROM version 5.0 adds a new field for disabling AES support, having an older version means that AES is present. This patch fixes hw AES crypto support on AR5312 boards, which have an older EEPROM version. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath5k: add a new bus op for reading the mac addressFelix Fietkau2011-04-145-31/+52
| | | | | | | | | | | | | | | | | | On AHB, the calibration data usually does not contain a valid MAC address, the correct MAC address is stored in the board config. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath: unshare struct ath_bus_ops between ath5k and ath9kFelix Fietkau2011-04-143-8/+15
| | | | | | | | | | | | | | | | | | This struct is not used in any common code, and moving it out of the ath header makes it easier to add more driver specific ops. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath5k: disable 5 GHz support if a 2.4 GHz radio is detectedFelix Fietkau2011-04-141-0/+3
| | | | | | | | | | | | | | | | | | On a dual-radio dual-band AR5312 device, the calibration data is shared between the 5 GHz and the 2.4 GHz radio/MAC. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Fix improper beacon slot selection in IBSSRajkumar Manoharan2011-04-141-1/+6
| | | | | | | | | | | | | | | | | | | | Request a re-configuration of Beacon related timers on the receipt of the first Beacon frame has to be set only for station mode. Setting beacon sync for IBSS is causing wrong beacon slot selection on beacon generation. Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: avoid using trinary operator w/ TX_STAT_INCJohn W. Linville2011-04-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, you get this: CC [M] drivers/net/wireless/ath/ath9k/hif_usb.o drivers/net/wireless/ath/ath9k/hif_usb.c: In function ‘ath9k_skb_queue_complete’: drivers/net/wireless/ath/ath9k/hif_usb.c:230:12: error: expected expression before ‘do’ make[2]: *** [drivers/net/wireless/ath/ath9k/hif_usb.o] Error 1 make[1]: *** [drivers/net/wireless/ath/ath9k] Error 2 make: *** [drivers/net/wireless/ath/] Error 2 The TX_STAT_INC macro should probably be changed to accomodate such usage, although using a trinary operator in place of an if-else seems questionable to me anyway. Signed-off-by: John W. Linville <linville@tuxdriver.com> Acked-by: Sujith Manoharan <Sujith.Manoharan@Atheros.com>
* | ath9k_htc: Enable AP and P2P modesSujith Manoharan2011-04-131-1/+4
| | | | | | | | | | Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Add detailed firmware statisticsSujith Manoharan2011-04-134-52/+195
| | | | | | | | | | | | | | | | | | | | | | New debugfs files: <debugfs_root>/ath9k_htc/<phy#>/tgt_int_stats <debugfs_root>/ath9k_htc/<phy#>/tgt_tx_stats <debugfs_root>/ath9k_htc/<phy#>/tgt_rx_stats Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Use helper routines for transmissionSujith Manoharan2011-04-131-100/+127
| | | | | | | | | | Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Use separate URB pool for management framesSujith Manoharan2011-04-132-9/+108
| | | | | | | | | | | | | | | | | | | | | | | | Beacon transmission needs to involve as little latency as possible after receiving a SWBA event from the target. Since packets are buffered to use TX stream mode, beacon frames sometimes gets queued up and are not sent out immediately. Fix this by decoupling management frame transmission from the normal data path and send them out immediately. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Add a timer to cleanup WMI eventsSujith Manoharan2011-04-136-3/+159
| | | | | | | | | | | | | | | | | | | | | | Occasionally, a WMI event would arrive ahead of the TX URB completion handler. Discarding these events would exhaust the available TX slots, so handle them by running a timer cleaning up such events. Also, timeout packets for which TX completion events have not arrived. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Add a debugfs file showing endpoint statusSujith Manoharan2011-04-132-0/+55
| | | | | | | | | | | | | | Location: ath9k_htc/phy#/queue Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Add a debugfs file to dump TX slot informationSujith Manoharan2011-04-132-0/+43
| | | | | | | | | | | | | | Location: ath9k_htc/phy#/slot Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Add support for TX completionSujith Manoharan2011-04-135-31/+207
| | | | | | | | | | | | | | | | Now that the infrastructure is in place, process WMI TX status events and complete packets. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Drain packets on station removalSujith Manoharan2011-04-136-0/+54
| | | | | | | | | | | | | | | | | | | | When a station entry is removed, there could still be pending packets destined for that station in the HIF layer. Sending these to the target is not necessary, so drain them in the driver itself. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Optimize HTC start/stop APISujith Manoharan2011-04-133-21/+6Star
| | | | | | | | | | | | | | | | | | There is no point in looping over all the endpoints, since the HIF layer uses the start/stop APIs only for the TX pipe. Simplify the API accordingly. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Drain pending TX frames properlySujith Manoharan2011-04-136-49/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When doing a channel set or a reset operation the pending frames queued up for transmission have to be flushed and sent to mac80211. Fixing this has to be done in two separate steps: * Flush queued frames and kill the URB TX completion handler. * Complete all the frames that in the TX pending queue. This patch adds proper support for draining and all the callsites namely, channel change/reset/idle/stop are fixed. A separate queue is used for handling failed frames. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Use helper functions for TX processingSujith Manoharan2011-04-131-64/+73
| | | | | | | | | | Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Add TX slotsSujith Manoharan2011-04-134-14/+73
| | | | | | | | | | | | | | | | | | | | Maintain a bitmap of slots for transmission and update the cookie field for every packet with the slot value. This value would be used for matching packets when TX completion processing is added. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Move endpoint header parsing to TX taskletSujith Manoharan2011-04-132-23/+46
| | | | | | | | | | | | | | | | | | There is no need to do endpoint header removal in the ISR. Also, this is needed when TX slot management is added later on. Use a helper function to strip the driver header. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Introduce new HTC APISujith Manoharan2011-04-136-30/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A new routine that takes an endpoint explicitly is introduced. The normal htc_send() now retrieves the endpoint from the packet's private data. This would be useful in TX completion when the endpoint ID would be required. While at it, use a helper function to map the queue to endpoint. Data/mgmt/beacon packets use htc_send(), while WMI comamnds pass the endpoint to HTC. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Fix TX queue managementSujith Manoharan2011-04-135-27/+52
| | | | | | | | | | | | | | | | | | | | | | Handle queue start/stop properly by maintaining a counter to check if the pending frame count has exceeded the threshold. Otherwise, packets would be dropped needlessly. While at it, use a simple flag to track queue status and use helper functions too. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Increase URB count for REG_IN pipeSujith Manoharan2011-04-132-42/+61
| | | | | | | | | | | | | | | | | | Using a single URB for receiving WMI events is insufficient, increase it to 64 to not lose WMI events in high throughput situations. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Add a new WMI event WMI_TXSTATUS_EVENTIDSujith Manoharan2011-04-131-0/+39
| | | | | | | | | | | | | | This event will be generated by the target for packet completions. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_htc: Sync MGMT/DATA packet headers with firmwareSujith Manoharan2011-04-131-2/+4
| | | | | | | | | | | | | | | | | | Add a new cookie field that would be filled by the host. This can be used to match the TX status WMI event with the appropriate packet. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>