aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/init.c
Commit message (Collapse)AuthorAge
...
* ath6kl: Initialize target wlan values for every vifVasanthakumar Thiagarajan2011-11-11
| | | | | | | | 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>
* ath6kl: Add a modparam to enable multi normal interface supportVasanthakumar Thiagarajan2011-11-11
| | | | | | | | | | | 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>
* ath6kl: Implement add_virtual_intf() and del_virtual_intf()Vasanthakumar Thiagarajan2011-11-11
| | | | | Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Configure inteface information at init timeVasanthakumar Thiagarajan2011-11-11
| | | | | | | | | 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>
* 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: 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: 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: 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: 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: Define an initial vif structure and use itVasanthakumar Thiagarajan2011-11-11
| | | | | | | vif specific information need to be moved from struct ath6kl. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Cleanup fw interface type settingVasanthakumar Thiagarajan2011-11-11
| | | | | | | | | | It is not necessary to use ath6kl_get_fw_iftype() to find out the firmware interface type during initialization because the type of the initial interface in INFRA_NETWORK. Hardcode the fw interface type corresponding to INFRA_BSS instead of using ath6kl_get_fw_iftype(). Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Refactor wiphy dev and net dev init functionsVasanthakumar Thiagarajan2011-11-11
| | | | | | | | This refactoring is done in a manner that it can be used for multiple virtual interface. 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: Pass ath6kl structure to ath6kl_init() instead of net_deviceVasanthakumar Thiagarajan2011-11-11
| | | | | | | | ar is again taken from private area of net_device in ath6kl_init(), pass ar directly. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: fix firmware start address for ar6003 hw2.0Kalle Valo2011-11-11
| | | | | | | | | | | Sangwook found out that commit 639d0b89 ("ath6kl: read firmware start address from hardware") broke firmware boot on ar6003 hw2.0 as it seems it's not posible to automatically query the address from hardware. So we need to hardcode the address for hw2.0. Reported-by: Sangwook Lee <sangwook.lee@linaro.org> Tested-by: Sangwook Lee <sangwook.lee@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: fix struct host_app_area endian handlingKalle Valo2011-11-11
| | | | | | It was missing endian annotation. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* nl80211: advertise device AP SMEJohannes Berg2011-11-09
| | | | | | | | | | | | | | Add the ability to advertise that the device contains the AP SME and what features it can support. There are currently no features in the bitmap -- probe response offload will be advertised by a few patches Arik is working on now (who took over from Guy Eilam) and a device with AP SME will typically implement and require response offload. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath6kl: fix size_t related warningsKalle Valo2011-10-01
| | | | | | | | | | | | | | | | | | | | | | | My earlier debug log additions added these warnings when compiling 64 bit kernels: ath6kl/init.c:962: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' ath6kl/init.c:975: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' ath6kl/init.c:988: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' ath6kl/init.c:1009: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' ath6kl/init.c:1192: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' ath6kl/init.c:1236: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' ath6kl/init.c:1267: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' Reported-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wireless/ath6kl: use of module_param requires the inclusion of moduleparam.hStephen Rothwell2011-09-28
| | | | | | | | | Otheriwse the module.h split up fails like this: drivers/net/wireless/ath/ath6kl/init.c:27:26: error: expected ')' before 'uint' Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: add debug logs for bootingKalle Valo2011-09-28
| | | | | | Just to make it easier to find out why boot fails. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: allow firmware to override firmware patch addressKalle Valo2011-09-27
| | | | | | | In some firmware versions their patch address has changed. If the firmware provides one, use it to override the default address. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Indicate the roaming capability of the firmwareVivek Natarajan2011-09-22
| | | | | | | | | | | | | | When the rssi of the current AP drops, both wpa_supplicant and the firmware may do a background scan to find a better AP and try to associate. This might lead to a race condition where both may try to connect to some AP based on their scan results. Since the firmware is capable of handling roaming, let wpa_supplicant know about this capability so that it will back off from bgscan based roaming. Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Remove the unused node table implementationJouni Malinen2011-09-22
| | | | | | | | | | 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>
* ath6kl: Remove auth type fall back in auto authentication modeVasanthakumar Thiagarajan2011-09-16
| | | | | | | | | | 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>
* ath6kl: add firmware capabilities supportKalle Valo2011-09-16
| | | | | | | | | | The new firmware format includes capability bits which make it possible to check what features the firmware supports. Add infrastructure to read the capabilities. For now it only provides ATH6KL_FW_CAPABILITY_HOST_P2P which is not even used anywhere yet, but that will be added later. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: read reserved ram size from firmware fileKalle Valo2011-09-16
| | | | | | | A new version of firmware needs different reserved ram size so read that from the firmware image. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: read firmware start address from hardwareKalle Valo2011-09-16
| | | | | | | | | It's actually possible to read the firmware start address from hardware, that way there's no need to hardcode the address in hardware. Thanks to Chilam Ng for the idea. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: refactor firmware ext data addr and reserved ram handling sizeKalle Valo2011-09-16
| | | | | | Less if clauses this way and again easier to override the values. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: refactor firmware load address codeKalle Valo2011-09-16
| | | | | | | | | | | | Currently the load address was calculated everytime when it was needed, and with a mess if clauses. Simplify this by adding a field to struct ath6kl for each address and choose the address with simple switch statements. Also move the code just after target version is retrieved. That way it's easier to override the values later in the boot process. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: add support for firmware API 2 formatKalle Valo2011-09-16
| | | | | | In the new format all the format images are embedded into one file. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: separate firmware fetch from uploadKalle Valo2011-09-16
| | | | | | In preparation for the new firmware image format. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: query device tree for firmware board-idSam Leffler2011-09-16
| | | | | | | | | | When no default board data file is present query the device tree for a board-id setting to identify the board data to use. If the FDT lacks the necesary info fall back to the previous behaviour of using a compile-time board filename. Signed-off-by: Sam Leffler <sleffler@chromium.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Allow enabling of P2P supportJouni Malinen2011-09-06
| | | | | | | | | For now, use a module parameter (ath6kl_p2p) to allow P2P support to be enabled. This is needed since there is no mechanism for enabling the P2P mode more dynamically for a single netdev. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Add debugfs entry to modify roaming parameters.Vivek Natarajan2011-09-02
| | | | | | | | | | | | 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>
* 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 firmware log supportKalle Valo2011-09-02
| | | | | | | | | | | 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>
* ath6kl: Do not enable Probe Request reporting by defaultJouni Malinen2011-09-01
| | | | | | | | | | | Probe Request reporting will be needed for P2P and WPS, but some firmware builds do not seem to like this when P2P is not enabled. Since we do not yet enable P2P, the safest option here is to just remove this call for now and bring it back as a more dynamic version once ath6kl starts advertising support for P2P. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> 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: Fix a typo in ath6k contextEdward 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: Report received Probe Request frames to cfg80211Jouni Malinen2011-08-31
| | | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* ath6kl: Request P2P capabilities during target initJouni Malinen2011-08-31
| | | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>