summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath6kl/wmi.h
AgeCommit message (Collapse)Author
2012-03-07ath6kl: fix too long linesKalle Valo
Found by checkpatch: drivers/net/wireless/ath/ath6kl/init.c:78: WARNING: line over 80 characters drivers/net/wireless/ath/ath6kl/init.c:397: WARNING: line over 80 characters drivers/net/wireless/ath/ath6kl/init.c:407: WARNING: line over 80 characters drivers/net/wireless/ath/ath6kl/htc.c:189: WARNING: line over 80 characters drivers/net/wireless/ath/ath6kl/htc.c:704: WARNING: line over 80 characters drivers/net/wireless/ath/ath6kl/htc.c:2452: WARNING: line over 80 characters Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-03-07ath6kl: document all spinlocksKalle Valo
Also fixes quite a few checkpatch warnings like this: ath6kl/hif.h:226: CHECK: spinlock_t definition without comment Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-03-07ath6kl: Set optimal listen intvl,bmiss,scan params while going to wow suspendRaja Mani
* In order to save the target power in WOW suspend state, configure the best optimal values for the below parameters, - listen interval. - beacon miss interval. - scan parameters. Default values for above attributes are reverted in wow resume operation. * The default listen interval is set before the host issue connect request. * New function is added to configure beacon miss count. kvalo: minor changes to fix open parenthesis alignment Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-03-01ath6kl: implement hidden ssidThomas Pedersen
The ath6kl FW does not distinguish between different types of hidden SSIDs (empty or null), so treat all cfg80211 requests for hidden ssid the same. Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-02-27ath6kl: Add unicast mgmt frame bufferingNaveen Gangadharan
PS buffering of unicast Action frames that are sent in a context of a BSS. In AP mode when the recepient station goes to powersave and PS_POLL flag is not set, we would buffer the frames. Send out unicast mgmt bufferred frame when PS_POLL is received. This fixes a bug in P2P GO behavior when sending a GO Discoverability Request to a client that is in sleep mode. kvalo: indentation fixes Signed-off-by: Thirumalai Pachamuthu <tpachamu@qca.qualcomm.com> Signed-off-by: Naveen Gangadharan <ngangadh@qca.qualcomm.com> Signed-off-by: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-02-08ath6kl: Update license headerVasanthakumar Thiagarajan
Update license header with the copyright to Qualcomm Atheros, Inc. for the year 2011-2012. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-30ath6kl: Wait for host sleep mode cmd processed event during WOW suspendRaja Mani
For every WMI_SET_HOST_SLEEP_MODE_CMDID command (send from the host), the firmware sends WMI_SET_HOST_SLEEP_MODE_CMD_PROCESSED_EVENTID as an acknowledgement to the host. In order to being sync with the firmware, the host has to wait for WMI_SET_HOST_SLEEP_MODE_CMD_PROCESSED_EVENT event before going to the suspend state. This patch ensures ath6kl_wow_suspend() waits until it gets this event after sending set host sleep mode command. This patch adds, * New command WMI_SET_HOST_SLEEP_MODE_CMD_PROCESSED_EVENTID in WMI event table. * New WMI function ath6kl_wmi_host_sleep_mode_cmd_prcd_evt_rx() to process the event. * New flag HOST_SLEEP_MODE_CMD_PROCESSED in VIF flags to record the arrival of the event. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-30ath6kl: Configure WOW patterns while going to wow_suspendRaja Mani
First preference is given to the user configured WOW patterns. If the user doesn't configure any patterns (for ex, via iw command), the default patterns will be configured based on the current mode (vif->nw_type) while going to WOW suspend. Summary of changes: * ath6kl_wow_ap() is added to configure the below default patterns when the system enters into WOW suspend in AP mode. + Unicast IP, EAPOL-like and ARP packet pattern + ARP packet pattern + mDNS/SSDP/LLMNR pattern + DHCP broadcast pattern * ath6kl_wow_sta() is added to configure the below default patterns when the system enters into WOW suspend in STA mode. + Unicast packet pattern + mDNS/SSDP/LLMNR pattern * Move the user provided WOW patterns configuration code from ath6kl_wow_suspend() to a separate function called ath6kl_wow_usr(). * Two argument variable's ('filter' and 'mask) data type in ath6kl_wmi_add_wow_pattern_cmd() are changed from 'u8 *' to 'const u8 *'. This is needed to make all pattern and mask arrays to be 'static const u8' in the caller function. * New conditional check is added to make sure user configured pattern count is within the limit (WOW_MAX_FILTERS_PER_LIST). Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-13ath6kl: Add support for uAPSDThirumalai Pachamuthu
* A new APSD power save queue is added in the station structure. * When a station has APSD capability and goes to power save, the frame designated to the station will be buffered in APSD queue. * When the host receives a frame which the firmware marked as trigger, host delivers the buffered frame from the APSD power save queue. Number of frames to deliver is decided by MAX SP length. * When a station moves from sleep to awake state, all frames buffered in APSD power save queue are sent to the firmware. * When a station is disconnected, all frames bufferes in APSD power save queue are dropped. * When the host queues the first frame to the APSD queue or removes the last frame from the APSD queue, it is indicated to the firmware using WMI_AP_APSD_BUFFERED_TRAFFIC_CMD. kvalo: fix buggy handling of sks queues, made it more obvious the user priority when wmm is disabled, remove unneed else block and combined some variable declarations Signed-off-by: Thirumalai Pachamuthu <tpachamu@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-09ath6kl: Add a function in wmi.c to add/delete a multicast filterVasanthakumar Thiagarajan
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
2012-01-09ath6kl: Add a function in wmi to send WMI_MCAST_FILTER_CMDIDVasanthakumar Thiagarajan
This will be used to disable/enable multicast receive. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
2012-01-02ath6kl: Remove redundant key_index check.Vivek Natarajan
Less-than-zero comparison of an unsigned value is never true. kvalo: remove WMI_MIN_KEY_INDEX altogether, it's useless Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2012-01-02ath6kl: Support for TCP checksum offload to firmwareRishi Panjwani
The change enables offloading TCP checksum calculation to firmware. There are still some issues with the checksum offload so better to disable it by default until the issues are resolved. To enable TCP checksum offload for tx and rx paths, use the ethtool as follows: ethtool -K <interface> tx on ethtool -K <interface> rx on To disable TCP checksum offload, for tx and rx paths, use the ethtool as follows: ethtool -K <interface> tx off ethtool -K <interface> rx off kvalo: indentation changes Signed-off-by: Rishi Panjwani <rpanjwan@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-12-23ath6kl: Avoid taking struct as argument in ath6kl_wmi_set_ip_cmdRaja Mani
In this way, caller is free to pass only the value of IP addr to configure. In addition to this, * 'ips' variable data type in struct wmi_set_ip_cmd is changed from __le32 to __be32 in order to match network byte order. * ipv4_is_multicast() is used to validate multicast ip addr. * New argument if_idx is added to supply correct vif index to ath6kl_wmi_cmd_send(). This will be used in the next patch. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Thirumalai Pachamuthu <tpachamu@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-12-14ath6kl: support for P2P mgmt operations on station interfaceAarthi Thiruvengadam
This patch enables support for doing P2P management operations like device discovery on top of a station interface. After group formation, the station interface will become a P2P GO/client interface as the case may be. This feature requires modifications to a couple of existing WMI structures and therefore new command ids and structures have been defined in order to be compatible with older firmware versions and other chips. The exception here is the wmi_connect_cmd. Adding a new field to the end of the structure will not cause any issues with previous firmware versions since firmware only checks for minimum length of the command. The other structures are of variable length, hence it was not possible to add new fields to the end. The new command ids have to be added to the end of enum wmi_cmd_id, so it has updated to match the firmware. The driver will support both the 'old' and the 'new' commands for a while by checking the firmware capabilities. Signed-off-by: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-12-13ath6kl: implement scheduled scanKalle Valo
ath6kl firmware supports scheduled scan functionality with the wow ssid filter. But the firmware does not send any events after scan results so I had to add a timer which notifies about new scan results. Sched scan needs firmware version 3.2.0.6 or later. If firmware doesn't support sched scan the driver will not enable the feature. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-12-13ath6kl: fix value of WOW_FILTER_SSIDKalle Valo
According to the firmware engineers WOW_FILTER_SSID is actually the second bit, not the first. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-24ath6kl: Increase the maximum number of connections in AP modeVasanthakumar Thiagarajan
The maximum number of clients which ath6kl can support in AP mode is 10. The limitation of 8 connections is only for older chipsets which ath6kl does not support. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-24ath6kl: remove unused sc_params from struct ath6klKalle Valo
It was only initialised but not used anywhere. Also remove two defines which ended up unused after this change. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Remove few unused WMI stuffRaja Mani
* Removed unused WOW_MAX_FILTER_LISTS macro. * Removed empty ath6kl_wmi_get_wow_list_event_rx() function. List of configured WOW patterns are maintained in CFG layer itself. No need to have this function in ath6kl to get configured WOW pattern list. It can added later if we need it for debugging. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Add wmi functions to configure WOW mode and host sleep modeRaja Mani
It will be used in WOW suspend/resume functions to active/deactivate WOW suspend mode. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Add wmi functions to add/delete WOW patternsRaja Mani
These commands will be used in WOW suspend/resume functions to configure WOW parameters like patterns to be matched and it's mask value, etc. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Fix key configuration to copy at most seq_len from seqJouni Malinen
There is no guarantee on the caller using 8-octet buffer for key->seq, so better follow the key->seq_len parameter on figuring out how many octets to copy. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Remove unused WMI crypto definesJouni Malinen
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: add aborted parameter to ath6kl_cfg80211_scan_complete_event()Kalle Valo
Currently it takes an error code as status, but what we really want to tell is if the scan was aborted or not. Also fix a bug where we were comparing firmware scan status values with kernel error codes, which is obviously wrong. This meant that ath6kl didn't detect when firmware informed about failed scans. I doubt that this fix doesn't make any difference in practise but it still needs to be fixed. This is fixed by adding an enum for the success status code and checking for that. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: rename ath6kl_wmi_qos_state_init() to _wmi_reset()Kalle Valo
Just to make it more clear that this function is supposed to reset wmi related variables. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: add support for WPSAarthi Thiruvengadam
Add control flag CONNECT_WPS_FLAG if a WPS IE is present in the Association Request IEs. This flag is needed when the station must connect to a WPS-enabled AP. Signed-off-by: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Initialize target wlan values for every vifVasanthakumar Thiagarajan
Wlan parameters need to be configured for every vif in target. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Maintain virtual interface in a listVasanthakumar Thiagarajan
This patch removes all references to ar->vif and takes vif from a list. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Use interface index from wmi data headrVasanthakumar Thiagarajan
Interface index is passed in wmi data header as well, use it to get the corresponding vif structure. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Take vif information from wmi eventVasanthakumar Thiagarajan
Interface index is passed in wmi command header from target. Use this index to get the appropriate vif. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Maintain firmware interface index in struct ath6kl_vifVasanthakumar Thiagarajan
Pass this index to target in wmi commands to specify the interface for which the command needs to be handled. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Add debugfs files for roaming controlJouni Malinen
Roaming mode can be changed by writing roam mode (default, bssbias, or lock) to roam_mode. Forced roam can be requested by writing the BSSID into force_roam. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Add debugfs file for target roam tableJouni Malinen
The new roam_table debugfs file can be used to display the current roam table from the target. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: fix struct host_app_area endian handlingKalle Valo
It was missing endian annotation. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: remove unused parameters from struct wmiKalle Valo
There's no use for these, at least right now, so better to remove them. If some of them are ever needed, we can always add them back. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: make sure WLAN power save is enabled during suspendChilam Ng
Power save is enabled during ath6kl init. But when user space disables power save, the system will go into suspend with power save disabled. The ath6kl driver will now explicitly enable power save prior to entering suspend and restore its previous setting upon resume Signed-off-by: Chilam Ng <chilamng@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-22ath6kl: Report PMKSA candidate events through cfg80211Jouni Malinen
This allows RSN pre-authentication to be used when roaming decisions are done in the target. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-22ath6kl: Remove unnecessary bssinfo event header conversionJouni Malinen
There is no point in unconditionally converting the bssinfo header to the old version since only the new header is being used and the driver can as well read the values from it when needed. Leaving out the conversion saves some extra memory copying. In addition, use the calculated "rssi" value snr - 95 dBm to get the proper value in cfg80211 BSS table (i.e., something that more or less matches with the value used in STA info). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-22ath6kl: Remove the unused node table implementationJouni Malinen
Now that the scan results are reported directly to the cfg80211 BSS table there is no need for maintaining this internal node table implementation for scan results. Remove the definitions and node table functions. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-16ath6kl: Remove auth type fall back in auto authentication modeVasanthakumar Thiagarajan
Target already tries with different authentication mechanism when authentication type is configured to NL80211_AUTHTYPE_AUTOMATIC. Remove this piece of code from driver. Having this code in driver even affects auto + WEP authentication in some cases. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-06ath6kl: Process regulatory requests from firmware.Vivek Natarajan
Process the regulatory code from eeprom and pass the country information to cfg80211. kvalo: add space between struct name and * Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-06ath6kl: Fix AP mode connect event parsing and TIM updatesJouni Malinen
This cleans up the connect event parsing by defining a union in struct wmi_connect_event to match with the three possible sets of fields that the target uses depending on which type of connect event is being indicated. In addition, two AP cases are now separated from ath6kl_connect_event() so that correct field names can be used to make it actually possible to understand what the code is doing. The bug hiding in the previous mess was in parsing the AID incorrectly when processing the new station connecting event in AP mode. The fix here for that is also fixing TIM updates for PS buffering to use the correct AID. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-06ath6kl: Fix WMI message structure for AP_SET_PVBJouni Malinen
There is a 2-octet reserved field between the flag and aid fields. Fix that to make the target actually behave as requested. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-02ath6kl: Add debugfs entry to modify roaming parameters.Vivek Natarajan
Firmware initiates roaming only after it reaches a rssi of 20. This lower rssi threshold can be modified through a wmi command to modify the roaming behavior. kvalo: rename debugfs functions and move comment about rssi units next to ath6kl_wmi_set_roam_lrssi_cmd() Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-02ath6kl: implement support to set firmware log parametersKalle Valo
Firmware log parameters can be controlled now with help of fwlog_mask debugfs file. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-01ath6kl: add testmode supportKalle Valo
This is port from the staging version of ath6kl. The interface to user space is exactly same. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-31ath6kl: Notify cfg80211 of TX status of mgmt_tx framesJouni Malinen
Use WMI_TX_STATUS_EVENTID event to generate cfg80211_mgmt_tx_frame() calls. Since we support only a single pending frame for now, use the hardcoded cookie value 1 and store a copy of the pending frame in the driver. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-31ath6kl: Use set_appie command to add Probe Request IEsJouni Malinen
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-31ath6kl: Add new WMI commands and events for P2PJouni Malinen
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>