aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/main.c
Commit message (Collapse)AuthorAge
...
* ath6kl: Indicate WAPI IE from (Re)Association Request frameDai Shuibing2011-11-13
| | | | | | | | | This is needed to know whether the STA requests WAPI to be used and if so, with what AKM and cipher. Signed-off-by: Dai Shuibing <shuibing@qca.qualcomm.com> Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Fix key configuration to copy at most seq_len from seqJouni Malinen2011-11-11
| | | | | | | | | 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>
* ath6kl: don't power down hardware when interface is downKalle Valo2011-11-11
| | | | | | | | | | | | | | Jouni reported that my patch "ath6kl: power down hardware when interface is down" caused a regression on his x86 boxes and scan didn't work anymore. I was able to reproduce the problem by disabling all debug messages. So there has to be a race condition somewhere in the code and disable the functionality until the race is fixed. Now hardware is powered from the point where module is loaded until it's removed. Reported-by: Jouni Malinen <jouni@qca.qualcomm.com> Tested-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Fix lockdep warningVasanthakumar Thiagarajan2011-11-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following is the lockdep warning which detects possible deadlock condition with the way ar->lock and ar->list_lock are being used. (&(&ar->lock)->rlock){+.-...}, at: [<ffffffffa0492d13>] ath6kl_indicate_tx_activity+0x83/0x110 [ath6kl] but this lock took another, SOFTIRQ-unsafe lock in the past: (&(&ar->list_lock)->rlock){+.+...} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&(&ar->list_lock)->rlock); local_irq_disable(); lock(&(&ar->lock)->rlock); lock(&(&ar->list_lock)->rlock); <Interrupt> lock(&(&ar->lock)->rlock); *** DEADLOCK *** softirqs have to be disabled when acquiring ar->list_lock to avoid the above deadlock condition. When the above warning printed the interface is still up and running without issue. Reported-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: implement ath6kl_cfg80211_suspend()Kalle Valo2011-11-11
| | | | | | | | | | | | This is in preparation for cutpower suspend feature. HIF layer makes the decision based on information provided by cfg80211 and what hardware actually supports. Then it calls ath6kl_cfg80211_suspend() to enable the chosen mode. Functionality should be the same, this is just preparation for more suspend modes (cutpower and wow). Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: create ath6kl_cfg80211_stop()Kalle Valo2011-11-11
| | | | | | | Just take code from deep sleep for now, will be improved later. No functional changes. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: add aborted parameter to ath6kl_cfg80211_scan_complete_event()Kalle Valo2011-11-11
| | | | | | | | | | | | | | 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>
* ath6kl: fix WLAN_ENABLE usage in ath6kl_close()Kalle Valo2011-11-11
| | | | | | | If ath6kl_init_hw_stop() failed with an error WLAN_ENABLED would not be cleared. Found during code review and just a theoretical issue. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: power down hardware when interface is downKalle Valo2011-11-11
| | | | | | | | | | | The benefit from this is that user space can control hardware's power state by putting interface up and down. This is handy if firmware gets to some weird state. The downside will be that putting interface up takes a bit longer, I was measuring ~500 ms during interface up. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: remove unused debug levelsKalle Valo2011-11-11
| | | | | | Few levels had only one user so I changed them to use WLAN_CFG. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: move all credit distribution code to htc.cKalle Valo2011-11-11
| | | | | | | | As htc is the only user there's no reason to keep it in main.c. No functional changes. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: rename struct htc_credit_state_info to ath6kl_htc_credit_infoKalle Valo2011-11-11
| | | | | | Also rename cred_dist_cntxt to credit_info in struct htc_target. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: use ath6kl prefix in credit functionsKalle Valo2011-11-11
| | | | | | | This is to follow the common style in the driver. Also add braces to fix a style issue. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Use the other variant of netdev (un)register APIsVasanthakumar Thiagarajan2011-11-11
| | | | | | | | | Use replace (un)register_netdev() with (un)register_netdevice() so that the same ath6kl function can be used with add_virtual_intf()/del_virtual_intf(). Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Maintain virtual interface in a listVasanthakumar Thiagarajan2011-11-11
| | | | | | | | 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>
* ath6kl: Introduce spinlock to protect vif specific informationVasanthakumar Thiagarajan2011-11-11
| | | | | | | | Use this spinlock to protect the vif's data instead of one from ath6kl. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Store hw mac address in struct ath6klVasanthakumar Thiagarajan2011-11-11
| | | | | | | | | WMI ready event gives the mac address, cache this mac address in struct ath6kl so that it can be used to compute the mac address for other vif in case of multi vif. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Use interface index from wmi data headrVasanthakumar Thiagarajan2011-11-11
| | | | | | | | 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>
* ath6kl: Refactor ath6kl_destroy()Vasanthakumar Thiagarajan2011-11-11
| | | | | | | So that the deinitialization of ath6kl and vif are separated. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Cleanup parameters in ath6kl_init_control_info() and ↵Vasanthakumar Thiagarajan2011-11-11
| | | | | | | | | | ath6kl_init_profile_info() Pass vif structure to those functions instead of ath6kl because these functions do vif specific information initialization. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Remove net_device from ath6klVasanthakumar Thiagarajan2011-11-11
| | | | | | | Use one which is available in vif structure instead. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Take vif information from wmi eventVasanthakumar Thiagarajan2011-11-11
| | | | | | | | 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>
* ath6kl: Maintain firmware interface index in struct ath6kl_vifVasanthakumar Thiagarajan2011-11-11
| | | | | | | | 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>
* ath6kl: Make net and target stats vif specificVasanthakumar Thiagarajan2011-11-11
| | | | | Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Move few more vif specific information to struct ath6kl_vifVasanthakumar Thiagarajan2011-11-11
| | | | | Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Move scan_req info and sme_state to vifVasanthakumar Thiagarajan2011-11-11
| | | | | Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Move disconnect timer to vif structureVasanthakumar Thiagarajan2011-11-11
| | | | | Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Move aggregation information to vif structureVasanthakumar Thiagarajan2011-11-11
| | | | | Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Move key information to vif structureVasanthakumar Thiagarajan2011-11-11
| | | | | Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Move channel information to vif structureVasanthakumar Thiagarajan2011-11-11
| | | | | Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Move bssid information to vif structureVasanthakumar Thiagarajan2011-11-11
| | | | | Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Move nw_type to vif structureVasanthakumar Thiagarajan2011-11-11
| | | | | Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Move ssid and crypto information to vif structureVasanthakumar Thiagarajan2011-11-11
| | | | | Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Define interface specific statesVasanthakumar Thiagarajan2011-11-11
| | | | | | | | 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>
* ath6kl: Keep wiphy reference in ath6kl structureVasanthakumar Thiagarajan2011-11-11
| | | | | | | | 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>
* ath6kl: make sure WLAN power save is enabled during suspendChilam Ng2011-11-11
| | | | | | | | | | 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>
* ath6kl: Replace spin_lock_irqsave with spin_lock_bhVasanthakumar Thiagarajan2011-11-11
| | | | | | | | | | | It is not necessary to use spinlock primitive to protect data which is accessed in hard irq context as nothing is running in hard irq with this driver. The spinlock primitive meant to protect data in softirq context is more appropriate. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Update BSS information after connectionJouni Malinen2011-09-22
| | | | | | | | | | | 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>
* ath6kl: Remove unnecessary node table update on disconnect eventJouni Malinen2011-09-22
| | | | | | | | | Since ath6kl does not actually update cfg80211 BSS table when this event occurs, there is not much need for removing the entries from the internal table that is not really used or exposed. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Remove RSSI update for internal node tableJouni Malinen2011-09-22
| | | | | | | | | ath6kl does not actually update cfg80211 BSS table when this update occurs, so there is not much need in updating the internal table that is not used or exposed. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Fix static WEP configuration in AP modeJouni Malinen2011-09-19
| | | | | | | | | | Configuration of the WEP keys needs to be delayed until the AP mode has been properly started at the target. Partial support for delaying the WEP key configuration was already in place in the driver, but the actual part of deciding when to do this was missing. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Fix AP mode connect event parsing and TIM updatesJouni Malinen2011-09-06
| | | | | | | | | | | | | | | | | | 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>
* ath6kl: Fix endianness in register writeVasanthakumar Thiagarajan2011-09-05
| | | | | Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Make ath6kl_diag_write32() non-staticVasanthakumar Thiagarajan2011-09-05
| | | | | | | | So that this can be called from debug.c when adding support to write chip register. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Fix endianness in requesting chip register readVasanthakumar Thiagarajan2011-09-02
| | | | | | | | Need to make sure the chip address for which we need the value si endian safe. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: read fwlog from firmware ring bufferKalle Valo2011-09-02
| | | | | | | | Firmare sends the logs only when it's internal ring buffer is full. But if firmware crashes we need to retrieve the latest logs through diagnose window. This is now done everytime the debugfs file is read. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: cleanup diagnose window read and write functionsKalle Valo2011-09-02
| | | | | | | | | | | | | Just to make them a bit easier to read and unify naming. 32 suffix in the function name means that it will be a 32 bit transfer. If there's no number a buffer is transfered instead. Use void pointers to get rid of ugly casts. Don't provide target address as a pointer, pass it by value. Same for the value used in write32(). Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: add testmode supportKalle Valo2011-09-01
| | | | | | | 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>
* ath6kl: Do not clear CONNECT bit setting in AP mode for STA disconnectEdward Lu2011-08-31
| | | | | | 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>
* ath6kl: Delay initial group key setup in AP modeJouni Malinen2011-08-31
| | | | | | | | | | 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>