aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/recv.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-02-11ath9k: Fix IBSS joiner modeSujith Manoharan1-1/+1
On joining an existing IBSS network, beaconing has to start only after a TSF sync has happened by receiving a beacon from the BSS. In creator mode, beaconing can start immediately after a HW reset has been done. Now that mac80211 notifies the driver of the mode type (creator/joiner) via ieee80211_bss_conf->ibss_creator, make use of it to properly setup the HW beacon timers. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-01ath9k: Fix sparse __CHECK_ENDIAN__ for spectral codeSven Eckelmann1-4/+5
Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-01ath9k: Only add fix_rssi_inv_only when spectral code is usedSven Eckelmann1-0/+2
The code is only used when ATH9K_DEBUGFS is activated and causes build warnings when it is still compiled without user. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-01ath9k: Only process fft samples when ATH9K_DEBUGFS is enabledSven Eckelmann1-1/+1
The code can only be used when ATH9k_DEBUGFS is enabled an not when ATH_DEBUG is activated. Still enabling it would cause build failures. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-02-01ath9k: report A-MPDU statusChristian Lamparter1-0/+20
The ath9k hardware reports whenever an frame was part of an A-MPDU. MAC80211 already provides the necessary API to pass this additional information along to whomever needs it. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30ath9k: Update spectral scan output dataSven Eckelmann1-6/+8
The sample data received through the spectral scan can be either in big or little endian byteorder. This information isn't stored in the output file. Therefore it is not possible for the analyzer software to find the correct byte order. It is relative common to get the data from a low end AP in big endian mode and transfer it to another computer in little endian mode to analyze it. Therefore, it would be better to store it in network (big endian) byte order. The extension of the 8 bit bins for each bin to 16 bit is not necessary. This operation can be done in userspace or on a different machine. Instead the max_exp defining the amount of shifting required for each bin is exported to userspace. The change of the output format requires a change of the type in the sample tlv to allow the userspace program to correctly detect the bin format. Reported-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: Sven Eckelmann <sven@open-mesh.com> [siwu@hrz.tu-chemnitz.de: squashed patches, update commit message, rebase, fix endianess bug] Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30ath9k: drop spectral packets after processing themSimon Wunderlich1-15/+22
Spectral packets are "bogus" packets and should not be further evaluated by the RX path. Statistics are added to keep track of these packets. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-28Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville1-39/+15
Conflicts: drivers/net/wireless/ath/ath9k/main.c drivers/net/wireless/iwlwifi/dvm/tx.c
2013-01-14ath9k: remove sc->rx.rxbuflock to fix a deadlockFelix Fietkau1-13/+0
The commit "ath9k: fix rx flush handling" added a deadlock that happens because ath_rx_tasklet is called in a section that has already taken the rx buffer lock. It seems that the only purpose of the rxbuflock was a band-aid fix to the reset vs rx tasklet race, which has been properly fixed in the commit "ath9k: add a better fix for the rx tasklet vs rx flush race". Now that the fix is in, we can safely remove the lock to avoid such issues. Cc: stable@vger.kernel.org Reported-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-11ath9k: fix rx flush handlingFelix Fietkau1-7/+9
Right now the rx flush is not doing anything useful on AR9003+, as it only works if the buffers in the rx FIFO have not been purged yet, as is done by ath_stoprecv. To fix this, always call ath_flushrecv from within ath_stoprecv before the FIFO is emptied, but still after the hw receive path has been stopped. This ensures that frames received (and ACKed by the hardware) shortly before a reset will be seen by the software, which should improve A-MPDU session stability. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-11ath9k: add a better fix for the rx tasklet vs rx flush raceFelix Fietkau1-15/+0
Ensure that the rx tasklet is no longer running when entering the reset path. Also remove the distinction between flush and no-flush frame processing. If a frame has been received and ACKed by the hardware, the stack needs to see it, so that the BA receive window does not go out of sync. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-11ath9k: do not link receive buffers during flushFelix Fietkau1-4/+6
On AR9300 the rx FIFO needs to be empty during reset to ensure that no further DMA activity is generated, otherwise it might lead to memory corruption issues. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09ath9k: add spectral scan featureSimon Wunderlich1-0/+106
Adds the spectral scan feature for ath9k. AR92xx and AR93xx chips are supported for now. The spectral scan is triggered by configuring a mode through a debugfs control file. Samples can be gathered via another relay debugfs file. Essentially, to try it out: echo chanscan > /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan_ctl iw dev wlan0 scan cat /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan0 > samples echo disable > /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan_ctl This feature is still experimental. The special "chanscan" mode is used to perform spectral scan while mac80211 is scanning for channels. To allow this, sw_scan_start/complete() ops have been added. The patch contains code snippets and information from Zefir Kurtisi and information provided by Adrian Chadd and Felix Fietkau. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07ath9k: use the devres API for allocations/mappingsFelix Fietkau1-10/+1
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-12-11ath9k: RX timestamp is reported at end of frameThomas Pedersen1-1/+1
Accurate RX timestamp reporting is important for proper IBSS merging, mesh synchronization, and MCCA scheduling. Namely, knowing where the TSF is recorded is needed to sync with the beacon timestamp field. Tested with AR9280. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-11-13mac80211: support RX_FLAG_MACTIME_ENDThomas Pedersen1-1/+1
Allow drivers to indicate their mactime is at RX completion and adjust for this in mac80211. Also rename the existing RX_FLAG_MACTIME_MPDU to RX_FLAG_MACTIME_START to clarify its intent. Based on similar code by Johannes Berg. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> [fix docs, atheros drivers] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-10-29ath9k: Ensure we set FTP_STOMP_LOW weight when WLAN is idleMohammed Shafi Shajakhan1-1/+4
When WLAN is idle ensure we downgrade to FTP_STOMP_LOW weight (from STOMP_LOW) to provide more bandwidth for BT FTP profile. WLAN's idleness can be estimated by taking into account of the rx data packets and just ignore beacons, qos nullfunc etc. Also update bt_wait_time even if the chip is in NETWORK SLEEP mode. This should help BT throughput when WLAN is idle. Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-09-28ath9k: Fix rx filtering issue for older chipsThomas Wagner1-2/+2
We need to have the promiscuous mode enabled for older chipsets so that the olderchips hardware does not filters out some valid/necessary frames that need to be sent to mac80211. Fix this by enabling promiscus mode for all the chipsets whose macversion <= AR9160 chipsets. This should fix https://bugzilla.kernel.org/show_bug.cgi?id=45591 shafi: made the fix generic by having the frame filtering disabled for chipsets older than AR9280. Cc: Javier Cardona <javier@cozybit.com> Signed-off-by: Thomas Wagner <Thomas.Wagner@hs-rm.de> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-08-13ath9k: fix decrypt_error initialization in ath_rx_tasklet()Lorenzo Bianconi1-1/+1
ath_rx_tasklet() calls ath9k_rx_skb_preprocess() and ath9k_rx_skb_postprocess() in a loop over the received frames. The decrypt_error flag is initialized to false just outside ath_rx_tasklet() loop. ath9k_rx_accept(), called by ath9k_rx_skb_preprocess(), only sets decrypt_error to true and never to false. Then ath_rx_tasklet() calls ath9k_rx_skb_postprocess() and passes decrypt_error to it. So, after a decryption error, in ath9k_rx_skb_postprocess(), we can have a leftover value from another processed frame. In that case, the frame will not be marked with RX_FLAG_DECRYPTED even if it is decrypted correctly. When using CCMP encryption this issue can lead to connection stuck because of CCMP PN corruption and a waste of CPU time since mac80211 tries to decrypt an already deciphered frame with ieee80211_aes_ccm_decrypt. Fix the issue initializing decrypt_error flag at the begging of the ath_rx_tasklet() loop. Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Cc: <stable@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-17ath9k: Cleanup beacon logicSujith Manoharan1-1/+1
* The beaconing status routine is not required, since in multi-VIF cases the HW beacon parameters should not be re-configured. * Remove SC_OP_TSF_RESET - when a beaconing interface comes up the first time, the TSF has to be reset. * Simplify ath9k_allow_beacon_config(). * Handle setting/clearing the SWBA interrupt properly. * Remove the TSF mangling in IBSS mode, it is not required. * General code cleanup. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-09ath9k: set 4ADDRESS bit in RX filter for AR9550Gabor Juhos1-0/+3
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-09Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville1-3/+4
Conflicts: net/mac80211/mlme.c
2012-06-27ath9k: fix panic caused by returning a descriptor we have queued for reuseTom Hughes1-2/+2
Commit 3a2923e83c introduced a bug when a corrupt descriptor is encountered - although the following descriptor is discarded and returned to the queue for reuse the associated frame is also returned for processing. This leads to a panic: BUG: unable to handle kernel NULL pointer dereference at 000000000000003a IP: [<ffffffffa02599a5>] ath_rx_tasklet+0x165/0x1b00 [ath9k] Call Trace: <IRQ> [<ffffffff812d7fa0>] ? map_single+0x60/0x60 [<ffffffffa028f044>] ? ath9k_ioread32+0x34/0x90 [ath9k] [<ffffffffa0292eec>] athk9k_tasklet+0xdc/0x160 [ath9k] [<ffffffff8105e133>] tasklet_action+0x63/0xd0 [<ffffffff8105dbc0>] __do_softirq+0xc0/0x1e0 [<ffffffff8101a873>] ? native_sched_clock+0x13/0x80 [<ffffffff815f9d5c>] call_softirq+0x1c/0x30 [<ffffffff810151f5>] do_softirq+0x75/0xb0 [<ffffffff8105df95>] irq_exit+0xb5/0xc0 [<ffffffff815fa5b3>] do_IRQ+0x63/0xe0 [<ffffffff815f0cea>] common_interrupt+0x6a/0x6a <EOI> [<ffffffff8131840a>] ? intel_idle+0xea/0x150 [<ffffffff813183eb>] ? intel_idle+0xcb/0x150 [<ffffffff814a1db9>] cpuidle_enter+0x19/0x20 [<ffffffff814a23d9>] cpuidle_idle_call+0xa9/0x240 [<ffffffff8101c4bf>] cpu_idle+0xaf/0x120 [<ffffffff815cda8e>] rest_init+0x72/0x74 [<ffffffff81cf4c1a>] start_kernel+0x3b7/0x3c4 [<ffffffff81cf4662>] ? repair_env_string+0x5e/0x5e [<ffffffff81cf4346>] x86_64_start_reservations+0x131/0x135 [<ffffffff81cf444a>] x86_64_start_kernel+0x100/0x10f Making sure bf is cleared to NULL in this case restores the old behaviour. Signed-off-by: Tom Hughes <tom@compton.nu> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-25ath9k: fix dynamic WEP related regressionFelix Fietkau1-1/+2
commit 7a532fe7131216a02c81a6c1b1f8632da1195a58 ath9k_hw: fix interpretation of the rx KeyMiss flag This commit used the rx key miss indication to detect packets that were passed from the hardware without being decrypted, however it seems that this bit is not only undefined in the static WEP case, but also for dynamically allocated WEP keys. This caused a regression when using WEP-LEAP. This patch fixes the regression by keeping track of which key indexes refer to CCMP keys and only using the key miss indication for those. Reported-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@vger.kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06ath9k: Fix powersave lockingSujith Manoharan1-7/+6
The 'ps_flags' is used/accessed in a variety of contexts and requires proper locking. Use 'sc_pm_lock' appropriately. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06ath9k: Use atomic operationsSujith Manoharan1-5/+5
The 'sc_flags' variable is being used in a number of places with no locking whatsoever. This patch converts the usage of sc_flags to atomic ops. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06ath9k: Move LNA code to antenna.cSujith Manoharan1-740/+0
And use a helper function to setup antennae after a reset. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06ath9k: improve BT FTP/PAN performanceRajkumar Manoharan1-0/+1
When BT FTP/PAN transmits while WLAN is idle, the one of 9462 chain often picks up BT's tx signal and starts receiving. If the current weight is set to be higher than BT tx, BT tx will be aborted and this also degrades BT performance. Hence lower WLAN rx priority in this case only when there are no WLAN traffic. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06ath9k: Remove SC_OP_OFFCHANNELSujith Manoharan1-2/+2
mac80211's IEEE80211_CONF_OFFCHANNEL can be used directly to track offchannel state. Also pass the correct boolean value to ath9k_hw_startpcureceive(). Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-10drivers/net: Convert compare_ether_addr to ether_addr_equalJoe Perches1-1/+1
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: $ 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 <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-23ath9k: don't strip mic on non-encrypted frames in tkipMichael Liang1-0/+1
Fix the following bug: in tkip mode, qos-null ps on/off packets are dropped due to incorrect packet length so that ath9k softap can't handle powersave state transition of peer STA correctly. Signed-off-by: Michael Liang <mliang@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-23ath9k: Fix compile warnings when DEBUGFS is disabled.Ben Greear1-1/+1
This fixes two compile warnings, and removes a useless cast when assigning the 'sc' variable. Reported-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-11ath9k: Add more recv stats.Ben Greear1-9/+26
This adds counters in various places that can drop packets on rx without otherwise incrementing a counter. It also counts some non-error cases, such as becons and fragments received. Should help with figuring out where packets are (and are not) dropped. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09ath9k: recover ar9380 chips from rare stuck stateRajkumar Manoharan1-0/+4
In the experiment with Azimuth ADEPT-n testbed where the APs transmit power was reduced to 25% and the signal strength was futher attenuated by 20dB and induced a path loss of ~7dB, the station was reporting beacon losses and the following issue were observed. * rx clear is stuck at low for more than 300ms * dcu chain and complete state is stuck at one of the hang signature This patch triggers the hang detection logic that recovers the chip from any of the above conditions. As the issue was originally reported in ChromeOs with AR9382 chips, this detection logic is enabled only for AR9380/2 chips. Cc: Paul Stewart <pstew@google.com> Reported-by: Gary Morain <gmorain@google.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-26ath9k: fix a memory leak in ath_rx_tasklet()Eric Dumazet1-2/+2
commit 0d95521ea7 (ath9k: use split rx buffers to get rid of order-1 skb allocations) added in memory leak in error path. sc->rx.frag should be cleared after the pskb_expand_head() call, or else we jump to requeue_drop_frag and leak an skb. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Jouni Malinen <jouni@qca.qualcomm.com> Cc: Felix Fietkau <nbd@openwrt.org> Cc: John W. Linville <linville@tuxdriver.com> Cc: Trond Wuellner <trond@chromium.org> Cc: Grant Grundler <grundler@chromium.org> Cc: Paul Stewart <pstew@chromium.org> Cc: David Miller <davem@davemloft.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-12ath9k: Fix mactime from being clobbered in rx_statusAshok Nagarajan1-2/+2
mactime was being overwritten by the function ath9k_rx_skb_preprocess. Fixed by memsetting rx_status in ath_rx_tasklet. Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-07ath9k: fix signal strength reporting issuesFelix Fietkau1-5/+7
On A-MPDU frames, the hardware only reports valid signal strength data for the last subframe. The driver also mangled rx_stats->rs_rssi using the ATH_EP_RND macro in a way that may make sense for ANI, but definitely not for reporting to mac80211. This patch changes the code to calculate the signal strength from the rssi directly instead of taking the average value, and flag everything but the last subframe in an A-MPDU to tell mac80211 to ignore the signal strength entirely, fixing signal strength fluctuation issues reported by various users. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-07ath9k: get rid of double queueing of rx frames on EDMAFelix Fietkau1-23/+22
Process rx status directly instead of separating the completion test from the actual rx status processing. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05ath9k: make use of list_for_each_entry_safeMohammed Shafi Shajakhan1-7/+2
this does the same thing as the previous code Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06ath9k: fix a WEP crypto related regressionFelix Fietkau1-0/+8
commit b4a82a0 "ath9k_hw: fix interpretation of the rx KeyMiss flag" fixed the interpretation of the KeyMiss flag for keycache based lookups, however WEP encryption uses a static index, so KeyMiss is always asserted for it, even though frames are decrypted properly. Fix this by clearing the ATH9K_RXERR_KEYMISS flag if no keycache based lookup was performed. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@vger.kernel.org Reported-by: Laurent Bonnans <bonnans.l@gmail.com> Reported-by: Jurica Vukadin <u.ra604@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-19ath: Convert ath_dbg(bar, ATH_DBG_<FOO>, to ath_dbg(bar, FOOJoe Perches1-9/+8
Add ATH_DBG_ to macros to shorten the uses and reduce the line count. Coalesce ath_dbg formats. Add missing spaces to coalesced formats. Add missing newline terminations to ath_dbg formats. Align ath_dbg arguments where appropriate. Standardize ath_dbg formats without periods. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-16ath9k: validate for non-zero BSSIDMohammed Shafi Shajakhan1-0/+1
before concluding that the recieved beacon is for us, let us make sure that the BSSID is non-zero. when I configured ad-hoc mode as creator and left it for some time without joining I found we recieved few frames whose BSSID is zero, which we concluded wrongly as 'my_beacons' Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-30ath9k: minor cleanupMohammed Shafi Shajakhan1-1/+0
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-30ath9k: change the default antenna settings based on diversityMohammed Shafi Shajakhan1-9/+14
change the AR_DEF_ANTENNA register settings i.e setting default antenna setting only for antenna diversity enabled chipsets. no point in doing this for MIMO chipsets Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-21ath9k: trivial: reorder rx_tasklet processingZefir Kurtisi1-5/+5
DFS events are reported as PHY errors and need to be processed with a correct timestamp set before ath9k_skb_preprocess() is called and the frame is possibly dropped. This patch puts the rxs->mactime calculation before the skb is preprocessed to prepare for DFS event reporting. Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11ath9k: only send FCS-fail packets to mac80211 if requestedFelix Fietkau1-1/+2
Prevents lots of broken frames from showing up on monitor interfaces by default. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11ath9k_hw: fix a regression in key miss handlingFelix Fietkau1-13/+14
The commit "ath9k_hw: Fix incorrect key_miss handling" changed the code to only report key miss errors if a MIC error wasn't reported. When checking the flags in that order in the MAC code, it might miss some real events, because the value of the MIC error flag is undefined under some conditions. The primary issue addressed by the previous commit is making sure that MIC errors are properly reported on the STA side. This can be fixed in a better way by adding a separate rx status flag for key miss and ignoring it for multicast frames. This fix slightly improves stability in AP mode on some older hardware, like AR9132. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11ath9k_hw: make ath9k_hw_set_interrupts use ah->imask by defaultFelix Fietkau1-1/+1
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11ath9k: disable unnecessary PHY error reportingFelix Fietkau1-4/+1
PHY errors relevant for ANI are always tracked by hardware counters, the bits that allow them to pass through the rx filter are independent of that. Enabling PHY errors in the rx filter often creates lots of useless DMA traffic and might be responsible for some of the rx dma stop failure warnings. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30ath9k: Remove redundant my beacon check at ath_rx_ps_beaconRajkumar Manoharan1-17/+6
Make use of the rx status's is_mybeacon in order to avoid redundant memcmp. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>