aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath6kl/wmi.c
AgeCommit message (Collapse)AuthorFilesLines
2015-08-07treewide: fix typos in comment blocksMasahiro Yamada1-2/+2
Looks like the word "contiguous" is often mistyped. Signed-off-by: Masahiro Yamada <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2014-08-26cfg80211: allow passing frame type to cfg80211_inform_bss()Johannes Berg1-34/+9
When using the cfg80211_inform_bss[_width]() functions drivers cannot currently indicate whether the data was received in a beacon or probe response. Fix that by passing a new enum that indicates such (or unknown). For good measure, use it in ath6kl. Acked-by: Kalle Valo <[email protected]> [ath6kl] Acked-by: Arend van Spriel <[email protected]> [brcmfmac] Signed-off-by: Johannes Berg <[email protected]>
2014-08-26cfg80211: remove @gfp parameter from cfg80211_rx_mgmt()Vladimir Kondratiev1-3/+2
In the cfg80211_rx_mgmt(), parameter @gfp was used for the memory allocation. But, memory get allocated under spin_lock_bh(), this implies atomic context. So, one can't use GFP_KERNEL, only variants with no __GFP_WAIT. Actually, in all occurrences GFP_ATOMIC is used (wil6210 use GFP_KERNEL by mistake), and it should be this way or warning triggered in the memory allocation code. Remove @gfp parameter as no actual choice exist, and use hard coded GFP_ATOMIC for memory allocation. Signed-off-by: Vladimir Kondratiev <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-07-14ath6kl: add support wmi rate tables with mcs15Jessica Wu1-4/+65
Some of the firmware versions support rate tables up to mcs15, add support for that. Signed-off-by: Jessica Wu <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2014-07-14ath6kl: convert ar6004 hardware flags to firmware feature flagsKalle Valo1-1/+2
The functionality defined through these flags were actually firmware features which can change between firmware versions. To make it possible to support different firmware versions with the same driver, convert the flags to firmware feature flags. For backwards compatibility support for old ar6004 firmware FW API 3 or smaller images we forcefully set the feature bits in the driver. Starting from FW API 5 the firmware image needs to set them. Signed-off-by: Kalle Valo <[email protected]>
2014-05-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-nextJohn W. Linville1-1/+1
2014-05-19cfg80211: constify more pointers in the cfg80211 APIJohannes Berg1-1/+1
This also propagates through the drivers. The orinoco driver uses the cfg80211 API structs for internal bookkeeping, and so needs a (void *) cast that removes the const - but that's OK because it allocates those pointers. Signed-off-by: Johannes Berg <[email protected]>
2014-03-13ath6kl: use braces on both arms of if statementKalle Valo1-5/+8
Fixes checkpatch warning: CHECK: braces {} should be used on all arms of this statement Signed-off-by: Kalle Valo <[email protected]>
2014-03-13ath6kl: fix blank lines before and after bracesKalle Valo1-6/+0
Fixes checkpatch warnings: CHECK: Blank lines aren't necessary after an open brace '{' CHECK: Blank lines aren't necessary before a close brace '}' Signed-off-by: Kalle Valo <[email protected]>
2014-02-14ath: remove camel case from struct reg_dmn_pair_mappingKalle Valo1-2/+2
Fixes a checkpatch warning in ath10k: drivers/net/wireless/ath/ath10k/mac.c:1636: WARNING: Avoid CamelCase: <regpair->regDmnEnum> Signed-off-by: Kalle Valo <[email protected]>
2013-12-05cfg80211: in bitrate_mask, rename mcs to ht_mcsJanusz Dziedzic1-3/+3
Rename NL80211_TXRATE_MCS to NL80211_TXRATE_HT and also rename mcs to ht_mcs in struct cfg80211_bitrate_mask. Signed-off-by: Janusz Dziedzic <[email protected]> [reword commit message] Signed-off-by: Johannes Berg <[email protected]>
2013-08-23cfg80211: add flags to cfg80211_rx_mgmt()Vladimir Kondratiev1-4/+3
Add flags intended to report various auxiliary information and introduce the NL80211_RXMGMT_FLAG_ANSWERED flag to report that the frame was already answered by the device. Signed-off-by: Vladimir Kondratiev <[email protected]> [REPLIED->ANSWERED, reword commit message] Signed-off-by: Johannes Berg <[email protected]>
2013-03-18ath6kl: add an extra band check to ath6kl_wmi_beginscan_cmd()Kalle Valo1-0/+3
Dan reported that smatch found a possible issue in ath6kl_wmi_beginscan_cmd() where we might access sc->supp_rates beyond the end. It shouldn't happen as ar->wiphy->bands always have just the first two bands set, but add an extra check just to be sure. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2013-03-18ath6kl: add tracing support and tracing points for wmi packetsKalle Valo1-0/+3
Add basic tracing infrastructure support to ath6kl and which can be enabled with CONFIG_ATH6KL_TRACING. Signed-off-by: Kalle Valo <[email protected]>
2013-02-15Merge branch 'for-linville' of git://github.com/kvalo/ath6klJohn W. Linville1-8/+20
2013-02-11cfg80211: pass wiphy to cfg80211_ref_bss/put_bssJohannes Berg1-1/+1
This prepares for using the spinlock instead of krefs which is needed in the next patch to track the refs of combined BSSes correctly. Acked-by: Bing Zhao <[email protected]> [mwifiex] Signed-off-by: Johannes Berg <[email protected]>
2012-11-27ath6kl: Parse beacon interval from userspaceMohammed Shafi Shajakhan1-0/+17
Parse beacon interval from userspace to firmware. Incase the firmware does not supports it, just print a warning message and continue with AP settings. Cc: Sumathi Mandipati <[email protected]> Signed-off-by: Mohammed Shafi Shajakhan <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-11-27ath6kl: remove unnecessary check for NULL skbMohammed Shafi Shajakhan1-8/+3
dev_kfree_skb kernel API itself takes for checking for NULL skb, so an explicit check is not required. Signed-off-by: Mohammed Shafi Shajakhan <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-11-26Merge branch 'for-john' of ↵John W. Linville1-3/+2
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2012-11-26cfg80211: remove remain-on-channel channel typeJohannes Berg1-3/+2
As mwifiex (and mac80211 in the software case) are the only drivers actually implementing remain-on-channel with channel type, userspace can't be relying on it. This is the case, as it's used only for P2P operations right now. Rather than adding a flag to tell userspace whether or not it can actually rely on it, simplify all the code by removing the ability to use different channel types. Leave only the validation of the attribute, so that if we extend it again later (with the needed capability flag), it can't break userspace sending invalid data. Signed-off-by: Johannes Berg <[email protected]>
2012-10-24ath6kl: Rename ATH6KL_HW_FLAG_64BIT_RATESMohammed Shafi Shajakhan1-1/+1
Rename ATH6KL_HW_FLAG_64BIT_RATES to ATH6KL_HW_64BIT_RATES. This seemed to be necessary to add/use new hardware flags without exceeding 80 lines. We shall be adding new hw flags dropping the FLAG term. Signed-off-by: Mohammed Shafi Shajakhan <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-10-24ath6kl: Check for valid rate table indexRaja Mani1-0/+3
There are 28 items defined in rate table array 'wmi_rate_tbl'. The rate table index (reply->rate_index) in ath6kl_wmi_bitrate_reply_rx() func is not checked for the valid max limit index before accessing rate table array. There may be some incidents to get memory crashes without safe max check. Fix this. Found this on code review. Signed-off-by: Raja Mani <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-10-24ath6kl: Avoid null ptr dereference while printing reg domain pairRaja Mani1-2/+6
Return value of ath6kl_get_regpair() is stored in 'regpair' in ath6kl_wmi_regdomain_event() func and it's directly accessed in the debug prints without checking for NULL value. There are situation to get NULL pointer as a return value from ath6kl_get_regpair() func. Fix this. Found this on code review. Signed-off-by: Raja Mani <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-10-24ath6kl: Add support to detect fw error through heart beatVasanthakumar Thiagarajan1-0/+14
This patch adds support to detect fw error condition by sending periodic message (heart beat challenge) to firmware. Upon reception of the message, fw would send a response event to driver. When there are no reponses from fw for about 5 cmd driver would trigger the recovery logic assuming that fw has gone into an error state. Capable fw will advertise this capability through ATH6KL_FW_CAPABILITY_HEART_BEAT_POLL bit. This feature is disabled by default, can be enabled through a modparam (heart_beat_poll). This modparam also confiures the polling interval in msecs. Signed-off-by: Vasanthakumar Thiagarajan <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-10-24ath6kl: fix link speed when using sgiDengke Qiu1-1/+12
The MSB of rate index from FW is used for sgi. But the ath6kl_wmi_get_rate doesn't handle it. The access to wmi_rate_tbl array may be out of range if sgi is 1. This may cause the return value of ath6kl_wmi_get_rate() function is incorrect link rate. We add sgi adjustment to avoid such case. kvalo: change patch title Signed-off-by: Dengke Qiu <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-10-24ath6kl: rework scheduled scanThomas Pedersen1-1/+22
This patch reflects changes in the firmware scheduled scan implementation to behave better in cases with multiple concurrent vifs. Major changes: - scheduled scan filters and state are now programmed per-vif. - decouple scheduled scan from host sleep. To maintain graceful failure with old firmwares, a new firmware capability bit is introduced: ATH6KL_FW_CAPABILITY_SCHED_SCAN_V2. ath6kl simply won't advertise scheduled scan to cfg80211 if the SCHED_SCAN_V2 is not supported. Since firmwares from here on out won't support the previous implicit API for scheduled scan (set WoW filters and host sleep), bump the firmware API to protect old drivers. Unfortunately, due to firmware RAM constraints ath6kl still cannot expect a scan complete event at the end of a scheduled scan results cycle, so the sched_scan_timer is retained. Signed-off-by: Thomas Pedersen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-10-24ath6kl: Fix potential skb double free in ath6kl_wmi_sync_point()Vasanthakumar Thiagarajan1-16/+19
skb given to ath6kl_control_tx() is owned by ath6kl_control_tx(). Calling function should not free the skb for error cases. This is found during code review. kvalo: fix a checkpatch warning in ath6kl_wmi_cmd_send() Signed-off-by: Vasanthakumar Thiagarajan <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-10-24ath6kl: fix incorrect use of IEEE80211_NUM_BANDSKalle Valo1-4/+8
ath6kl was incorrectly assuming that IEEE80211_NUM_BANDS will always be 2 and used that also in the firmware WMI interface definitions. But after the support for 60 GHz was added to cfg80211 IEEE80211_NUM_BANDS changed to 3 and this can cause all sort of problems, possibly even memory corruption. I only found this during code review and didn't notice any bugs, but I'm sure there are a few lurking somewhere. To fix this rename unused A_NUM_BANDS to ATH6KL_NUM_BANDS, which is always defined to be 2, and use that in WMI. Signed-off-by: Kalle Valo <[email protected]>
2012-10-24ath6kl: add support for changing contry codeKalle Valo1-0/+17
To make it possible to change the country code from user space via nl80211 add handler for reg_notifier. The feature is only enabled when built time option CONFIG_ATH6KL_REGDOMAIN is enabled, which again depends on CFG80211_CERTIFICATION_ONUS for certication purposes. Signed-off-by: Kalle Valo <[email protected]>
2012-10-24ath6kl: refactor wmi scan commandKalle Valo1-5/+20
ATH6KL_FW_CAPABILITY_STA_P2PDEV_DUPLEX was checked in cfg80211.c which is a bit awkward when adding more callsites to the scan functions. Refactor the code to wmi.c so that it's transparent to the callers. Signed-off-by: Kalle Valo <[email protected]>
2012-10-24ath6kl: move ath6kl_wmi_startscan_cmd()Kalle Valo1-44/+44
To make it easier to refactor the scan commands move ath6kl_wmi_startscan_cmd() before the beginscan function. No functional changes. Signed-off-by: Kalle Valo <[email protected]>
2012-10-24ath6kl: support TX error rate notificationThomas Pedersen1-0/+47
The ath6kl firmware can monitor a connection and report when a certain TX failure threshold is crossed. Support this configuration and event reporting on compatible firmwares. Signed-off-by: Thomas Pedersen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-10-24ath6kl: support rssi threshold for sched scanThomas Pedersen1-0/+18
The ath6kl firmware can filter scan results based on rssi. This is useful to limit hosts wakeups on scheduled scans. Signed-off-by: Thomas Pedersen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-07-09cfg80211: use wdev in mgmt-tx/ROC APIsJohannes Berg1-5/+5
The management frame and remain-on-channel APIs will be needed in the P2P device abstraction, so move them over to the new wdev-based APIs. Userspace can still use both the interface index and wdev identifier for them so it's backward compatible, but for the P2P Device wdev it will be able to use the wdev identifier only. Signed-off-by: Johannes Berg <[email protected]>
2012-06-11ath6kl: support changing dtim period on AP modeEtay Luz1-0/+16
This patch adds support for dtim_period configuration in beacon. kvalo: add a comment about ignoring the error, use vif_idx, add \n to the warning message Signed-off-by: Etay Luz <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-05-29ath6kl: Remove unneeded memset in roam related config funcRaja Mani1-2/+0
No need to clear requested memory after allocating new SKB with help of ath6kl_wmi_get_new_buf(). This clear part is already taken care in ath6kl_wmi_get_new_buf(). Found this on code review. Signed-off-by: Raja Mani <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-05-24ath6kl: Add support for setting tx rateset.Bala Shanmugam1-0/+109
Tx legacy and mcs rateset can configured using iw for 2.4 and 5 bands. Add support for the same in driver. kvalo: add an enum for the hw flags and rename the flag accordingly, rename ath6kl_cfg80211_set_bitrate_mask() to a shorter version to make it easier to indent Signed-off-by: Bala Shanmugam <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-05-16ath6kl: enable enhanced bmiss detectionThomas Pedersen1-0/+19
Enable enhanced bmiss detection if the firmware supports it. This feature is only enabled on some firmwares since it comes with a power cost. Also add a few missing command ids to keep the enums straight. kvalo: fix a compiler with ath6kl_err(), add few empty lines Signed-off-by: Thomas Pedersen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-05-11ath6kl: Use correct max-scan-SSIDs limitJouni Malinen1-1/+1
The currently used firmware images support 16 SSIDs in the scan request (indexes 0..15), so update the host driver to use the same limit to allow some more SSIDs to be scanned per request. In addition, change the max-index to max-SSIDs to make it easier to understand the implementation and fix couple of off-by-one checks that could limit the maximum number of entries too strictly. Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-05-04ath6kl_sdio: Fix the EAPOL out of order issueVivek Natarajan1-0/+7
Send the EAPOL and management frames in the same AC_VO queue. The issue happens when the AP supports QOS, the management frames are sent to AC_VO queue and EAP frame goes to AC_BE queue. Even though the EAP frame is queued before the DEAUTH management frame, as they are queued on different h/w queues, order of delivery between these frames cannot be controlled. This fixes the connection failure seen in P2P case. Signed-off-by: Vivek Natarajan <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-04-25ath6kl: check for sband existence when creating scan cmdThomas Pedersen1-5/+10
The patch "ath6kl: support fw reporting phy capabilities" gave the firmware the ability to disable certain wiphy supported bands. Check if this is the case in ath6kl_wmi_beginscan_cmd to avoid dereferencing a NULL pointer. kvalo: change the patch so that there's no code between declarations Signed-off-by: Thomas Pedersen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-04-25ath6kl: include in.h explicitlyLuis R. Rodriguez1-0/+1
Do not assume anyone before us includes it for us. Signed-off-by: Luis R. Rodriguez <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-04-23ath6kl: support fw reporting phy capabilitiesThomas Pedersen1-1/+1
Currently the supported bands are just hard coded in the driver. However, the ath6kl FW will include its 11n and band capabilites in a WMI_READY event. Handle this and report capabilites to cfg80211 accordingly. Signed-off-by: Thomas Pedersen <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-04-16ath6kl: merge split format strings into oneKalle Valo1-31/+38
Found by checkpatch: WARNING: quoted string split across lines Signed-off-by: Kalle Valo <[email protected]>
2012-04-09ath6kl: Fix 4-way handshake failure in AP and P2P GO modeVasanthakumar Thiagarajan1-0/+23
RSN capability field of RSN IE which is generated (which is what really advertised in beacon/probe response) differs from the one generated in wpa_supplicant. This inconsistency in rsn IE results in 4-way handshake failure. To fix this, configure rsn capability used in wpa_supplicant in firmware using a new wmi command, WMI_SET_IE_CMDID. There is a bit (ATH6KL_FW_CAPABILITY_RSN_CAP_OVERRIDE) in fw_capabilities to advertise this support to driver. Signed-off-by: Subramania Sharma <[email protected]> Signed-off-by: Vasanthakumar Thiagarajan <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-04-09ath6kl: Configure htcap in fw based on the channel type in AP modeVasanthakumar Thiagarajan1-0/+37
This patch disables HT in start_ap if the type of the channel on which the AP mode is going to be operating is non-HT. HT is enabled with default ht cap setting if the operating channel is going to be 11n. Signed-off-by: Vasanthakumar Thiagarajan <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-03-26ath6kl: Configure inactivity timeout in fwVasanthakumar Thiagarajan1-0/+17
Configure the inactivity timeout passed in start_ap() to firmware. This capability is advertised only when fw supports it, there is a new bit (ATH6KL_FW_CAPABILITY_INACTIVITY_TIMEOUT) in firmware capability ie for driver to learn fw's capability. After the fw finds out the station is inactive, it will probe the station with null func frames. By default, the timeout is 10 secs. Signed-off-by: Vasanthakumar Thiagarajan <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-03-26Merge remote branch 'wireless-next/master' into ath6kl-nextKalle Valo1-2/+4
2012-03-20ath6kl: add debug log for AP MLME operationsAarthi Thiruvengadam1-0/+3
This is useful during debugging to check if disconnect commands were issued by the host. Signed-off-by: Aarthi Thiruvengadam <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2012-03-13Merge branch 'for-linville' of git://github.com/kvalo/ath6klJohn W. Linville1-122/+185