summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mwifiex: add support for Marvell sd8797 deviceBing Zhao2011-11-178-20/+50
| | | | | | | | | | | | | | | This patch supports Marvell chipset 88W8797 (Avastar) with SDIO interface. The corresponding firmware image file is located at: "mrvl/sd8797_uapsta.bin" Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Tristan Xu <xurf@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Frank Huang <frankh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54spi: Remove FIXME in op_stopMichael Büsch2011-11-171-5/+1
| | | | | | | | | Don't use the interruptible variant of mutex_lock(). It doesn't really need to be interruptible. This avoids nasty error handling. Signed-off-by: Michael Buesch <m@bues.ch> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: call ieee80211_recalc_idle() after sending packetsFelix Fietkau2011-11-172-8/+11
| | | | | | | | | | | Some drivers (e.g. ath9k) assume that it's safe to go into low-power mode immediately after the idle state changes. To support that, mac80211 even calls drv_flush() before that happens. In some instances, mac80211 sent a packet right after recalculating the idle state, this patch fixes that. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: use strlcpy routine in .get_drvinfoRick Jones2011-11-175-13/+16
| | | | | | | | Convert various seemingly still compiled wireless drivers' .get_drvinfo routines to use the preferred strlcpy() routine. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* minstrel_ht: Remove unused function parametersPatrick Kelle2011-11-171-14/+12
| | | | | | | | | | | Remove unused function parameters in the following functions: minstrel_calc_rate_ewma() minstrel_ht_calc_tp() minstrel_aggr_check() minstrel_ht_set_rate() Signed-off-by: Patrick Kelle <patrick.kelle81@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: memory leak in mesh_queue_preq()Dan Carpenter2011-11-171-0/+1
| | | | | | | | We recently introduced a return here, but we need to call kfree first. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: use kfree_skb() instead of kfree()Dan Carpenter2011-11-171-1/+1
| | | | | | | | | | sk_buff structs should be freed using kfree_skb(). This was introduced recently in 029458212 "mac80211: Save probe response data for bss". Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: Get rid of search loop for rate group indexHelmut Schaa2011-11-171-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | Finding the group index for a specific rate is done by looping through all groups and returning if the correct one is found. This code is called for each tx'ed frame and thus it makes sense to reduce its runtime. Do this by calculating the group index by this formula based on the SGI and HT40 flags as well as the stream number: idx = (HT40 * 2 * MINSTREL_MAX_STREAMS) + (SGI * MINSTREL_MAX_STREAMS) + (streams - 1) Hence, the groups are ordered by th HT40 flag first, then by the SGI flag and afterwards by the number of used streams. This should reduce the runtime of minstrel_ht_get_group_idx considerable. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: Check rate->idx before rate->countHelmut Schaa2011-11-171-2/+2
| | | | | | | | | | The drivers are not required to fill in rate->count if rate->idx is set to -1. Hence, we should first check rate->idx before accessing rate->count. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: remove crypto special case for auth framesJohannes Berg2011-11-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | The shared key authentication frame that needs to be encrypted (the third one in the shared key handshake) is directly encrypted in ieee80211_send_auth and the IEEE80211_TX_INTFL_DONT_ENCRYPT is set. All others are not encrypted, so the only way to get to this is erroneously on no-monitor AP side. Remove the special case for authentication frames to fix the AP shared key side when operating without cooked monitor interfaces -- with cooked monitor the IEEE80211_TX_INTFL_DONT_ENCRYPT also gets set, so we never get here -- an AP never encrypts auth frames. Without this patch, an AP operating in WEP mode with my no-monitor patches would erroneously encrypt all authentication frames, instead of none. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcmsmac: Use current logging stylesJoe Perches2011-11-172-79/+80
| | | | | | | | | | | | Add and use pr_fmt and pr_<level> Remove useless double parentheses from macros. Remove function names from format strings, add to pr_debug use. Coalesce formats. Remove uncompileable undeclared variable in a DMA_NONE use. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* NFC: Fix indentation in nci.h fileIlan Elias2011-11-171-42/+42
| | | | | | | Fix indentation in nci.h file. Signed-off-by: Ilan Elias <ilane@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: set btcoex weights for AR9462Rajkumar Manoharan2011-11-173-4/+37
| | | | | Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Cleanup btcoex wlan weightsRajkumar Manoharan2011-11-174-58/+34
| | | | | | | | | Remove all wlan weight macros and group it together for better understanding & readability. It makes the code reusable for AR9462 wlan weights. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Remove enabling btcoex from stomp type changeRajkumar Manoharan2011-11-173-4/+4
| | | | | | | | | This patch removes btcoex_enable from stomp type change and let it be called from callee functions that makes the code can be reusable for MCI changes. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'for-linville' of git://github.com/kvalo/ath6klJohn W. Linville2011-11-1722-2160/+4338
|\
| * ath6kl: Fix error in writing create_qos debugfsVasanthakumar Thiagarajan2011-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 100 bytes are allocated to store the parameters which are needed to create a priority stream. These 100 bytes are not sufficiant and throws error when running the following command. echo "6 2 3 1 1 9999999 9999999 9999999 7777777 0 6 45000 200 56789000 56789000 5678900 0 0 9999999 20000 0" > create_qos 179 bytes are needed when the following vlaues are given so that a maximum possible value in that data type can be given in decimal. echo "255 255 255 255 255 4294967295 4294967295 4294967295 4294967295 4294967295 255 65535 65535 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295" > create_qos Following takes 187 bytes when given in hex echo "0xff 0xff 0xff 0xff 0xff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xff 0xffff 0xffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff" > create_qos Increase the size to 200 bytes so that it can hold upto the maximum value possible for that data type. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: Fix tx packet drop in AP mode with bridgeVasanthakumar Thiagarajan2011-11-111-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | skb is dropped in ath6kl_data_tx() when the headroom in skb is insufficient. We hit this condition for every skb in AP mode which is used with bridge, so all tx packets are getting dropped when tried to send traffic to wireless client from bridge. Fix this by reallocating the headroom instead of dropping the skb when it has lesser headroom than needed. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: Remove few unused WMI stuffRaja Mani2011-11-112-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * ath6kl: Expose ath6kl's WOW capabilities to cfg80211Raja Mani2011-11-111-0/+10
| | | | | | | | | | | | | | | | | | Set the list of ath6kl's WOW trigger options in wiphy->wowlan.flags variable during wiphy registration. So that, those options can be configured via iw. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: Remove WARN_ON msg in Suspend pathRaja Mani2011-11-111-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In the current code, WOW resume is executed first from RX path and ar->state is moved to ATH6KL_STATE_ON. When platform calls ath6kl_sdio_resume() in CFG resume context, that time ar->state could have moved to ON state. Printing WARN_ON(1) is void in this context. Hence removing this. Once WOW resume is removed from RX path, This WARN_ON msg can be reverted. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: Perform WOW resume in RX path in case of SDIO IRQ wake upRaja Mani2011-11-113-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The target triggers sdio data line to wake up the host when WOW pattern matches. This causes sdio irq handler is being executed in the host side which internally hits ath6kl's RX path. WOW resume should happen before start processing any data from the target. So it's required to perform WOW resume in RX path. This area needs bit rework to avoid WOW resume in RX path, As of now it's fine to have this model, rework will be done later. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: Invoke WOW suspend/resume calls during PM operationRaja Mani2011-11-112-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | Link ath6kl's wow suspend/resume functions with the actual suspend/resume path. WOW mode is selected when the host sdio controller supports both MMC_PM_KEEP_POWER and MMC_PM_WAKE_SDIO_IRQ capabilities. kvalo: also adds a missing break in ath6kl_cfg80211_resume(), luckily it didn't have any effect on functionality. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: Move ath6kl_cfg80211_stop() call specific to deep sleep and cut pwrRaja Mani2011-11-111-2/+6
| | | | | | | | | | | | | | | | ath6kl_cfg80211_stop() call is not applicable for WOW mode. Hence moving this call to deep sleep and cut pwr specific cases. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: Add new state for WOW modeRaja Mani2011-11-112-0/+2
| | | | | | | | | | | | | | | | In addition to existing deep sleep and cut pwr mode, new state is added in ath6kl_cfg_suspend_mode as well as in ath6kl_state for WOW. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: Include new parameter in suspend path for wowlanRaja Mani2011-11-115-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | cfg80211 layer provides user defined wow parameters like Filter options, Patterns, Pattern's mask, etc via "struct cfg80211_wowlan *wow" to suspend function. Right now, this wowlan parameter is not handled in __ath6kl_cfg80211_suspend func. This parameter has to be passed to HIF layer, So that it can be passed back to ath6kl's cfg interface layer when WOW mode is selected. In case of deep sleep and cut power mode, it's not handled. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: Add WOW suspend/resume implementationRaja Mani2011-11-112-0/+112
| | | | | | | | | | | | | | | | This is the core WOW suspend/resume functions will be called in PM suspend/resume path. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: Add wmi functions to configure WOW mode and host sleep modeRaja Mani2011-11-112-0/+149
| | | | | | | | | | | | | | | | 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>
| * ath6kl: Add wmi functions to add/delete WOW patternsRaja Mani2011-11-112-0/+73
| | | | | | | | | | | | | | | | | | 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>
| * ath6kl: Do not hide ath6kl_wmi_addkey_cmd() error valuesJouni Malinen2011-11-111-24/+13
| | | | | | | | | | | | | | | | Instead of converting any error to EIO, just return the real error value to upper layers. 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-114-9/+14
| | | | | | | | | | | | | | | | | | 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: Remove unused WMI crypto definesJouni Malinen2011-11-111-3/+0
| | | | | | | | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: add suspend_cutpower module parameterKalle Valo2011-11-113-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | This is to force ath6kl to power off hardware during suspend even if sdio support keep power. This is needed, for example, when sdio controller is buggy or maximum powersaving is desired. Usage: insmod ath6kl.ko suspend_cutpower=1 Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: don't power down hardware when interface is downKalle Valo2011-11-112-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-115-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: cut power during suspendKalle Valo2011-11-115-8/+90
| | | | | | | | | | | | | | | | | | | | | | If sdio controller doesn't support keep power, cut power from hardware during suspend and restart firmware during resume. If we are connected during suspend, send a disconnected event to user space. Earlier suspend failed with an error if sdio didn't support keep power. Now suspend will happen succesfully even with that case. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: refactor sdio configuration to a separate functionKalle Valo2011-11-111-33/+44
| | | | | | | | | | | | | | | | These commands are also needed after cutpower suspend so create a function for them. Also fix memory leaks in ath6kl_sdio_probe() error path. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: add state variable depicting hw/fw stateKalle Valo2011-11-113-5/+36
| | | | | | | | | | | | | | | | | | This way it's easier to track state changes and in the future add more warnings about using hardware in wrong states. Currently there are few random flags for trying to do the same, those will be cleaned and removed in the future. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: implement ath6kl_cfg80211_suspend()Kalle Valo2011-11-115-24/+52
| | | | | | | | | | | | | | | | | | | | | | | | 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: reset CONNECT_PEND and CONNECTED flags in ath6kl_cfg80211_stop()Kalle Valo2011-11-111-0/+2
| | | | | | | | | | | | | | Otherwise first connection establish after cutpower suspend will fail. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: create ath6kl_cfg80211_stop()Kalle Valo2011-11-113-45/+52
| | | | | | | | | | | | | | 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-114-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: print seqno in htc debug logsKalle Valo2011-11-111-4/+7
| | | | | | | | | | | | Makes it easier to debug where frames are going. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: print firmware crashes alwaysKalle Valo2011-11-113-64/+61
| | | | | | | | | | | | | | | | | | Currently firmware crash dump is printed only if debug is enabled. Change it so that the crash dump is always printed. Also move the code from init.c to hif.c. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: fix WLAN_ENABLE usage in ath6kl_close()Kalle Valo2011-11-111-1/+2
| | | | | | | | | | | | | | 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-116-7/+64
| | | | | | | | | | | | | | | | | | | | | | 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: create ath6kl_hif_stop()Kalle Valo2011-11-113-0/+53
| | | | | | | | | | | | This is to reset hif layer for powering down hw. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: change name of sdio driver to ath6klKalle Valo2011-11-111-1/+1
| | | | | | | | | | | | | | | | Currently the name of the driver in struct sdio_driver is "ath6kl_sdio", this is for example what uevent advertises. This is wrong as the module is named as ath6kl.ko. Change it to "ath6kl" so that the names match. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: don't print an error for canceled packetsKalle Valo2011-11-111-2/+3
| | | | | | | | | | | | | | | | | | ath6kl_tx_complete() was printing an error when packet was canceled. That causes unnecessary errors when hardware is powered off. Also change the error to a warning and cleanup the message. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: create ath6kl_htc_reset()Kalle Valo2011-11-111-42/+49
| | | | | | | | | | | | When rebooting hardware we need to reset the htc state in ath6kl_htc_stop(). Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>