aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless
AgeCommit message (Collapse)AuthorFilesLines
2014-06-19ath9k: switch channel context for beaconingFelix Fietkau5-5/+126
Add a basic state machine for switch channel context for beacon transmission. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19ath9k: Summarize hw state per channel contextRajkumar Manoharan4-158/+184
Group and set hw state (opmode, primary_sta, beacon conf) per channel context instead of whole list of vifs. This would allow each channel context to run in different mode (STA/AP). Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19ath9k: Move beacon config to channel contextRajkumar Manoharan7-12/+12
Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19ath9k: save tsf in channel contextFelix Fietkau5-5/+37
Save TSF in channel context for multiple operating channels. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19ath9k: Add ATH_OP_MULTI_CHANNELFelix Fietkau2-0/+14
Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19ath9k: Move caldata into channel contextFelix Fietkau4-5/+5
Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19ath9k: Fetch appropriate operating channel contextRajkumar Manoharan3-24/+34
Retrieve appropriate operating channel context while switching between operating and off channels. Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19ath9k: Implement channel context opsFelix Fietkau4-12/+102
Add channel context operations (add, remove, change, assign and unassign) to enable support for multiple channels. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19ath9k: Implement remain-on-channal supportFelix Fietkau4-15/+124
Add remain on channel support in order to enable multi-channel concurrency. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19ath9k: Implement hw_scan supportFelix Fietkau6-2/+255
Implement hw_scan support for enabling multi-channel cuncurrency. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19ath9k: send powersave frame on channel switchFelix Fietkau3-0/+106
While leaving from or entering to active channel context, send out nullfunc frame to inform to the AP about the presence of station. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19ath9k: channel context based transmissionFelix Fietkau2-4/+23
Force queueing of all frames that belong to a virtual interface on a different channel context, to ensure that they are sent on the correct channel. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19ath9k: Add channel context worker threadFelix Fietkau8-21/+99
The channel context worker is used to switch to next requested channel context. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19ath9k: Move acq to channel contextFelix Fietkau4-28/+63
Add support to maintain per-channel ACs list. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19ath9k: Move txpower limit to channel contextFelix Fietkau5-12/+8
Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19ath9k: Add channel context structureFelix Fietkau7-103/+169
The channel context structure is defined to enable multi-channel concurrency support. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19rtlwifi: btcoexist: avoid format string in printkKees Cook1-1/+1
Since CL_PRINTF only ever takes a single argument, make sure a format string cannot leak into printk. Signed-off-by: Kees Cook <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19rsi_91x_sdio: add error handling into rsi_module_init()Alexey Khoroshilov1-2/+4
Fix rsi_module_init() to propagate sdio_register_driver() errors. Signed-off-by: Alexey Khoroshilov <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19rsi: Use module_usb_driverAlexey Khoroshilov1-27/+1
module_usb_driver eliminates the boilerplate and makes the code simpler, in addition to the fact currently rsi_module_init() ignores usb_deregister() error. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19mwifiex: wowlan: do not disconnect on suspendBing Zhao1-1/+1
For users who do not need wowlan, load mwifiex.ko with disconnect_on_suspend = 1; or iw phy0 wowlan disable. Signed-off-by: Bing Zhao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19mwifiex: support wowlan magic-packet encapsulated as UDP packetZhiyuan Yang1-0/+10
When magic-packet is generated as a UDP packet the offset should be 20+8 more bytes to cover IPv4 header and UDP header. So the total offset become 56. Add a new MEF entry to support both magic-packet patterns generated by different tools. Cc: Andreas Fenkart <[email protected]> Signed-off-by: Zhiyuan Yang <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Bing Zhao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19rt2x00: do not initialize BCN_OFFSET registersStanislaw Gruszka1-22/+0
We setup BCN_OFFSET{0,1} registers dynamically, don't have to initialize them. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19rt2x00: change order when stop beaconingStanislaw Gruszka1-6/+6
When no beaconing is needed, first stop beacon queue (disable beaconing globally) to avoid possible sending of not prepared beacon on short period after clearing beacon and before stop of BCN queue. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19rt2x00: change default MAC_BSSID_DW1_BSS_BCN_NUMStanislaw Gruszka1-1/+1
We setup MAC_BSSID_DW1_BSS_BCN_NUM dynamically when numbers of active beacons increase. Change default to 0 to tell hardware that we want to send only one beacon as default. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19rt2x00: change beaconing setup on RT2800Stanislaw Gruszka2-0/+46
As reported by Matthias, on 5572 chip, even if we clear up TXWI of corresponding beacon, hardware still try to send it or do other action that increase power consumption peak up to 1A. To avoid the issue, setup beaconing dynamically by configuring offsets of currently active beacons and MAC_BSSID_DW1_BSS_BCN_NUM variable, which limit number of beacons that hardware will try to send. Reported-by: Matthias Fend <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Helmut Schaa <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19rt2x00: change beaconing lockingStanislaw Gruszka3-25/+9
This patch is needed for further changes to keep global variables consistent when changing beaconing on diffrent vif's. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19mwifiex: Remove custom world regulatory domainMarkus Pargmann1-36/+0
A custom regulatory domain was introduced in this commit: cc0ba0d mwifiex: support custom world regulatory domain The commit description says that it was introduced because the world regulatory domain does not include channels 52-64 and 100-140. These channels are described in the world regulatory domain now, so we can drop this custom regulatory domain. Signed-off-by: Markus Pargmann <[email protected]> Acked-by: Bing Zhao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19net: wireless: rtlwifi: rtl8192de: phy.c: Cleaning up uninitialized variableRickard Strandqvist1-1/+2
There is a risk that the variables will be used without being initialized. Have also moved variable to the part of the code where it is used. This was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19net: wireless: rt2x00: rt2x00mac.c: Cleaning up uninitialized variablesRickard Strandqvist1-0/+2
There is a risk that the variable will be used without being initialized. This was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19net: wireless: libertas: cmd.c: Cleaning up uninitialized variablesRickard Strandqvist1-0/+1
There is a risk that the variable will be used without being initialized. This was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19b43: PHY: drop channel_type (we can get this info from chandef)Rafał Miłecki4-14/+8
Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19b43: PHY: drop is_40mhz (get width info from chandef)Rafał Miłecki4-35/+33
Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19b43: PHY: drop own channel_freq (get it from chandef when needed)Rafał Miłecki3-12/+15
Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19b43: store current channel using struct cfg80211_chan_defRafał Miłecki3-2/+9
Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19b43: b43_op_config: set channel info before switching bandRafał Miłecki2-2/+2
Band switching code needs to know what channel we switch to. Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19b43: PHY: don't force default channel during initRafał Miłecki1-4/+3
PHY may need to be re-initialized during runtime (e.g. on band switch). Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19b43: b43_op_config: use IEEE80211_CONF_CHANGE_CHANNELRafał Miłecki1-15/+16
This is tiny optimization and grouping band/channel ops. Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19b43: b43_op_config: drop check for core changeRafał Miłecki1-18/+2
There aren't devices with multiple 802.11 cores supported by b43. Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19b43: drop B43_DEFAULT_CHANNELRafał Miłecki2-7/+0
It was never used, b43_switch_channel is always called with hw_value (from mac80211) or whatever get_default_chan returns. Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19rtl818x_pci: fix possible RX descriptor invalid data readAndrea Merello1-0/+8
RX descriptor data must be read only if the descriptor has been fully updated by HW. There is a "ownership" flag in the descriptor itself to test this. The driver code contains a read for the "ownership" flag and, after it, other read access for descriptor data. This is in DMA coherent memory, that is _not_ guaranteed to be immune to instruction reordering, thus it is possible that the descriptor data is read _before_ the "ownership" flag. This can theoretically lead to a DMA/CPU race that may end up with the driver reading the data when it is still not valid, and the "ownership" bit just after enough time that the HW make the whole descriptor valid. The driver will in this case believe the data is valid, but it will use the invalid data read earlier. In order to avoid this, this patch adds a rmb() to force the "ownership" bit read to be issued before other descriptor data reads are attempted. Signed-off-by: Andrea Merello <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19rtl818x_pci: provide dBm signal information for rtl8185Andrea Merello1-4/+8
This patch makes the driver report signal information for rtl8185 boards using dBm instead of unspecified unit. Rtl8180 remains untouched. I did some tests to confirm the correctness of the measure performed by the board and it seems reasonably correct. The test setup has been made by connecting an AP with coax and RF attenuators to the card antenna port. In order to get a reference measure I tried with several cards with different chipset I own. I found that many gave different results, and I finally selected two cards that gave me consistent results to use as reference: AR9271 and Prism54-usb (isl3887 with Frisbee radio). Using this references I compared the RSSI information with my rtl8185 and I repeated tests with three different attenuation values, increasing attenuation by 10dB each step. I made only relative measures, making NO assumption about source power. CCK measures seem very close to my references, OFDM are a little bit less precise but, considering that these cards are not measuring instrumentation, IMHO this is still fairly good. CCK measures (1Mbps beacons) ATTENUATOR 1 p54usb: -58dBm ath9k_htc: -59dBm rtl8185: -59dBm ATTENUATOR 2 p54usb: -67dBm ath9k_htc: -68dBm rtl8185: -70dBm ATTENUATOR 3 p54usb: -78dBm ath9k_htc: -79dBm rtl8185: -79dBm OFDM measures (54Mbps ping) ATTENUATOR 1 p54usb: -58dBm ath9k_htc: -57dBm rtl8185: -62dBm ATTENUATOR 2 p54usb: -68dBm rtl8185: -71dBm Signed-off-by: Andrea Merello <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19rtl818x_pci: make RSSI code more readableAndrea Merello1-5/+8
remove the if-else chains and use switch-case to make code more readable and avoiding long lines that broke in several lines Signed-off-by: Andrea Merello <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19cw1200: Remove useless return variablesPeter Senna Tschudin1-2/+1
This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // <smpl> @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret when strict return - ret + C ; // </smpl> Signed-off-by: Peter Senna Tschudin <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-19net: wireless: Remove useless return variablesPeter Senna Tschudin2-17/+7
This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. wl_cfg80211.c verified by compilation only. phy/phy_cmn.c unverified. The coccinelle script that find and fixes this issue is: // <smpl> @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret when strict return - ret + C ; // </smpl> Signed-off-by: Peter Senna Tschudin <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-17rt2x00: fix rfkill regression on rt2500pciStanislaw Gruszka3-4/+28
As reported by Niels, starting rfkill polling during device probe (commit e2bc7c5, generally sane change) broke rfkill on rt2500pci device. I considered that bug as some initalization issue, which should be fixed on rt2500pci specific code. But after several attempts (see bug report for details) we fail to find working solution. Hence I decided to revert to old behaviour on rt2500pci to fix regression. Additionally patch also unregister rfkill on device remove instead of ifconfig down, what was another issue introduced by bad commit. Bug report: https://bugzilla.kernel.org/show_bug.cgi?id=73821 Fixes: e2bc7c5f3cb8 ("rt2x00: Fix rfkill_polling register function.") Cc: [email protected] Bisected-by: Niels <[email protected]> Reported-and-tested-by: Niels <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-17b43: fix frequency reported on G-PHY with /new/ firmwareRafał Miłecki1-3/+7
Support for firmware rev 508+ was added years ago, but we never noticed it reports channel in a different way for G-PHY devices. Instead of offset from 2400 MHz it simply passes channel id (AKA hw_value). So far it was (most probably) affecting monitor mode users only, but the following recent commit made it noticeable for quite everybody: commit 3afc2167f60a327a2c1e1e2600ef209a3c2b75b7 Author: Emmanuel Grumbach <[email protected]> Date: Tue Mar 4 16:50:13 2014 +0200 cfg80211/mac80211: ignore signal if the frame was heard on wrong channel Reported-by: Aaro Koskinen <[email protected]> Signed-off-by: Rafał Miłecki <[email protected]> Cc: [email protected] Tested-by: Aaro Koskinen <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-17rt2800usb:fix hang during firmware loadMichael Braun1-2/+7
The device 057c:8501 (AVM Fritz! WLAN v2 rev. B) boots into a state that does not actually require loading a firmware file. The vendors driver finds out about this by checking a firmware state register, so this patch adds this here. Finally, with this patch applied, my wifi dongle actually becomes useful (scan + connect to wpa network works). Signed-off-by: Michael Braun <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-17rt2800usb:fix efuse detectionMichael Braun2-1/+30
The device 057c:8501 (AVM Fritz! WLAN v2 rev. B) currently does not load. One thing observed is that the vendors driver detects EFUSE mode for this device, but rt2800usb does not. This is due to rt2800usb lacking a check for the firmware mode present in the vendors driver, that this patch adopts for rt2800usb. With this patch applied, the 'RF chipset' detection does no longer fail. Signed-off-by: Michael Braun <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-16b43: fix typo in Kconfig (make B43_BUSES_BCMA_AND_SSB the default for real)Rafał Miłecki1-1/+1
Reported-by: Paul Bolle <[email protected]> Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-06-16rt2x00: disable TKIP on USBStanislaw Gruszka1-0/+2
On USB we can not get atomically TKIP key. We have to disable support for TKIP acceleration on USB hardware to avoid bug as showed bellow. [ 860.827243] BUG: scheduling while atomic: hostapd/3397/0x00000002 <snip> [ 860.827280] Call Trace: [ 860.827282] [<ffffffff81682ea6>] dump_stack+0x4d/0x66 [ 860.827284] [<ffffffff8167eb9b>] __schedule_bug+0x47/0x55 [ 860.827285] [<ffffffff81685bb3>] __schedule+0x733/0x7b0 [ 860.827287] [<ffffffff81685c59>] schedule+0x29/0x70 [ 860.827289] [<ffffffff81684f8a>] schedule_timeout+0x15a/0x2b0 [ 860.827291] [<ffffffff8105ac50>] ? ftrace_raw_event_tick_stop+0xc0/0xc0 [ 860.827294] [<ffffffff810c13c2>] ? __module_text_address+0x12/0x70 [ 860.827296] [<ffffffff81686823>] wait_for_completion_timeout+0xb3/0x140 [ 860.827298] [<ffffffff81080fc0>] ? wake_up_state+0x20/0x20 [ 860.827301] [<ffffffff814d5b3d>] usb_start_wait_urb+0x7d/0x150 [ 860.827303] [<ffffffff814d5cd5>] usb_control_msg+0xc5/0x110 [ 860.827305] [<ffffffffa02fb0c6>] rt2x00usb_vendor_request+0xc6/0x160 [rt2x00usb] [ 860.827307] [<ffffffffa02fb215>] rt2x00usb_vendor_req_buff_lock+0x75/0x150 [rt2x00usb] [ 860.827309] [<ffffffffa02fb393>] rt2x00usb_vendor_request_buff+0xa3/0xe0 [rt2x00usb] [ 860.827311] [<ffffffffa023d1a3>] rt2x00usb_register_multiread+0x33/0x40 [rt2800usb] [ 860.827314] [<ffffffffa05805f9>] rt2800_get_tkip_seq+0x39/0x50 [rt2800lib] [ 860.827321] [<ffffffffa0480f88>] ieee80211_get_key+0x218/0x2a0 [mac80211] [ 860.827322] [<ffffffff815cc68c>] ? __nlmsg_put+0x6c/0x80 [ 860.827329] [<ffffffffa051b02e>] nl80211_get_key+0x22e/0x360 [cfg80211] Cc: [email protected] Reported-and-tested-by: Peter Wu <[email protected]> Reported-and-tested-by: Pontus Fuchs <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>