summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/mac.c
Commit message (Collapse)AuthorAgeFilesLines
* ath10k: Implement sta_add_debugfsRajkumar Manoharan2015-01-131-0/+3
| | | | | | | | | | | | | | | | | | Add per station debugfs files when a station is added to mac80211's station list. This helps to group peer specific debugfs entries altogether. Right now this callback adds support to test aggregation procedures (addba/addba_resp/delba) manually. To enable automatic aggregation in target, echo 0 >/sys/kernel/debug/ieee80211/phyX/netdev:wlanX/ stations/XX:XX:XX:XX:XX:XX/aggr_mode For manual mode, echo 1 >/sys/kernel/debug/ieee80211/phyX/netdev:wlanX/ stations/XX:XX:XX:XX:XX:XX/aggr_mode Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: set phymode to 11b when NO_OFDM flag setPeter Oh2014-12-231-1/+4
| | | | | | | | | phymode should use 11b only if NO_OFDM flags is set. Hence check up channel flag for NO_OFDM and set to 11b. Signed-off-by: Peter Oh <poh@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: send (re)assoc peer command when NSS changedJanusz Dziedzic2014-12-231-2/+3
| | | | | | | | | | | | Assoc peer command contain information about NSS. When we will get IEEE80211_RC_NSS_CHANGED we should also send (re) assoc peer command to be sure firmware will know about it and RC will work correctly. This was found during code review. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: fix low TX rates when IBSS and HTJanusz Dziedzic2014-12-231-0/+7
| | | | | | | | | This fix TX problem when IBSS used in HT mode. Before we used 6Mbps all the time for TX direction. Reported-by: Yeoh Chun-Yeow <yeohchunyeow@gmail.com> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: add 10.2.4 firmware supportRajkumar Manoharan2014-12-231-0/+1
| | | | | | | | | | | | | 10.2.4 firmware uses bitmask in wmi_resource_config to configure 10.2 firmware features like airtime fairness and rx batch mode instead of maintaining separete bool entry. This allows new features that can be configure during init time without breaking backward compatibility. kvalo: use WMI op version, bump up FW API to 4 to not break older versions of ath10k Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: use wmi op version to check which iface combination to useKalle Valo2014-12-231-6/+15
| | | | | | | ATH10K_FW_FEATURE_WMI_10X should not be used for anymore as that's now deprecated, instead use wmi op version. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: advertise p2p dev supportMichal Kazior2014-12-161-3/+9
| | | | | | | | | | | | | | | | | Firmware doesn't allow precise tx rate control so P2P wasn't entirely spec compliant (it was using CCK rates in some cases). The only way to make sure firmware doesn't use CCK rates is to have a vdev with P2P subtype used for scanning and tx. This can be done via a special dedicated P2P device interface support. This also removes the ancient hack from ath10k in favor of p2pdev. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: enable per-vif sta powersaveMichal Kazior2014-12-161-4/+8
| | | | | | | | Per-vif bss_conf.ps should be used to configure powersave. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: prevent invalid ps timeout configMichal Kazior2014-12-161-1/+10
| | | | | | | | | Setting 0 ps timeout to firmware yields very poor latency and traffic issues. This is the case when multi-vif is active. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: fix STA u-APSDMichal Kazior2014-12-161-10/+69
| | | | | | | | | | | | | To comply with WMM-PS the device shouldn't wake up with a NullFunc frame pair when tx-ing. Instead PM bit on each tx frame should be used. To make this work correctly firmware needs to be told to use a different STA PS wake threshold when u-APSD is enabled. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: improve 11b coexMichal Kazior2014-12-161-1/+12
| | | | | | | | | | Some firmware revisions need peer phymode to be specified as MODE_11B when associating as station to a 11b AP. Otherwise they can starve other stations. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: unregister and remove frag_threshold callbackPeter Oh2014-12-161-24/+0
| | | | | | | | | Setting fragmentation threshold has not been supported by any of firmware versions, hence unregister the callback and remove the function. Signed-off-by: Peter Oh <poh@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: introduce wmi opsMichal Kazior2014-12-081-0/+2
| | | | | | | | | | | | | | Since the 10.x fw branch support was introduced it became apparent ath10k will need to be able to deal with different fw ABIs eventually. The patch creates an abstraction for dealing with command and event structures across different ABIs and mostly gets rid of the ATH10K_FW_FEATURE_WMI_10X flag usage. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: do not limit RTS threshold value to 2347Vivek Natarajan2014-12-011-5/+1
| | | | | | | | Increase the rts threshold from the legacy value of 2347 to support higher threshold limit. Signed-off-by: Vivek Natarajan <nataraja@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: fix station count enforcementMichal Kazior2014-11-261-13/+47
| | | | | | | | | | | | | | | The number of peers isn't directly translatable to the number of stations because ath10k needs to reserve a few extra peers for special cases like multi-vif concurrency. The previous limit was 126 and 15 stations in AP mode for 10.x and main firmware branches respectively. The limit is now 128 and 16 which was the original intention. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: clean up num_peers lockingMichal Kazior2014-11-261-5/+3
| | | | | | | | | | | | | The var was supposed to be protected by data_lock but it wasn't so in all instances. It's actually not necessary to have a spinlock protected num_peers so drop it. All instances of num_peers are already within conf_mutex sections so use that. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: add missing gotoMichal Kazior2014-11-261-1/+3
| | | | | | | | This prevents warning spamming if peer creation fails during sta_state in some cases. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: fix bug reported by lockdepSujith Manoharan2014-11-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | ath10k_tx_wep_key_work() acquires conf_mutex, so cancelling it when conf_mutex is already taken in ath10k_remove_interface() is incorrect, so move it outside the lock. Snippet from the lockdep report: kernel: ====================================================== kernel: [ INFO: possible circular locking dependency detected ] kernel: 3.18.0-rc5-wl-debug #34 Tainted: G O kernel: ------------------------------------------------------- kernel: hostapd/451 is trying to acquire lock: kernel: ((&arvif->wep_key_work)){+.+...}, at: [<ffffffff810872d5>] flush_work+0x5/0x290 kernel: but task is already holding lock: kernel: (&ar->conf_mutex){+.+.+.}, at: [<ffffffffa0b99f00>] ath10k_remove_interface+0x40/0x290 [ath10k_core] kernel: which lock already depends on the new lock. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: fix locking for WEP keysSujith Manoharan2014-11-261-0/+4
| | | | | | | | | | | | peer->keys needs to be protected by data_lock since it is also accessed from the WMI path. Both install() and clear() routines for peer keys modify the key contents, so use the data_lock to avoid races. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: fix shared WEPSujith Manoharan2014-11-261-0/+25
| | | | | | | | | | | | | | | | | When static keys are used in shared WEP, when a station is associated, message 3 is sent with an encrypted payload. But, for subsequent authentications that are triggered without a deauth, the auth frame is decrypted by the HW. To handle this, check if the WEP keys have already been set for the peer and if so, mark the frame as decrypted. This scenario can happen when a station changes its default TX key and initiates a new authentication sequence. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: fix offchannel cancel failuresMichal Kazior2014-11-261-2/+2
| | | | | | | | | | When mac80211 requests driver to cancel a hw roc the driver must not call the expired() callback or else roc will fail in some cases depending on how things get scheduled. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: make hw roc more reliableMichal Kazior2014-11-261-0/+2
| | | | | | | | | | | | | | | | With P2P concurrency requested hw roc duration time can be very small. Some firmware revisions refuse scan requests with too small channel dwell time. This prevents messages like, e.g. with connected STA vif and performing P2P Find: ath10k_pci 0000:00:05.0: failed to switch to channel for roc scan ieee80211 phy3: failed to start next HW ROC (-110) Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: fix offchan reliabilityMichal Kazior2014-11-261-6/+23
| | | | | | | | | | | | | | New firmware revisions don't need peer creation when doing offchannel tx. Earlier revisions would queue and never release frames without a peer. This prevent new firmware revisions from stopping replenishing wmi-htc tx credits and improves reliability of offchannel tx which would sometimes silently fail. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: remove extra_tx_headroomMichal Kazior2014-11-261-4/+0
| | | | | | | | | Comment was out-of-date. The headroom is no longer necessary because HTT Tx fragment list is stored in dma pool item associated with each sk_buff. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: use configured nss instead of max nssBen Greear2014-11-261-2/+9
| | | | | | | | | | When re-associating a station, the nss was set back to maximum value even if user had configured small number of tx chains. So, pay attention to user's config in this case as well. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath10k: apply chainmask settings to vdev on creationBen Greear2014-11-261-0/+41
| | | | | | | | | | | | | It appears it takes more than just setting the hardware's chainmask to make things work well. Without this patch, a vdev would only use 1x1 rates when chainmask was set to 0x3. Setting the 'nss' (number of spatial streams) on the vdev helps the firmware's rate-control algorithm work properly. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* Merge branch 'for-linville' of git://github.com/kvalo/athJohn W. Linville2014-11-171-5/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kalle Valo <kvalo@qca.qualcomm.com> says: "One ath6kl patch and rest for ath10k, but nothing really major which stands out. Most notable: o fix resume (Bartosz) o firmware restart is now faster and more reliable (Michal) o it's now possible to test hardware restart functionality without crashing the firmware using hw-restart parameter with simulate_fw_crash debugfs file (Michal)" Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath10k: advertise support for AP mode channel width changesRajkumar Manoharan2014-11-171-0/+2
| | | | | | | | | | | | | | | | This will enable AP mode to change channel width dynamically based on 20/40 intolerance report sent by associated client. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: speed up hw recoveryMichal Kazior2014-10-311-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases hw recovery was taking an absurdly long time due to ath10k waiting for things that would never really complete. Instead of waiting for inevitable timeouts poke all completions and wakequeues and check if it's still worth waiting. Reading/writing ar->state requires conf_mutex. Since waiters might be holding it introduce a new flag CRASH_FLUSH so it's possible to tell waiters to abort whatever they were waiting for. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: avoid possible deadlock with scan timeoutMichal Kazior2014-10-311-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should prevent deadlock predicted by the following splat: ====================================================== [ INFO: possible circular locking dependency detected ] 3.17.0-wl-ath+ #67 Not tainted ------------------------------------------------------- kworker/u32:1/7230 is trying to acquire lock: (&ar->conf_mutex){+.+.+.}, at: [<ffffffffa040a57d>] ath10k_scan_timeout_work+0x2d/0x50 [ath10k_core] but task is already holding lock: ((&(&ar->scan.timeout)->work)){+.+...}, at: [<ffffffff8106dae1>] process_one_work+0x151/0x470 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 ((&(&ar->scan.timeout)->work)){+.+...}: [<ffffffff810a12e5>] lock_acquire+0x85/0x100 [<ffffffff8106cb4d>] flush_work+0x3d/0x270 [<ffffffff8106e49d>] __cancel_work_timer+0x7d/0x110 [<ffffffff8106e543>] cancel_delayed_work_sync+0x13/0x20 [<ffffffffa0409f16>] ath10k_cancel_remain_on_channel+0x36/0x60 [ath10k_core] [<ffffffffa028c75c>] ieee80211_cancel_roc+0x1cc/0x2f0 [mac80211] [<ffffffffa028c8a2>] ieee80211_mgmt_tx_cancel_wait+0x22/0x30 [mac80211] [<ffffffffa0132288>] nl80211_tx_mgmt_cancel_wait+0xa8/0x130 [cfg80211] [<ffffffff816654a5>] genl_family_rcv_msg+0x1a5/0x3c0 [<ffffffff81665749>] genl_rcv_msg+0x89/0xc0 [<ffffffff81664e91>] netlink_rcv_skb+0xb1/0xc0 [<ffffffff816650bc>] genl_rcv+0x2c/0x40 [<ffffffff8166474d>] netlink_unicast+0x18d/0x200 [<ffffffff81664add>] netlink_sendmsg+0x31d/0x430 [<ffffffff8161a9ac>] sock_sendmsg+0x9c/0xd0 [<ffffffff8161b469>] ___sys_sendmsg+0x389/0x3a0 [<ffffffff8161bed9>] __sys_sendmsg+0x49/0x90 [<ffffffff8161bf32>] SyS_sendmsg+0x12/0x20 [<ffffffff8174c456>] system_call_fastpath+0x1a/0x1f -> #0 (&ar->conf_mutex){+.+.+.}: [<ffffffff810a0bde>] __lock_acquire+0x1b6e/0x1ce0 [<ffffffff810a12e5>] lock_acquire+0x85/0x100 [<ffffffff817491eb>] mutex_lock_nested+0x4b/0x370 [<ffffffffa040a57d>] ath10k_scan_timeout_work+0x2d/0x50 [ath10k_core] [<ffffffff8106db41>] process_one_work+0x1b1/0x470 [<ffffffff8106df63>] worker_thread+0x123/0x460 [<ffffffff81073f34>] kthread+0xe4/0x100 [<ffffffff8174c3ac>] ret_from_fork+0x7c/0xb0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((&(&ar->scan.timeout)->work)); lock(&ar->conf_mutex); lock((&(&ar->scan.timeout)->work)); lock(&ar->conf_mutex); *** DEADLOCK *** Reported-by: Marek Puzyniak <marek.puzyniak@tieto.com> Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: call correct function for frag thresholdMichal Kazior2014-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Rts threshold was being configured instead of fragmentation threshold. Keep in mind available firmware binaries don't seem to support fragmentation anyway so this doesn't fix fragmentation threshold per se. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: add SURVEY_INFO_IN_USE for current channel on surveyFelix Fietkau2014-10-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | When user space requests survey info, it is useful to know which of the survey data refers to the channel that is currently actively being used. One of the use cases is getting the current channel noise for status output. Without this flag you would have to look up the channel separately and then compare it against the frequency in the survey output in user space. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | Merge tag 'mac80211-next-for-john-2014-11-04' of ↵John W. Linville2014-11-041-2/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg <johannes@sipsolutions.net> says: "This relatively large batch of changes is comprised of the following: * large mac80211-hwsim changes from Ben, Jukka and a bit myself * OCB/WAVE/11p support from Rostislav on behalf of the Czech Technical University in Prague and Volkswagen Group Research * minstrel VHT work from Karl * more CSA work from Luca * WMM admission control support in mac80211 (myself) * various smaller fixes, spelling corrections, and minor API additions" Conflicts: drivers/net/wireless/ath/wil6210/cfg80211.c Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | mac80211: replace restart_complete() with reconfig_complete()Eliad Peller2014-11-041-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drivers might want to know also when mac80211 has completed reconfiguring after resume (e.g. in order to know when frames can be passed to mac80211). Rename restart_complete() to a more-generic reconfig_complete(), and add a new enum to indicate the reconfiguration type. Update the current users with the new prototype. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | Merge tag 'for-linville-20141024' of git://github.com/kvalo/athJohn W. Linville2014-10-271-225/+284
|\ \ \ | |/ / |/| / | |/ | | Conflicts: drivers/net/wireless/ath/wil6210/wil6210.h
| * ath10k: use bss_info as txpower sourceMichal Kazior2014-10-211-20/+74
| | | | | | | | | | | | | | | | | | | | | | | | This simply changes the source for txpower setup. It does not make ath10k use different txpower values for different vifs. This will make it easier to implement chanctx in ath10k in the future. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: clean up sta auth/assoc codeMichal Kazior2014-10-211-79/+42
| | | | | | | | | | | | | | | | The code can be symmetrical so make it so. This makes it easier to understand and work with. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: skip some commands on reassocMichal Kazior2014-10-211-23/+29
| | | | | | | | | | | | | | | | | | | | It doesn't make much sense to reconfigure peer completely upon reassociation. This will make it easier to have a more uniform association code across different modes. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: clean up assoc codeMichal Kazior2014-10-211-48/+46
| | | | | | | | | | | | | | | | | | | | There's no need to pass bss_conf explicitly as it is accessible via vif pointer. This requires slight changes in function prototypes. While at it clean up listen interval workaround/command. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix kernel panic while shutting down APRajkumar Manoharan2014-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on GFP flag given to DMA coherent allocation, the behaviour of dma_free_coherent is changed. This behavioural diffrence is noticeable in ARM platform. If DMA memory is allocated with GFP_KERNEL, free coherent can not be called inside spin lock. This is causing kernel crash in ARM platforms. Fix this by changing GFP flag to atomic. This is most likely a regression from commit 64badcb6d645 ("ath10k: workaround fw beaconing bug"). Cc: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: don't create bssid peer for ibssJanusz Dziedzic2014-10-081-18/+10
| | | | | | | | | | | | | | | | | | | | It's not really necessary to create bssid peer for bssid. Self-address peer is sufficient. This prevents some firmware revisions from crashing. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: use 64-bit vdev mapBen Greear2014-10-011-9/+12
| | | | | | | | | | | | | | | | This can allow more than 32 stations to be supported without over-running the bitmap. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: support ethtool statsBen Greear2014-10-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Add support for reading firmware stats through the ethtool API. This may be easier for applications to manipulate compared to parsing a text based debugfs file. kvalo: remove unneeded ifdefs, call ath10k_debug_fw_stats_request() and added simple error handling Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: deduplicate wmi_channel codeMichal Kazior2014-09-231-0/+1
| | | | | | | | | | | | | | | | The structure is being set up in 2 places. Deduplicate the code by creating a helper. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix tx/rx chainmask initMichal Kazior2014-09-231-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | Firmware reports the number of RF chains so use that for initialization of supp_{tx,rx}_chainmask instead of using a macro for 3x3 chips. This should make tx/rx chainmask reports correct for chips other than 3x3. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: workaround fw beaconing bugMichal Kazior2014-09-231-29/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some firmware revisions don't wait for beacon tx completion before sending another SWBA event. This could lead to hardware using old (freed) beacon data in some cases, e.g. tx credit starvation combined with missed TBTT. This is very very rare. On non-IOMMU-enabled hosts this could be a possible security issue because hw could beacon some random data on the air. On IOMMU-enabled hosts DMAR faults would occur in most cases and target device would crash. Since there are no beacon tx completions (implicit nor explicit) propagated to host the only workaround for this is to allocate a DMA-coherent buffer for a lifetime of a vif and use it for all beacon tx commands. Worst case for this approach is some beacons may become corrupted, e.g. garbled IEs or out-of-date TIM bitmap. Keep the original beacon-related code as-is in case future firmware revisions solve this problem so that the old path can be easily re-enabled with a fw_feature flag. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | Merge branch 'for-linville' of git://github.com/kvalo/athJohn W. Linville2014-09-261-103/+89
|\ \ | |/
| * ath10k: use ether_addr_copy()Kalle Valo2014-09-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | As suggeested by checkpatch: WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) In wmi.c I had to change due to sparse warnings copying of struct wmi_mac_addr from form &cmd->peer_macaddr.addr to cmd->peer_macaddr.addr. In ath10k_wmi_set_ap_ps_param() I also added the missing ".addr" to the copy command. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: else is not generally useful after a break or returnKalle Valo2014-09-181-6/+6
| | | | | | | | | | | | | | | | Fixes checkpatch warnings: WARNING: else is not generally useful after a break or return Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix missing a blank line after declarationsKalle Valo2014-09-181-4/+2
| | | | | | | | | | | | | | | | | | | | | | Fixes checkpatch warnings: WARNING: Missing a blank line after declarations Please note that some of the cases I fixed by moving the variable declarations to the beginning of the function, which is the preferred style in ath10k. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
OpenPOWER on IntegriCloud