summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath
AgeCommit message (Collapse)Author
2016-05-04Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Conflicts: net/ipv4/ip_gre.c Minor conflicts between tunnel bug fixes in net and ipv6 tunnel cleanups in net-next. Signed-off-by: David S. Miller <davem@davemloft.net>
2016-04-26Merge ath-next from ath.gitKalle Valo
ath.git patches for 4.7. Major changes: ath10k * implement set_tsf() for 10.2.4 branch * remove rare MSI range support * remove deprecated firmware API 1 support ath9k * add module parameter to invert LED polarity wcn36xx * fixes to get the driver properly working on Dragonboard 410c
2016-04-25wcn36xx: Fill in capability listBjorn Andersson
Fill in the capability list with more values from the downstream driver. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25wcn36xx: Correct remove bss key response encodingBjorn Andersson
The WCN36XX_HAL_RMV_BSSKEY_RSP carries a single u32 with "status", so we can use the standard status check function for decoding the result. This is the last user of the v2 status checker, so remove the struct and helper function. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25wcn36xx: Delete BSS before idling linkBjorn Andersson
When disabling the beacon we must delete the bss before idling the link. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25wcn36xx: Use correct command struct for EXIT_BMPS_REQPontus Fuchs
EXIT_BMPS_REQ was using the command struct for ENTER_BMPS_REQ. I spotted this when looking at command dumps. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25wcn36xx: Implement multicast filteringPontus Fuchs
Pass the multicast list to FW. This patch also adds a way to build the smd command in place. This is needed because the MC list command is too big for the stack. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> [bjorn: dropped FIF_PROMISC_IN_BSS usage] Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25wcn36xx: Track association statePontus Fuchs
Knowing the association state is needed for mc filtering. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25wcn36xx: Clear encrypt_type when deleting bss keyPontus Fuchs
This fixes a problem connecting to an open network after being connected to an encrypted network. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25wcn36xx: Use allocated self sta index instead of hard codedPontus Fuchs
Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25wcn36xx: Copy all members in config_sta v1 conversionPontus Fuchs
When converting to version 1 of the config_sta struct not all members where copied. This fixes the problem of multicast frames not being delivered on an encrypted network. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25wcn36xx: Parse trigger_ba response properlyPontus Fuchs
This message does not follow the canonical format and needs it's own parser. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25wcn36xx: Remove sta pointer in private vif structPontus Fuchs
This does not work with multiple sta's in a vif. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25wcn36xx: Fetch private sta data from sta entry instead of from vifPontus Fuchs
For consistency with other code. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25wcn36xx: Add helper macros to cast sta to privPontus Fuchs
While poking at this I also change two related things. I rename one variable to make the names consistent. I also move one assignment of priv_sta to the declaration to save a few lines. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25wcn36xx: Use define for invalid index and fix typoPontus Fuchs
Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25wcn36xx: Use consistent name for private vifPontus Fuchs
Some code used priv_vif and some used vif_priv. Convert all to vif_priv for consistency. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25wcn36xx: Add helper macros to cast vif to private vif and vice versaPontus Fuchs
Makes the code a little easier to read. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25wcn36xx: Pad TIM PVM if neededPontus Fuchs
The wcn36xx FW expects a fixed size TIM PVM in the beacon template. If supplied with a shorter than expected PVM it will overwrite the IE following the TIM. Squashed with fix from Jason Mobarak <jam@cozybit.com>: Patch "wcn36xx: Pad TIM PVM if needed" has caused a regression in mesh beaconing. The field tim_off is always 0 for mesh mode, and thus pvm_len (referring to the TIM length field) and pad are both incorrectly calculated. Thus, msg_body.beacon_length is incorrectly calculated for mesh mode. Fix this. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Jason Mobarak <jam@cozybit.com> [bjorn: squashed in Jason's fixup] Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25wcn36xx: Clean up wcn36xx_smd_send_beaconPontus Fuchs
Needed for coming improvements. No functional changes. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> [bjorn: restored BEACON_TEMPLATE_SIZE define to 0x180] Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25ath9k: Fix LED polarity for some Mini PCI AR9220 MB92 cards.Vittorio Gambaletta (VittGam)
The Wistron DNMA-92 and Compex WLM200NX have inverted LED polarity (active high instead of active low). The same PCI Subsystem ID is used by both cards, which are based on the same Atheros MB92 design. Cc: <linux-wireless@vger.kernel.org> Cc: <ath9k-devel@qca.qualcomm.com> Cc: <ath9k-devel@lists.ath9k.org> Cc: <stable@vger.kernel.org> Signed-off-by: Vittorio Gambaletta <linuxbugs@vittgam.net> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-25ath9k: Add a module parameter to invert LED polarity.Vittorio Gambaletta (VittGam)
The LED can be active high instead of active low on some hardware. Add the led_active_high module parameter. It defaults to -1 to obey platform data as before. Setting the parameter to 1 or 0 will force the LED respectively active high or active low. Cc: <linux-wireless@vger.kernel.org> Cc: <ath9k-devel@qca.qualcomm.com> Cc: <ath9k-devel@lists.ath9k.org> Cc: <stable@vger.kernel.org> Signed-off-by: Vittorio Gambaletta <linuxbugs@vittgam.net> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-20ath10k: remove enum ath10k_swap_code_seg_bin_typeKalle Valo
It's not needed for anything so just get rid of it. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-20ath10k: switch testmode to use ath10k_core_fetch_firmware_api_n()Kalle Valo
Now that all firmware-N.bin related are within struct ath10k_fw_file we can switch to use ath10k_core_fetch_firmware_api_n() and delete almost identical ath10k_tm_fetch_utf_firmware_api_2(). Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-20ath10k: move htt_op_version to struct ath10k_fw_fileKalle Valo
Preparation for testmode.c to use ath10k_core_fetch_board_data_api_n(). Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-20ath10k: move wmi_op_version to struct ath10k_fw_fileKalle Valo
Preparation for testmode.c to use ath10k_core_fetch_board_data_api_n(). Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-20ath10k: move fw_features to struct ath10k_fw_fileKalle Valo
Preparation for testmode.c to use ath10k_core_fetch_board_data_api_n(). Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-20ath10k: move fw_version inside struct ath10k_fw_fileKalle Valo
Preparation for testmode.c to use ath10k_core_fetch_board_data_api_n(). Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-20ath10k: refactor firmware images to struct ath10k_fw_componentsKalle Valo
To make it easier to share ath10k_core_fetch_board_data_api_n() with testmode.c refactor all firmware components to struct ath10k_fw_components. This structure will hold firmware related files, for example firmware-N.bin and board-N.bin. For firmware-N.bin create a new struct ath10k_fw_file which contains the actual firmware image as well as the parsed data from the image. Modify ath10k_core_start() to take struct ath10k_fw_components() as an argument which makes it possible in following patches to drop some ugly hacks from testmode.c. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-20ath10k: remove deprecated firmware API 1 supportKalle Valo
This has ben deprecated years ago, I haven't heard anyone using it since and most likely it won't even work anymore. So just remove all of it. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-19ath9k: remove duplicate assignment of variable ahColin Ian King
ah is written twice with the same value, remove one of the redundant assignments to ah. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-19ath9k: interpret requested txpower in EIRP domainZefir Kurtisi
Tx power limitations at upper layers are interpreted in the EIRP domain. When the user requests a given maximum txpower, e.g. with: 'iw phy0 set txpower fixed 1500', he expects the EIRP to be at or below 15dBm. In ath9k_hw_apply_txpower(), the interpretation is different: the antenna-gain is capped against the current txpower limit in the regulatory, but not against the user set value. It ensures that the resulting EIRP is below the limit defined by the active countrycode, but not below the value the user requested. In a scenario like e.g. a) antenna_gain=6 b) countrycode limits to eirp=18 c) user set txpower=15 this will cause a setting for AR_PHY_POWER_TX_RATE regs resulting in an EIRP > 15. This patch ensures that antenna-gain is considered whenever the txpower limit is adjusted and with that the user set limits are kept. Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-19ath9k_htc: Replace a variable initialisation by an assignment in ↵Markus Elfring
ath9k_htc_set_channel() Replace an explicit initialisation for one local variable at the beginning by a conditional assignment. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Oleksij Rempel <linux@rempel-privat.de> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-19ath10k: add dynamic tx mode switch config support for qca4019Raja Mani
push-pull mode needs certain amount the host driver involvement for managing queues in the host memory and packet delivery to firmware. qca4019 wifi firmware has an option to stay in push mode for less number of active traffic flow and then switch to push-pull mode when the active traffic flow goes beyond the certain limit. The advantage of staying in push mode for less active traffic is, the host cpu consumption is reduced. qca4019 firmware supports this flexibility of the mode switch. It takes the host driver interest (LOW_PERF/HIGH_PERF) via WMI_EXT_RESOURCE_CFG_CMDID, LOW_PERF - fw would stay in push mode and switch to push-pull based on demand. HIGH_PERF - fw would stay in push-pull mode from the boot. To make this configuration generic, new WMI services WMI_SERVICE_TX_MODE_PUSH_ONLY, WMI_SERVICE_TX_MODE_PUSH_PULL, WMI_SERVICE_TX_MODE_DYNAMIC are introduced to take dynamic tx mode switch support availability in firmware. Based on WMI_SERVICE_TX_MODE_DYNAMIC, LOW_PERF or HIGHT_PERF is configured to the firmware. Signed-off-by: Raja Mani <rmani@qti.qualcomm.com> Signed-off-by: Tamizh chelvam <c_traja@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-19ath10k: add some sanity checks to peer_map_event() functionsDan Carpenter
Smatch complains that since "ev->peer_id" comes from skb->data that means we can't trust it and have to do a bounds check on it to prevent an array overflow. Fixes: 6942726f7f7b ('ath10k: add fast peer_map lookup') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-19ath10k: fix rx_channel during hw reconfigureRajkumar Manoharan
Upon firmware assert, restart work will be triggered so that mac80211 will reconfigure the driver. An issue is reported that after restart work, survey dump data do not contain in-use (SURVEY_INFO_IN_USE) info for operating channel. During reconfigure, since mac80211 already has valid channel context for given radio, channel context iteration return num_chanctx > 0. Hence rx_channel is always NULL. Fix this by assigning channel context to rx_channel when driver restart is in progress. Cc: stable@vger.kernel.org Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-19ath10k: fix return value for btcoex and peer stats debugfsMohammed Shafi Shajakhan
Return value is incorrect for btcoex and peer stats debugfs 'write' entries if the user provides a value that matches with the already available debugfs entry, this results in the debugfs entry getting stuck and the operation has to be terminated manually. Fix this by returning the appropriate return 'count' as we do it for other debugfs entries like pktlog etc. Fixes: cc61a1bbbc0e ("ath10k: enable debugfs provision to enable Peer Stats feature") Fixes: c28e6f06ff40 ("ath10k: fix sanity check on enabling btcoex via debugfs") Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-15ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisationOleksij Rempel
by moving common code to ar5008_hw_cmn_spur_mitigate i forgot to move mask_m & mask_p initialisation. This coused a performance regression on ar9281. Fixes: f911085ffa88 ("ath9k: split ar5008_hw_spur_mitigate and reuse common code in ar9002_hw_spur_mitigate.") Reported-by: Gustav Frederiksen <lkml2017@openmailbox.org> Tested-by: Gustav Frederiksen <lkml2017@openmailbox.org> Cc: <stable@vger.kernel.org> # 4.2+ Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-04-14ath10k: fix parenthesis alignmentKalle Valo
Found by checkpatch: drivers/net/wireless/ath/ath10k/mac.c:6800: Alignment should match open parent Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-14ath10k: prefer ether_addr_copy() over memcpy()Kalle Valo
Fixes checkpatch warning: drivers/net/wireless/ath/ath10k/wmi.c:5800: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-14ath10k: prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp()Kalle Valo
Fixes checkpatch warnings: drivers/net/wireless/ath/ath10k/mac.c:452: Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp() drivers/net/wireless/ath/ath10k/mac.c:455: Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp() drivers/net/wireless/ath/ath10k/txrx.c:133: Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp() Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-14ath10k: prefer kernel type 'u64' over 'u_int64_t'Kalle Valo
Fixes checkpatch warnings: drivers/net/wireless/ath/ath10k/htt.h:1477: Prefer kernel type 'u64' over 'u_int64_t' drivers/net/wireless/ath/ath10k/htt.h:1480: Prefer kernel type 'u64' over 'u_int64_t' Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-14ath10k: fix checkpatch warnings related to spacesKalle Valo
Fix checkpatch warnings about use of spaces with operators: spaces preferred around that '*' (ctx:VxV) This has been recently added to checkpatch. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-12ath10k: remove MSI range supportRajkumar Manoharan
MSI-X is never well-tested, might contain bugs and generally isn't really all that useful to maintain. Also ath10k is mainly used with shared/singly-MSI interrupt systems. Hence removing MSI range support. This change will be useful for further cleanup in copy engine lock and to add NAPI support. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-12ath10k: enable set_tsf vdev command to WMI 10.4Peter Oh
10.4 firmware has addeded set_tsf vdev parameter, hence enable it. set_tsf function can be used to shift TBTT that will help avoid its clockdrift which happens when beacons are collided. Signed-off-by: Peter Oh <poh@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-12ath10k: update 10.4 WMI vdev parametersPeter Oh
Update 10.4 WMI vdev param to sync to current 10.4 firmware as of 2/23/2016. Signed-off-by: Peter Oh <poh@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-12ath10k: add a support of set_tsf on vdev interfacePeter Oh
10.2.4.70.24 firmware introduces new feature to set TSF via vdev parameter, hence implement relevant function. set_tsf function can be used to shift TBTT that will help avoid its clockdrift which happens when beacons are collided. Signed-off-by: Peter Oh <poh@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-12ath10k: Document alloc_frag_desc_for_data_pkt config option.Ben Greear
This will help anyone trying to use the ack-rssi reporting feature with the host-specified TX-rate option in 10.4 firmware. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-12cfg80211: remove enum ieee80211_bandJohannes Berg
This enum is already perfectly aliased to enum nl80211_band, and the only reason for it is that we get IEEE80211_NUM_BANDS out of it. There's no really good reason to not declare the number of bands in nl80211 though, so do that and remove the cfg80211 one. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2016-04-11Merge tag 'wireless-drivers-next-for-davem-2016-04-11' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers patches for 4.7 Major changes: iwlwifi * support for Link Quality measurement * more work 9000 devices and MSIx * continuation of the Dynamic Queue Allocation work * make the paging less memory hungry * 9000 new Rx path * removal of IWLWIFI_UAPSD Kconfig option ath10k * implement push-pull tx model using mac80211 software queuing support * enable scan in AP mode (NL80211_FEATURE_AP_SCAN) wil6210 * add basic PBSS (Personal Basic Service Set) support * add initial P2P support * add oob_mode module parameter ==================== Signed-off-by: David S. Miller <davem@davemloft.net>