summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/main.h
AgeCommit message (Collapse)Author
2012-07-17mwifiex: improvement in cfg80211 set_bitrate_mask handlerAmitkumar Karwar
This patch configures data rates to firmware using bitrate mask provided by cfg80211. Earlier we used to only update band information in this handler which will be used later for ibss network. Due to recent modifications in ibss join code we don't need to do that. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-17mwifiex: remove unnecessary code in data rate configurationAmitkumar Karwar
1) Remove unnecessary wrapper functions. 2) Currently we don't have command to set Tx data rate, so mwifiex_rate_ioctl_set_rate_value() function and related code can be removed. 3) "ds_rate" filled by mwifiex_ret_tx_rate_cfg() is never used. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-17mwifiex: remove redundant code in set channel pathAmitkumar Karwar
1) Recently we removed set_channel cfg80211 handler. Also, cfg80211 blocks ibss connection requests if ibss network is already started /joined. Hence the code to restart ibss network in new channel (mwifiex_drv_change_adhoc_chan() function) becomes redundant. 2) mwifiex_bss_set_channel() function is redundant. It does some error checking and calculate adhoc start band and adhoc channel. Cfg80211 already takes care of error checking and provides correct channel information to the driver. Adhoc start band is already calculated in mwifiex_set_rf_channel() function. Other associated code is also removed in this patch. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-12Merge branch 'for-john' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Conflicts: drivers/net/wireless/iwmc3200wifi/cfg80211.c drivers/net/wireless/mwifiex/cfg80211.c
2012-07-12cfg80211: use wireless_dev for interface managementJohannes Berg
In order to be able to create P2P Device wdevs, move the virtual interface management over to wireless_dev structures. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-07-09mwifiex: pass cfg80211_beacon_data to mwifiex_set_mgmt_ie()Avinash Patil
Pass cfg80211_beacon_data pointer instead of cfg80211_ap_settings. While setting management IEs we only need cfg80211_beacon_data of cfg80211_ap_settings which has Tail IE, Head IE and other IE elements. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-28mwifiex: wakeup main thread to handle command queuedAmitkumar Karwar
We miss to wakeup main thread after adding command to cmd pending queue at follwing places. These commands are handled later when main thread is woken up for handling an interrupt for sleep event from firmware. This adds worst case delay of 50msec. 1) We don't wakeup main thread when asynchronous command is added to cmd pending queue. Move queue_work() call from mwifiex_wait_queue_complete() to mwifiex_send_cmd_async() to wakeup main thread for sync as well as async commands. 2) Scan operation is triggered due to following reasons a) request from user (ex. "iw scan" command) b) Scan performed by driver internally. In first case main thread is woken up when first scan command is queued in cmd pending queue (we don't need to wakeup main thread for subsequent scan commands, because they are queued in scan command response handler), but it is not done for second case. queue_work() is moved inside mwifiex_scan_networks() to handle both the cases. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-20mwifiex: set HT capability based on cfg80211_ap_settingsAvinash Patil
Parse HT IE from cfg80211 and set HT capabilities accordingly to FW. If HT IE is missing, 11n would be disabled in FW. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-20mwifiex: set channel via start_ap handler for AP interfaceAvinash Patil
This patch adds functionality to set channel info received from cfg80211_ap_settings in start_ap handler. Since set_channel cfg80211 handler has been removed and we need not explicitely call mwifiex_uap_set_channel(); hence this function definition is also removed. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-11mwifiex: fix simultaneous scan and Tx traffic problemAmitkumar Karwar
If scan operation is started when Tx traffic is already running, driver locks Tx queue until it gets completed. With this logic there is a delay for Tx packets. This patch implements new approach to give Tx path higher priority in this case. Driver internally sends multiple synchronous scan commands to firmware when scan is requested by user. Now we will make sure that Tx queue is empty everytime before sending next scan command. If Tx queue isn't empty scan command will be postponsed by 20msec. This rule will be followed until Tx queue becomes empty or timeout of 1 second happens. In case of timeout scan operation will be aborted. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-11mwifiex: shorten per channel scan timeBing Zhao
Currently the scan time per channel for active scanning is set to 200ms. It takes quite a while to finsh scanning on all channels, especially with a dual band configuration. Change the per channel scan time settings to the following values: passive scan: 110ms active scan: 30ms specific scan: 30ms Above settings have been tested on x86 and arm platforms. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16mwifiex: delete IEs when stop_apAvinash Patil
Delete custom IEs set by start_ap cfg80211 handler when stop_ap handler is called for AP interface. IE index required for deletion is stored in mwifiex_private structure. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16mwifiex: retrieve IEs from cfg80211_beacon_data and send to firmwareAvinash Patil
This patch adds logic for setting tail beacon IE, probe response IE and assoc response IE from cfg80211_ap_settings parameter of start_ap handler into FW. RSN IE is also retrieved from tail IE buffer and sent to firmware. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16mwifiex: add custom IE frameworkAvinash Patil
1. support for setting custom IE from application hostapd etc. Custom IE addition using auto-indexing and Custom IE deletion using static indices (which are allocated during IE addition and stored in driver) are supported. 2. Separate file for handling IE related execution. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16mwifiex: add WPA2 support for APAvinash Patil
1. Support for parsing security related parameters from cfg80211_ap_settings in start_ap cfg80211 handler 2. Conversion of these security information into FW understandle TLVs and setting into FW thru sys_config command 3. key management is done on host. This ensures that FW forwards EAPOL key packets to host instead of processing on its own. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16mwifiex: add AP event handling frameworkAvinash Patil
Added logic to handle AP event that are generated by the firmware. As MLME/SME is implemented in the firmware, events such as station association and deauthentication, must be sent to userspace (hostapd) for creating and deleting station database. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Yogesh Powar <yogeshp@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16mwifiex: common set_wiphy_params cfg80211 handler for AP and STA interfaceAvinash Patil
Add support for setting fragmentation threshold, RTS threshold and retry limit. Since wiphy parameters are properties of physical device, appropriate function to set phy parameters is invoked depending upon bss_type(STA or AP) for each virtual interface. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16mwifiex: add AP command sys_config and set channelAvinash Patil
1. support for AP sys_config command and added parsing of channel information. 2. support for setting AP channel from cfg80211 set_channel handler Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16mwifiex: add bss start and bss stop commands for APAvinash Patil
1. separate file for preparing uAP command buffer 2. definition of bss_start and bss_stop commands being sent to firmware Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16mwifiex: append peer mac address TLV in key material command to firmwareAvinash Patil
Modify key related cfg80211 handlers to copy peer mac address for pairwise keys. If peer mac address is not present or group keys, it will be sent as broadcast mac address. This would be required since hostapd downloads per peer PTK. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16mwifiex: save adapter pointer in wiphy_privAvinash Patil
Since wiphy structure is per adapter we would save adapter, instead of mwifiex private pointer, in wiphy_priv. Also move country_info from mwifiex_private to mwifiex_adapter as making it part of mwifiex_adapter looks logical. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16mwifiex: support for creation of AP interfaceAvinash Patil
1. wiphy structure is per device; hence moved it to mwifiex_adapter mwifiex_register_cfg80211 takes mwifiex_adapter as parameter. This function only registers wiphy with cfg80211. 2. Creation of interfaces is moved to cfg80211 add_virtual_interface handler. 3. Create 2 interfaces by default: station and AP Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-23mwifiex: add support for Marvell USB8797 chipsetAmitkumar Karwar
This patch supports Avastar 88W8797 chipset with USB interface. The corresponding firmware image file is located at: "mrvl/usb8797_uapsta.bin" Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@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>
2012-04-17mwifiex: corrections in timestamp related codeAmitkumar Karwar
We get two timing related fields for each bss from firmware in scan results. 1) timestamp - Actual timestamp information in probe response/beacon 2) network_tsf - firmware's TSF value at the time the beacon or probe response was received. Both are needed while associating by firmware. The patch takes care of following things. 1) We should pass "timestamp" to cfg80211_inform_bss(), but currently "network_tsf" is being provided. This error is corrected here. 2) Rename "network_tsf" to "fw_tsf" 3) Make use of u64 variable instead of an array of u8/u32 to save parsed "timestamp" information. 4) Use timestamp provided to stack in scan results using cfg80211_inform_bss() while associating. (bss->tsf) 5) Allocate space to save fw_tsf in "priv" of cfg80211_bss and retrieve it while associating. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-17mwifiex: code cleanup in BSS handlingAmitkumar Karwar
Rearrange some code to save extra parameters to the functions. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-12mwifiex: use asynchronous firmware loadingAmitkumar Karwar
Make use of request_firmware_nowait instead of request_firmware to load FW asynchronously. This fixes timeouts introduced with recent udev changes. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-12mwifiex: add support for WPS2.0Avinash Patil
This patches enables setting association request and probe request IE for station interface. WPS exchange between WPS2.0 AP and mwifiex STA Enrollee/External Registrar completes successfully. Tested with wpa_supplicant 1.0 and 2.0 devel. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-12mwifiex: set default regulatory domainAmitkumar Karwar
Driver gets region code from FW during initialisation. This patch makes use of it for settting default regulatory domain using regulatory_hint() API. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mwifiex: don't use IEEE80211_MAX_QUEUESJohannes Berg
IEEE80211_MAX_QUEUES is an internal mac80211 value, it is not guaranteed to be always 4. The firmware API in mwifiex almost certainly doesn't care about mac80211 changing though, so mwifiex shouldn't use this value. Maybe it should use IEEE80211_NUM_ACS instead and that is what I'm doing here as at least that value will probably never change, but maybe it should have its own define instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09mwifiex: add set_cqm_rssi_config handler supportAmitkumar Karwar
In this handler LOW_RSSI and HIGH_RSSI events are subscribed to FW using provided threshold value so that FW will monitor connection quality and trigger any of these events. Driver will notify cfg80211 about connection quality based on inputs from FW and provided hysteresis. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09mwifiex: remove redundant signal handling codeAmitkumar Karwar
1) The wrapper function mwifiex_get_signal_info() is unnecessary. 2) As noise and signal vaules in private structure already get modified, we don't need to explicitly pass "struct mwifiex_ds_get_signal" to get it filled. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09wireless: rename ht_info to ht_operationJohannes Berg
Since some of the HT code pre-dates 802.11n-2009 some names are wrong. The one that bothers me most is that "HT operation" is called "HT information" in our code and that causes confusion. Rename "HT information" to "HT operation" and also the control_chan field to primary_chan to match the name used in the spec. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-14mwifiex: fix checkpatch --strict warnings/errors Part 4Yogesh Ashok Powar
For files main.c, main.h and pcie.c Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-13mwifiex: merge functions to derive cfp by chan & freq in oneYogesh Ashok Powar
There exist different functions with very long names to derive the channel frequency and power tripplet based on band and channel/freq. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-13mwifiex: rename long function names to shorter onesYogesh Ashok Powar
This saves some space and adds better readability. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05mwifiex: endian bug in mwifiex_drv_change_adhoc_chan()Dan Carpenter
In mwifiex_drv_change_adhoc_chan() we pass channel to mwifiex_bss_ioctl_ibss_channel() which sets the high 16 bits. This works on little endian systems but not on big endian ones. I've changed mwifiex_drv_change_adhoc_chan() to use a 16 bit variable. This matches the other functions in the file. I considered changing mwifiex_change_adhoc_chan() as well but it turns out that the function isn't implemented so I just removed the definition. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05mwifiex: remove unnecessary struct mwifiex_802_11_ssidAmitkumar Karwar
Use struct cfg80211_ssid available in include/net/cfg80211.h instead of having similar definition in driver. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05mwifiex: handle auto authentication mode correctlyAmitkumar Karwar
When authentication type is configured to NL80211_AUTHTYPE_AUTOMATIC, driver tries to connect using open mode. The association is failed if AP is configured in shared mode. This patch adds code to try association using shared mode as well if open mode association fails. Now since we returned exact error code in association response handler (instead of -1), corresponding changes are done in mwifiex_process_cmdresp(). Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29mwifiex: remove unnecessary enum MWIFIEX_802_11_WEP_STATUSAmitkumar Karwar
Instead of defining an 'enum', we can simply use 'u8' flag for WEP status. Rename 'wep_status' to 'wep_enabled' to match with 'wpa_enabled' and 'wpa2_enabled'. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06mwifiex: update correct dtim_period in dump_station()Amitkumar Karwar
Earlier we were using dtim period extracted from scan response buffer provided by FW in scan operation. But it is observed that sometimes the buffer doesn't contain dtim period tlv, and wrong value (0) was sent to user space. After association FW will start listening to beacon frames of connected AP and store dtim period. Therefore we can get it from FW in dump_station() instead of using wrong value obtained in scanning. Redundant code after adapting new approach for dtim period is also removed in this patch. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-27mwifiex: update BSS parameters in dump_station_info()Amitkumar Karwar
This enables user to check beacon interval, DTIM period, short slot time and short preamble information using "iw dev mlan0 link" command when station is in connected state. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-24mwifiex: use bss_type and bss_num to retrieve privYogesh Ashok Powar
Current implementation, for retrieving priv from adapter, uses bss_index. In multi interface environment supporting different types, bss_index may not be unique. Use bss_type along with bss_num to retrieve the priv. bss_index is removed with this change. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-21mwifiex: fix issues in band configuration codeAmitkumar Karwar
Currently due to following issues in the code even if device is configured in B only, G only or BG mode using iw bitrates command, ibss is getting created in BGN mode. 1) mwifiex_channels_to_cfg80211_channel_type() routine gives channel type as NL80211_CHAN_HT20 for non-HT channel as well, because driver doesn't store HT information provided by stack for the channel. This issue is fixed by maintaining channel type information in 'adapter->channel_type'. 2) Band configuration is unnecessarily overwritten with BGN/AN while setting channel. This patch makes sure that "adapter->config_bands" correctly gets modified while setting channel. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-21mwifiex: use IEEE80211_HT_PARAM_CHA_SEC_* macrosAmitkumar Karwar
Replace driver specific macros with the corresponding IEEE80211_HT_PARAM_CHA_SEC_* macros defined in ieee80211.h. Also, rename 'adapter->chan_offset' to 'adapter->sec_chan_offset' for consistency. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-21mwifiex: remove redundant band config codeAmitkumar Karwar
struct mwifiex_ds_band_cfg and mwifiex_set_radio_band_cfg() routine are unnecessary. It can be done with simple equivalant code. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-14mwifiex: remove cfg_workqueueAmitkumar Karwar
cfg_workqueue was added to notify cfg80211 that scan, connect or disconnect is done by calling respective completion handlers. We can avoid use of this workqueue by calling those handlers from other places. 1) Call connect, disconnect completion handlers in their callback functions. ex. Call cfg80211_connect_result() in mwifiex_cfg80211_connect() 2) Call scan completion handler after parsing response of last scan command in a queue. After removing the workqueue, variables (assoc_request etc.) and checks used for mutual exclusion become redundant. Those are also removed in this patch. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-13mwifiex: wakeup and stop multiple tx queues in net_deviceAvinash Patil
replace single queue function calls with equivalent multiple queue functions. Wakeup queue and stop queue calls are guarded by spin lock. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-17mwifiex: add support for Marvell sd8797 deviceBing Zhao
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>
2011-10-14mwifiex: fix make namespacecheck warningsAmitkumar Karwar
This patch takes care of warnings found by running 'make namespacecheck': 1. Remove dead code. 2. Reorder function definitions to avoid forward declarations. 3. Remove unnecessary function/structure declarations and mark them as static. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-14mwifiex: use separate wait condition for each command nodeAmitkumar Karwar
Currently global wait condition (adapter->cmd_wait_q.condition) is used while sending synchronous commands to FW. When two threads enter in mwifiex_send_cmd_sync() routine at the same time, both the threads wait for their command responses. Since wait condition is same for both, they wake up simultaneously after getting response of 1st command. After this when a thread is waiting for command response of 3rd command, it wakes up after getting response of 2nd command and so on. Therefore we don't wait for the response of last command(0xaa) during unload. Hence while next time loading the driver command time out is seen for INIT command. This problem is resolved by having separate wait condition flag for each command(except scan command). Since scan command is treated differently (by maintaining scan pending q etc.), newly defined flag (scan_wait_q_woken) is used as a scan wait condition. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>