summaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)AuthorFilesLines
2011-11-11ath6kl: fix WLAN_ENABLE usage in ath6kl_close()Kalle Valo1-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>
2011-11-11ath6kl: power down hardware when interface is downKalle Valo6-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>
2011-11-11ath6kl: create ath6kl_hif_stop()Kalle Valo3-0/+53
This is to reset hif layer for powering down hw. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: change name of sdio driver to ath6klKalle Valo1-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>
2011-11-11ath6kl: don't print an error for canceled packetsKalle Valo1-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>
2011-11-11ath6kl: create ath6kl_htc_reset()Kalle Valo1-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>
2011-11-11ath6kl: add a timeout to ath6kl_hif_intr_bh_handler()Kalle Valo2-1/+5
It's possible to busyloop forever in ath6kl_hif_intr_bh_handler(). Add a check that it lasts only one second. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: remove useless cleanup call from ath6kl_bmi_done()Kalle Valo1-2/+0
aht6kl core code will call the cleanup function when the device is removed. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: separate hardware boot code from module initialisation codeKalle Valo1-77/+106
Refactor the code needed to boot the hardware to a separate function so that it will be easier boot and shutdown hardware. No functional changes (hopefully). Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: merge ath6kl_init() to ath6kl_core_init()Kalle Valo1-83/+65
In preparation for splitting module initialisation and hardware boot code from each other. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: add a fixme to ath6kl_htc_wait_target()Kalle Valo1-0/+4
This doesn't look right, but investigate it later. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: move power control from sdio to coreKalle Valo4-16/+37
In preparation for cutting down power from the chip on the fly. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: rename ath6kl_wmi_qos_state_init() to _wmi_reset()Kalle Valo2-5/+3
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: don't use cfg80211_scan_request after cfg80211_scan_done()Kalle Valo1-2/+4
Use of cfg80211_scan_request is not valid after calling cfg80211_scan_done() but ath6kl_cfg80211_scan_complete_event() was doing exactly that. Change the function to call cfg80211_scan_done() last. This was found during code review, I didn't see any visible problems due to this bug. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: fix missing copy of action frame contentsAarthi Thiruvengadam1-0/+1
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 Malinen3-4/+22
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: Fix compilation error from of.hSangwook Lee1-0/+1
When compiling ath6kl for ARM with device tree tree compilation fails with errors like: include/linux/of.h: In function 'of_property_read_u32_array': include/linux/of.h:249:10: error: 'ENOSYS' undeclared Workaround this by including errno.h from init.c. kvalo: improved commit log Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Implement support for power parameter control from userspaceRishi Panjwani1-0/+63
In order to allow user space based control of power parameters, we use available debugfs infrastructure. With these features user can control power consumption by adjusting various sleep/wake up related parameters. The feature has been added for testing purposes. All 5 parameters are mandatory in correct order. They have to be written to the power_params file. These are: 1) idle_period 2) no_of_pspoll 3) dtim_policy 4) tx_wakeup_policy 5) no_tx_to_wakeup Example: echo "200 1 0 1 1" > power_params Signed-off-by: Rishi Panjwani <rpanjwan@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Implement support for listen interval from userspaceRishi Panjwani1-0/+64
In order to allow user space based control of listen interval, we use available debugfs infrastructure. Listen interval implies how frequently we want the WLAN chip to wake up and synchronize the beacons in case it is in sleep mode. The command requires two parameters in the following order: 1) listen_interval_time 2) listen_interval_beacons The user has to write the listen interval_time (in msecs) and listen_interval_beacons (in no. of beacons) to the listen_interval file in ath6kl debug directory. Example: echo "30 1" > listen_interval Signed-off-by: Rishi Panjwani <rpanjwan@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: add support for WPSAarthi Thiruvengadam2-0/+19
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: add more boot debug messagesKalle Valo2-13/+17
Move some of the debug logs to boot level because they are more interesting when debugging boot issues. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: add debug messages for credit handlingKalle Valo3-40/+41
Also take few from htc debug level which are more suitable for credit. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: remove unused debug levelsKalle Valo2-7/+6
Few levels had only one user so I changed them to use WLAN_CFG. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: use ath6kl_credit prefix consistentlyKalle Valo3-35/+34
Not all credit functions used that prefix, fix that. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: move all credit distribution code to htc.cKalle Valo5-302/+295
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>
2011-11-11ath6kl: rename struct htc_credit_state_info to ath6kl_htc_credit_infoKalle Valo6-38/+45
Also rename cred_dist_cntxt to credit_info in struct htc_target. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: rename struct htc_endpoint_credit_dist.htc_rsvd to htc_epKalle Valo3-7/+5
No need to use void pointer here. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: use ath6kl prefix in credit functionsKalle Valo4-52/+52
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>
2011-11-11ath6kl: remove unused A_CACHE_LINE_PADKalle Valo1-2/+0
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Use appropriate wdev from vifVasanthakumar Thiagarajan2-11/+7
Remove the wdev reference in struct ath6kl. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Initialize target wlan values for every vifVasanthakumar Thiagarajan4-38/+53
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: Add a modparam to enable multi normal interface supportVasanthakumar Thiagarajan3-12/+36
This option lets operate more than one vif in normal mode (AP/STA/IBSS) when support for multiple vif is enabled. This modparam needs to be used as modprobe ath6kl multi_norm_if_support=1 Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Implement add_virtual_intf() and del_virtual_intf()Vasanthakumar Thiagarajan4-6/+133
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Configure inteface information at init timeVasanthakumar Thiagarajan2-8/+40
Virtual interface information need to be configured during init time to the target. With MAX_NUM_VIF is restricted to 1, currently only a single vif is being configured. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Use the other variant of netdev (un)register APIsVasanthakumar Thiagarajan3-13/+15
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>
2011-11-11ath6kl: Maintain virtual interface in a listVasanthakumar Thiagarajan8-79/+163
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: Introduce spinlock to protect vif specific informationVasanthakumar Thiagarajan4-13/+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>
2011-11-11ath6kl: Store hw mac address in struct ath6klVasanthakumar Thiagarajan3-5/+13
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>
2011-11-11ath6kl: Use interface index from wmi data headrVasanthakumar Thiagarajan5-27/+73
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: Refactor ath6kl_destroy()Vasanthakumar Thiagarajan6-137/+79
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>
2011-11-11ath6kl: Cleanup parameters in ath6kl_init_control_info() and ↵Vasanthakumar Thiagarajan4-14/+8
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>
2011-11-11ath6kl: Remove net_device from ath6klVasanthakumar Thiagarajan5-16/+14
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>
2011-11-11ath6kl: Take vif information from wmi eventVasanthakumar Thiagarajan8-239/+249
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 Thiagarajan10-180/+243
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: Make net and target stats vif specificVasanthakumar Thiagarajan5-31/+35
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 Thiagarajan4-26/+26
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Move scan_req info and sme_state to vifVasanthakumar Thiagarajan3-26/+31
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Move disconnect timer to vif structureVasanthakumar Thiagarajan3-8/+7
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Move aggregation information to vif structureVasanthakumar Thiagarajan4-12/+14
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2011-11-11ath6kl: Move key information to vif structureVasanthakumar Thiagarajan4-17/+21
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>