aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath
AgeCommit message (Collapse)AuthorFilesLines
2013-09-03drivers/net: Convert uses of compare_ether_addr to ether_addr_equalJoe Perches1-2/+2
Use the new bool function ether_addr_equal to add some clarity and reduce the likelihood for misuse of compare_ether_addr for sorting. Done via cocci script: (and a little typing) $ cat compare_ether_addr.cocci @@ expression a,b; @@ - !compare_ether_addr(a, b) + ether_addr_equal(a, b) @@ expression a,b; @@ - compare_ether_addr(a, b) + !ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) == 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) != 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) == 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) != 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !!ether_addr_equal(a, b) + ether_addr_equal(a, b) Signed-off-by: Joe Perches <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-28ath9k: Enable D3/L1 ASPM fix for AR9462Sujith Manoharan1-6/+5
AR9462 requires this HW fix for ASPM to work properly. Also, since WARegVal is used only for the AR8003 family, use AR_SREV_9300_20_OR_LATER. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-28ath9k: Remove unused ANI commandsSujith Manoharan5-18/+4
Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-28Merge branch 'for-john' of ↵John W. Linville2-5/+4
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2013-08-28ath9k: ar9003_eeprom.c:3618 fix variable name typoJohn W. Linville1-2/+2
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c: In function 'ar9003_hw_ant_ctrl_apply': >> drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3618: warning: 'regval' is used uninitialized in this function It seems obvious that 'regval' should have been 'value'... Reported-by: Fengguang Wu <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-28Merge branch 'master' of ↵John W. Linville4-4/+15
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/iwlwifi/pcie/trans.c net/mac80211/ibss.c
2013-08-26ath9k: Fix DEBUG_FS dependency for ath9kSujith Manoharan1-1/+1
Reported-by: Johannes Berg <[email protected]> Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-26ath9k: Fix TX poll work lockingSujith Manoharan1-1/+1
There is no need to call ath_txq_unlock_complete() in the TX poll routine - frame completion is not done here, so use ath_txq_unlock(). Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-26ath9k: Fix ASPM workaround usageSujith Manoharan6-25/+64
The PCIE Workaround register (AR_WA/0x4004) is used to handle various hardware quirks. For AR9002 chips, AR_WA_D3_L1_DISABLE is used to prevent the HW from automatically entering L1 state when D3 is enforced. AR_WA_D3_L1_DISABLE has to be enabled for a few AR9280 based cards, mark them based on their PCI subdevice/subvendor IDs and enforce it in ar9002_hw_configpcipowersave(). Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-26ath5k: debugfs: NULL-terminate stringsDjalal Harouni1-6/+18
Avoid processing garbage data by NULL terminating the strings. Signed-off-by: Djalal Harouni <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-26ath9k: Fix ASPM for AR9462Sujith Manoharan3-0/+31
If the L1 entrance latency is not calibrated properly in the EEPROM in WB222 boards, there could be problems in connectivity. Check and correct the calibrated value if it doesn't match the optimal value for WB222, 4us. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-23cfg80211: add flags to cfg80211_rx_mgmt()Vladimir Kondratiev2-5/+4
Add flags intended to report various auxiliary information and introduce the NL80211_RXMGMT_FLAG_ANSWERED flag to report that the frame was already answered by the device. Signed-off-by: Vladimir Kondratiev <[email protected]> [REPLIED->ANSWERED, reword commit message] Signed-off-by: Johannes Berg <[email protected]>
2013-08-22ath9k: Add one more PCI ID for CUS198Sujith Manoharan1-0/+5
This is a AR9485/WB225 based card. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22ath9k: Add antenna diversity tweak for CUS198Sujith Manoharan4-0/+9
This improves RX diversity and performance for AR9485. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22ath9k: Add support for AR9485 1.2Sujith Manoharan3-13/+13
Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22ath9k: Enable PLL fix only for AR9340/AR9330Sujith Manoharan1-2/+1
The PLL hang workaround is required only for AR9330 and AR9340. This issue was first observed on an AP121 and the WAR is enabled for AR9340 also (DB120 etc.), since it uses a PLL design identical to AR9330. This is not required for AR9485 and AR9550. Various bugs have been reported regarding this: https://bugzilla.redhat.com/show_bug.cgi?id=997217 https://bugzilla.redhat.com/show_bug.cgi?id=994648 Cc: [email protected] Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22ath9k_htc: Restore skb headroom when returning skb to mac80211Helmut Schaa1-0/+10
ath9k_htc adds padding between the 802.11 header and the payload during TX by moving the header. When handing the frame back to mac80211 for TX status handling the header is not moved back into its original position. This can result in a too small skb headroom when entering ath9k_htc again (due to a soft retransmission for example) causing an skb_under_panic oops. Fix this by moving the 802.11 header back into its original position before returning the frame to mac80211 as other drivers like rt2x00 or ath5k do. Reported-by: Marc Kleine-Budde <[email protected]> Signed-off-by: Helmut Schaa <[email protected]> Tested-by: Marc Kleine-Budde <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]> Cc: [email protected] Signed-off-by: John W. Linville <[email protected]>
2013-08-22Merge branch 'for-john' of ↵John W. Linville2-2/+4
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
2013-08-21mac80211: add a flag to indicate CCK support for HT clientsFelix Fietkau2-2/+4
brcm80211 cannot handle sending frames with CCK rates as part of an A-MPDU session. Other drivers may have issues too. Set the flag in all drivers that have been tested with CCK rates. This fixes a reported brcmsmac regression introduced in commit ef47a5e4f1aaf1d0e2e6875e34b2c9595897bef6 "mac80211/minstrel_ht: fix cck rate sampling" Cc: [email protected] # 3.10 Reported-by: Tom Gundersen <[email protected]> Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-08-16Merge branch 'for-john' of ↵John W. Linville2-3/+7
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2013-08-16ath9k: enable CSA functionality in ath9kSimon Wunderlich5-0/+43
CSA is only enabled for one interface, but the same limitation applies for mac80211 too. It checks whether the beacon has been sent (different approaches for non-EDMA-enabled and EDMA-enabled devices), and completes the channel switch after that. Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Mathias Kretschmer <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-16ath5k: enable support for 5 MHz and 10 MHz channelsSimon Wunderlich4-5/+25
Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Mathias Kretschmer <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-16ath5k: set 5/10 MHz supported channels and fix durationSimon Wunderlich3-9/+42
Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Mathias Kretschmer <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-16ath5k: report 5/10 MHz channelsSimon Wunderlich1-0/+10
Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Mathias Kretschmer <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-16ath9k: announce that ath9k supports 5/10 MHzSimon Wunderlich1-0/+1
Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Mathias Kretschmer <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-16ath9k: set 5/10 MHz supported channels and fix bitrateSimon Wunderlich2-8/+21
Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Mathias Kretschmer <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-16ath9k: report 5/10 MHz channelsSimon Wunderlich1-0/+11
Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Mathias Kretschmer <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-16ath9k: use chandef instead of channel_typeSimon Wunderlich6-40/+51
To enable support for 5/10 MHz, some internal functions must be converted from using the (old) channel_type to chandef. This is a good chance to change all remaining occurences. Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Mathias Kretschmer <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-16ath9k: always use SIFS times from OFDM for 5/10 MHzSimon Wunderlich1-3/+2
5/10 MHz channels should always use SIFS times as defined in IEEE 802.11-2012 18.4.4 (OFDM PHY characteristics). This makes it compatible to ath5k, which does the same. Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Mathias Kretschmer <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Use lockless variant to initialize RX fifoSujith Manoharan1-1/+1
Since the rx_fifo queue is accessed only using the various lockless SKB queue routines, there is no need to initialize the lock and __skb_queue_head_init() can be used. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Optimize LNA checkSujith Manoharan1-30/+47
The documentation for antenna diversity says: "The decision of diversity is done at 802.11 preamble. So, for 11G/11B, for every MAC packet hardware will do a decision. But in 11N with aggregation, the decision is made only at the preamble and all other MPDUs will use the same LNA as the first MPDU." Make use of rs_firstaggr to avoid needlessly scanning for LNA changes. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Identify first subframe in an A-MPDUSujith Manoharan3-2/+5
Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Handle invalid RSSISujith Manoharan1-16/+33
The combined RSSI can be invalid which is indicated by the value -128. Use RX_FLAG_NO_SIGNAL_VAL for such cases. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Remove unused function argumentSujith Manoharan1-2/+1
Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Fix error condition for corrupt descriptorsSujith Manoharan1-10/+18
In case a descriptor has the "done" bit clear and the next descriptor has it set, we drop both of them. If the packet that is received after these two packets is dropped for some reason, "discard_next" will not cleared. Fix this. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Handle corrupt descriptors properlySujith Manoharan1-2/+10
The MIC/PHYERR/CRC error bits are valid only for the last desc. for chained packets. Check this early in the preprocess() routine and bail out. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Move the RX poll check to preprocess()Sujith Manoharan1-4/+4
Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Fix RX beacon processingSujith Manoharan1-26/+22
Make sure that chained descriptors are handled correctly before the packet is parsed to determine if it is a beacon. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Fix RX packet counterSujith Manoharan1-4/+7
Handle chained descriptors and increment the RX counter only for valid packets. Since this is used only by MCI, use CONFIG_ATH9K_BTCOEX_SUPPORT. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Fix RX debug statisticsSujith Manoharan1-2/+1
The various error bits that ath_debug_stat_rx() checks are valid only for the last descriptor for a chained packet, handle this correctly. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Fix PHY error processingSujith Manoharan1-11/+12
Parse the PHY error details only for the last fragment in case descriptors are chained. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Reorder some functionsSujith Manoharan1-110/+110
Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Fix TSF processingSujith Manoharan1-13/+20
There is no need to calculate the mactime for chained descriptor packets, so make sure that this is done only for the last fragment of valid packets. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Fix RX crypto processingSujith Manoharan1-8/+4
The keymiss events are valid only in the last descriptor of a packet. Fix this by making sure that we return early in case of chained descriptors. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Discard invalid frames earlySujith Manoharan1-16/+22
Frames with invalid or zero length can be discarded early, there is no need to check the crypto bits. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Fix phy error handling for DFSSujith Manoharan1-2/+1
Since the DFS code appears to process the phy errors ATH9K_PHYERR_RADAR and ATH9K_PHYERR_FALSE_RADAR_EXT, check for the correct phyerr status in the main RX tasklet routine. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: Use a subroutine to check for "mybeacon"Sujith Manoharan1-13/+23
Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k_htc: do not use bulk on EP3 and EP4Oleksij Rempel1-27/+11
If usb auto suspend is enabled or system run in to suspend/resume cycle, ath9k-htc adapter will stop to response. It is reproducible on xhci HCs. Host part of problem: XHCI do timing calculation based on Transfer Type and bInterval, immediately after device was detected. Ath9k-htc try to overwrite this parameters on module probe and some changes in FW, since we do not initiate usb reset from the driver this changes are not took to account. So, before any kind of suspend or reset, host controller will operate with old parameters. Only after suspend/resume and if interface id stay unchanged, new parameters will by applied. Host will send bulk data with no intervals (?), which will cause overflow on FIFO of EP4. Firmware part of problem: By default, ath9k-htc adapters configured with EP3 and EP4 as interrupt endpoints. Current firmware will try to overwrite ConfigDescriptor to make EP3 and EP4 bulk. FIFO for this endpoints stay not reconfigured, so under the hood it is still Int EP. This patch is revert of 4a0e8ecca4ee commit which trying to reduce CPU usage on some systems. Since it will produce more bug as fixes, we will need to find other way to fix it. here is comment from kernel source which has some more explanation: * Some buggy high speed devices have bulk endpoints using * maxpacket sizes other than 512. High speed HCDs may not * be able to handle that particular bug, so let's warn... in our case EP3 and EP4 have maxpacket sizes = 64!!! Signed-off-by: Oleksij Rempel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15wil6210: let IP stack re-check HW TCP/UDP csum errorsVladimir Kondratiev1-6/+6
Fix for TCP iperf from Windows to Linux stall after about 1sec Hardware reports false errors in some situations: Microsoft IP stack, in violation of RFC 1624, set TCP checksum that should be 0x0 as 0xffff. hardware report Rx csum error. If HW csum absolutely trusted, this frame can be never received, as re-transmitted one will have same csum problem. In addition, it mess up block ack reorder buffer, as if packet dropped, it is not score boarded there. Signed-off-by: Vladimir Kondratiev <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-15ath9k: reset buffer stale flag in ath_tx_get_tid_subframeFelix Fietkau1-0/+2
If that flag stays set for a buffer that already ran through the tx path once, it might cause issues in tx completion processing. Better clear it early to ensure that this does not happen Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>