aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k
Commit message (Collapse)AuthorAge
...
* | | ath10k: fix STA u-APSDMichal Kazior2014-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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: add new wmi interface of NF cal periodPeter Oh2014-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new wmi interface controls noise floor (NF) calibration period via debugfs as firmware has introduced it on v10.2. It allows users to modify frequency of NF calibration in millisecond and changes RSSI reporting frequency consequently. Short calibration period will trigger more frequent NF calibration, so that RSSI reported in receive frames is more realistic. Till now calibration was done at 30 seconds. Signed-off-by: Peter Oh <poh@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | | ath10k: add new pdev parameters for fw 10.2Peter Oh2014-12-08
| | | | | | | | | | | | | | | | | | | | | | | | New pdev paramters have been added to firmware 10.2, hence update wmi interfaces to sync with. Signed-off-by: Peter Oh <poh@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | | ath10k: implement wmi-tlv backendMichal Kazior2014-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Latest main firmware branch introduced a new WMI ABI called wmi-tlv. It is not a tlv strictly speaking but something that resembles it because it is ordered and may have duplicate id entries. This prepares ath10k to support new hw. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | | ath10k: make some wmi functions publicMichal Kazior2014-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some functions can be shared across different WMI ABIs. Make them public so different WMI backends can use them from different source files in the future. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | | ath10k: introduce wmi opsMichal Kazior2014-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: implement intermediate event argsMichal Kazior2014-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | This splits the actual event parsing into intermediary structures to facilitate future support of vastly different ABI WMI backends. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | | ath10k: set max_num_pending_tx in ath10k_core_init_firmware_features()Kalle Valo2014-12-08
| | | | | | | | | | | | | | | | | | Better to have this in same place as other firmware interface handling. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | | ath10k: add ATH10K_FW_IE_WMI_OP_VERSIONKalle Valo2014-12-08
| | | | | | | | | | | | | | | | | | | | | | | | Instead of using feature flags, add new 32 bit variable for managing different WMI versions. This makes it firmware interface tests a bit less convoluted, especially when we add one more interface. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | | ath10k: create ath10k_core_init_features()Kalle Valo2014-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | It's easier to manage firmware version differences when we configure them in one place. Rename ath10k_core_init_max_sta_count() to ath10k_core_init_firmware_features() and start moving most of the firmware version ("features") handling to that function. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | | ath10k: clean up error handling in ath10k_core_probe_fw()Kalle Valo2014-12-08
| | | | | | | | | | | | | | | | | | | | | Use the error handling style preferred in ath10k. Makes it easier to add ath10k_init_firmware_features() function in the next patch. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | | ath10k: move uart pin config into hw_paramsMichal Kazior2014-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | This will make it possible to easily support different hardware with different uart pin configuration. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | | ath10k: put board size into hw_paramsMichal Kazior2014-12-08
| | | | | | | | | | | | | | | | | | | | | | | | This makes it easier to extend the list of supported hardware. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | | ath10k: create a chip revision whitelistMichal Kazior2014-12-08
| | | | | | | | | | | | | | | | | | | | | | | | This will make it easier to extend and maintain list of supported hardware. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | | ath10k: read calibration data from Device TreeToshi Kikuchi2014-12-08
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for reading calibration data from Device Tree. It looks for the calibration data in Device Tree if it can't find it in a file. If there's no node in Device Tree, ath10k will try to find the calibration data from OTP. The node for the calibration data should be defined like this: pci { pcie@0 { reg = <0 0 0 0 0>; #interrupt-cells = <1>; #size-cells = <2>; #address-cells = <3>; device_type = "pci"; ath10k@0,0 { reg = <0 0 0 0 0>; device_type = "pci"; qcom,ath10k-calibration-data = [ 01 02 03 ... ]; }; }; }; Signed-off-by: Toshi Kikuchi <toshik@chromium.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: simplify rx ring size/fill calculationMichal Kazior2014-12-01
| | | | | | | | | | | | | | | | Don't bother with fancy arithmetic and just hardcode the final values. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: prevent pci tx/rx starvationMichal Kazior2014-12-01
| | | | | | | | | | | | | | | | | | In theory it was possible to starve the system if a tx/rx handler could implicitly trigger more tx/rx pci events. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: remove transfer_id from ath10k_hif_cb::tx_completionMichal Kazior2014-12-01
| | | | | | | | | | | | | | | | | | Pass the eid argument via skbuff control buffer. This will make it possible to work with queues of HTC event buffers. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: remove unused callback argument from struct ath10k_hif_cb::rx_completionMichal Kazior2014-12-01
| | | | | | | | | | | | | | | | This wasn't used since forever and there are no plans on using it. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: make wmi service bitmap non-debugMichal Kazior2014-12-01
| | | | | | | | | | | | | | | | The service bitmap can be used to determine firmware capabilities. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: add sanity checks for service bmap parsingMichal Kazior2014-12-01
| | | | | | | | | | | | | | | | | | This shouldn't really happen but take into account the original service bitmap length when mapping service ids. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: fix wmi svc bitmap dbg printMichal Kazior2014-12-01
| | | | | | | | | | | | | | | | The dump print uses sizeof() but since service_map was a mere pointer the dump was too short. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: add pointer constness to tracesMichal Kazior2014-12-01
| | | | | | | | | | | | | | | | | | Traces shouldn't modified passed data. This will make it possible to pass const arguments to traces. 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-01
| | | | | | | | | | | | | | | | 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-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-26
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-26
| | | | | | | | | | | | | | | | 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: add memory dump debugfs interfaceYanbo Li2014-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add mem_val debugfs file for dumping the firmware (target) memory and also for writing to the memory. The firmware memory is accessed through one file which uses position of the file as the firmware memory address. For example, with dd use skip parameter for the address. Beucase target memory width is 32 bits it's strongly recommended to use blocksize divisable with 4 when using this interface. For example, when using dd use bs=4 to set the block size to 4 and remember to divide both count and skip values with four. To read 4 kB chunk from address 0x400000: dd if=mem_value bs=4 count=1024 skip=1048576 | xxd -g1 To write value 0x01020304 to address 0x400400: echo 0x01020304 | xxd -r | dd of=mem_value bs=4 seek=1048832 To read 4 KB chunk of memory and then write back after edit: dd if=mem_value of=tmp.bin bs=4 count=1024 skip=1048576 emacs tmp.bin dd if=tmp.bin of=mem_value bs=4 count=1024 seek=1048576 Signed-off-by: Yanbo Li <yanbol@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: add register access debugfs interfaceYanbo Li2014-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Debugfs files reg_addr and reg_val are used for reading and writing to the firmware (target) registers. reg_addr contains the address to be accessed, which also needs to be set first, and reg_value is when used for reading and writing the actual value in ASCII. To read a value from the firmware register 0x100000: # echo 0x100000 > reg_addr # cat reg_value 0x00100000:0x000002d3 To write value 0x2400 to address 0x100000: # echo 0x100000 > reg_addr # echo 0x2400 > reg_value # Signed-off-by: Yanbo Li <yanbol@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: fix bug reported by lockdepSujith Manoharan2014-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-26
| | | | | | | | | | | | | | | | | | | | | | | | 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-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: don't drop corrupted mgmt framesMichal Kazior2014-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | Some firmware revisions don't seem to deilver management frames with FCS error via WMI so narrow down the HTT rule to not drop corrupted management frames. This basically increases number of frames ath10k reports while sniffing. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: fix offchannel cancel failuresMichal Kazior2014-11-26
| | | | | | | | | | | | | | | | | | | | 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-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-26
| | | | | | | | | | | | | | | | | | 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-26
| | | | | | | | | | | | | | | | | | | | 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-26
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ath10k: add ATH10K_DBG_WMI_PRINT debug levelBen Greear2014-11-24
| | | | | | | | | | | | | | | | | | | | | | There are not many of these messages producted by the firmware, but they are generally fairly useful, so make it easy to print them with a separate debug level. kvalo: fix commit log, rename debug level Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: don't rebuild all the timeJohannes Berg2014-11-24
| | | | | | | | | | | | | | | | | | There are better ways to get the kernel information, use the utsname and omit the version code entirely since it's duplicate. The version magic is rather useless anyway Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: report rx rate and signal for fragmented RxMichal Kazior2014-11-20
| | | | | | | | | | | | | | | | Fragmented Rx wasn't reporting everything. With the reworked Rx code it's very easy to fix it. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: use rx descriptor for ppdu status extractionMichal Kazior2014-11-20
| | | | | | | | | | | | | | | | | | This makes it more in line with the new Rx path. It also makes the code more reusable because Rx descriptor is more accessible. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: remove unused function argumentMichal Kazior2014-11-20
| | | | | | | | | | | | | | | | The original fix has been moved into a different place in the code. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: unify rx undecappingMichal Kazior2014-11-20
| | | | | | | | | | | | | | | | | | | | | | This creates a single, common path for MSDU, A-MSDU and fragmented Rx. Hopefully this will make it easier to understand Rx path and make it easier to work with. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: refactor htt->rx_confusedMichal Kazior2014-11-20
| | | | | | | | | | | | | | | | | | Make the rx_confused be handled by the rx indication handlers instead of the buffer popping function. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: simplify Rx loopMichal Kazior2014-11-20
| | | | | | | | | | | | | | | | | | Since htt_rx_mpdu_status isn't used anymore (instead attention flags are used) simplify the loop. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | ath10k: start using sk_buff_headMichal Kazior2014-11-20
| | | | | | | | | | | | | | | | | | | | Instead of using manual sk_buff linking via ->next use sk_buff_head. It's more robust, cleaner and there's plenty of helper functions in kernel already to manage sk_buff_head. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>