summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath6kl/wmi.c
AgeCommit message (Collapse)Author
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: fix missing copy of action frame contentsAarthi Thiruvengadam
The wpa_supplicant was receiving incorrect frame contents in the callback function that indicates the status of the frame transmitted. This patch fixes a missing copy of the frame contents to a local buffer. The local buffer keeps track of the last sent management frame. Signed-off-by: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Report unique remain-on-channel cookie valuesJouni Malinen
Even though only a single concurrent remain-on-channel operation is supported, there may be two pending remain-on-channel events (one to indicate end of a canceled operation and another to indicate start of a new operation). User space won't be able to distinguish these events unless unique cookies are used. The previous behavior resulted in wpa_supplicant getting quite confused about the driver's offchannel state in various sequences and this made the P2P state machine behave incorrectly. Use of more than a single remain-on-channel cookie value fixes this. Signed-off-by: Jouni Malinen <jouni@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: Move few more vif specific information to struct ath6kl_vifVasanthakumar Thiagarajan
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Move bssid information to vif structureVasanthakumar Thiagarajan
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Move nw_type to vif structureVasanthakumar Thiagarajan
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Define interface specific statesVasanthakumar Thiagarajan
Currently ar->flag maintains interface stats. Move interface specific states from ar->flag to vif->flags. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Keep wiphy reference in ath6kl structureVasanthakumar Thiagarajan
This is to avoid using ar->wdev to get wiphy pointer, this may need further cleanup for multi vif support. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Add debugfs control for keepalive and disconnection timeoutJouni Malinen
The new debugfs files keepalive and disconnect_timeout can be used to fetch the current values and to change the values for keepalive and disconnect event timeout (both in seconds). Signed-off-by: Jouni Malinen <jouni@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: 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-09-28ath6kl: improve wmi debug messagesKalle Valo
Add a new debug level ATH6KL_DBG_WMI_DUMP and other minor improvements to the wmi debug messages. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-28ath6kl: add prefix parameter to ath6kl_dbg_dump()Kalle Valo
Makes it easier to recognise longs dumps. Obligatory screenshot using "rx" prefix: ath6kl: ath6kl_rx rx 00000000: 10 10 00 00 00 00 08 30 00 00 00 00 00 00 f9 0b .......0........ rx 00000010: 2c 44 08 30 00 00 f9 0b 0c a4 02 00 00 00 73 d2 ,D.0..........s. rx 00000020: 94 00 f9 0b 04 8c 01 00 02 00 07 02 02 00 f9 0b ................ 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: Export beacon interval and DTIM period through STA infoJouni Malinen
Now that we allow the first Beacon frame after each connection to be processed at the host, we can figure out the DTIM period and expose it with Beacon interval through STA info BSS parameters to user space. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-22ath6kl: Update BSS information after connectionJouni Malinen
Since we may end up using a dummy BSS entry when roaming, allow one Beacon frame -based bssinfo from the current BSS to be processed prior to starting to filter all bssinfo events. This allows cfg80211 BSS table to be filled with proper data in the roaming case where the full Beacon data may not have been present at the time of roamed event. 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-22ath6kl: Replace internal node table with cfg80211 BSS tableJouni Malinen
The internal node table in ath6kl was not really used for any useful purpose. It was just used to collect scan results during a scan and then provide them in a burst to cfg80211 at the completion of the scan. There is no point in doing this since cfg80211 is perfectly capable of maintaining the BSS table and the BSS inform messages are sent in separate function calls anyway. This provides more complete information in the cfg80211 BSS table since this allows Beacon and Probe Response frames to be distinguished and IEs from them reported separately. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-09-22ath6kl: Remove deprecated WMI_OPT_RX_FRAME_EVENTID processingJouni Malinen
This event has been deprecated and there is no need for ath6kl to include code for processing it. Signed-off-by: Jouni Malinen <jouni@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-02ath6kl: add firmware log supportKalle Valo
Firmware sends binary logs with WMIX_DBGLOG_EVENTID event. Create a buffer which stores the latest logs and which can be copied from fwlog debugfs file with cp command. To save memory firmware log support is enabled only when CONFIG_ATH6KL_DEBUG is enabled. 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: Report received Action frames to cfg80211Jouni Malinen
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> 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: Report received Probe Request frames to cfg80211Jouni Malinen
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-31ath6kl: Support channel set request for startscan commandEdward Lu
Signed-off-by: Edward Lu <elu@qca.qualcomm.com> Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-31ath6kl: Add cfg80211 calls for remain-on-channel eventsJouni 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>
2011-08-31ath6kl: Use change_station() to authorize/unauthorize STAsJouni Malinen
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-31ath6kl: Delay initial group key setup in AP modeJouni Malinen
The target is not ready to accept addkey commands until the connect event has been delivered, so delay these operations for the initial GTK. In addition, properly set interface connected and mark netdev ready when the AP mode setup has been completed. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-31ath6kl: Add functionality for starting AP modeJouni Malinen
Use cfg80211 add/del_beacon callbacks for starting/stopping AP mode and set_beacon to update AP configuration (mainly, to update Beacon and Probe Response IEs). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-31ath6kl: Add wmi meta data information only it is availableVasanthakumar Thiagarajan
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-31ath6kl: Cleanup ath6kl_wmi_data_hdr_remove()Vasanthakumar Thiagarajan
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09ath6kl: Remove ath6kl_wmi_iterate_nodes()Vasanthakumar Thiagarajan
Use wlan_iterate_nodes() directly. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09ath6kl: Pass only the needed scan_table to ath6kl_wmi_iterate_nodes()Vasanthakumar Thiagarajan
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09ath6kl: Move initialization/deinitialization of scan_table to appropriate ↵Vasanthakumar Thiagarajan
functions By having scan_table in struct ath6kl, it makes sense to move initialization to ath6kl_init() and deinitialization to ath6kl_destroy(). Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09ath6kl: Cleanup parameters of wlan_node_table_init()Vasanthakumar Thiagarajan
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09ath6kl: Remove ath6kl_wmi_get_current_bssid()Vasanthakumar Thiagarajan
Use the bssid from ath6kl directly. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-08-09ath6kl: Remove bssid from struct wmiVasanthakumar Thiagarajan
This is nothing but bssid of struct ath6kl. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>