summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/11n.c
Commit message (Collapse)AuthorAgeFilesLines
* mwifiex: declare sta_ptr in smaller scopeBing Zhao2014-07-151-1/+2
| | | | | | | | | | sta_ptr is used only in an 'if' branch in this function. Move it to the smaller scope where it is used. Reported-by: Paul Stewart <pstew@chromium.org> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: update Copyright to 2014Xinming Hu2014-06-251-1/+1
| | | | | | | | This patch updates mwifiex Copyright to 2014. Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: add HT operation IE in TDLS setup confirmAvinash Patil2014-05-071-0/+42
| | | | | | | | | | This patch adds support to populate HT operatation IE in TDLS setup confirm command. This is required for setting wider bandwidths for TDLS operations. 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>
* mwifiex: fix IE parsing issuesAmitkumar Karwar2014-04-221-2/+1Star
| | | | | | | | | | | | | | | IE's are parsed from beacon buffer and stored locally using mwifiex_update_bss_desc_with_ie() function. Sometimes the local pointers point to the data inside IE, but while using them it is assumed that they are pointing to the IE itself. These issues are fixed in this patch. 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>
* Merge branch 'master' of ↵John W. Linville2014-03-211-17/+34
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
| * mwifiex: add AMSDU inside AMPDU supportAmitkumar Karwar2014-03-141-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently AMPDU aggregation is preferred over AMSDU. AMSDU aggregation is performed only if AMPDU streams in firmware are full. This patch adds simultaneous AMSDU and AMPDU aggregation support. This mechanism helps to improve throughput. AMSDU is enabled only for 8897 chipsets which supports 4K transmit buffer. User can disable AMSDU using 'disable_tx_amsdu' module parameter. 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>
| * mwifiex: code rearrangement for better readabilityAmitkumar Karwar2014-03-141-10/+10
| | | | | | | | | | | | | | | | | | | | Use negative check for 'status' and return from the function. This improves readability by avoiding line splits. Also, local variable is used for start window calculations. 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>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2014-03-151-2/+1Star
|\ \ | |/ |/| | | | | | | | | | | | | | | | | Conflicts: drivers/net/usb/r8152.c drivers/net/xen-netback/netback.c Both the r8152 and netback conflicts were simple overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
| * mwifiex: copy AP's HT capability info correctlyAmitkumar Karwar2014-03-061-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | While preparing association request, intersection of device's HT capability information and corresponding fields advertised by AP is used. This patch fixes an error while copying this field from AP's beacon. Cc: <stable@vger.kernel.org> 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>
* | mwifiex: remove global variable cmd_wait_q_requiredBing Zhao2014-02-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a race condition while queuing synchronous command and asynchronous command requested from different threads, because the wait_q_enabled flag is set based on a global variable cmd_wait_q_required. The issue is fixed by removing this global variable and using a unified function with an argument 'sync' passed into the function. 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>
* | mwifiex: separate BA params for TDLS link if 11ac is supportedAvinash Patil2014-02-121-3/+19
| | | | | | | | | | | | | | | | | | | | | | If TDLS link is 11ac enabled i.e. we as well as peer station supports VHT, configure seprate TX & RX window sizes during BA setup. So even if BSS does not support 11ac, we can use VHT capabilities and higher window sizes on direct link. 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>
* | mwifiex: cleanup in mwifiex_fill_cap_info()Amitkumar Karwar2014-02-121-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | Pass 'struct ieee80211_ht_cap' pointer to mwifiex_fill_cap_info() instead of 'struct mwifiex_ie_types_htcap' pointer, because the routine internally uses the later one. This patch also adds WARN_ON_ONCE check for NULL band. 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>
* | mwifiex: update beamforming capability field for HTAmitkumar Karwar2014-02-121-0/+4
|/ | | | | | | | | This patch makes sure that beamforming capability field in ht capability info gets filled if hardware supports the feature. 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>
* mwifiex: slight optimization of addr comparedingtianhong2013-12-261-1/+1
| | | | | | | | | | | | | | Use possibly more efficient ether_addr_equal instead of memcmp. Cc: Bing Zhao <bzhao@marvell.com> Cc: John W. Linville <linville@tuxdriver.com> Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Weilong Chen <chenweilong@huawei.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mwifiex: drop gratuitous ARP framesAvinash Patil2013-08-261-0/+6
| | | | | | | | | | | | This patch adds support for dropping gratuitous ARP frames which is requirement for WFA Hotspot2.0. Hotspot2.0 capability is enabled in driver if extended capabilities IE from BSS descriptor has 11u interworking enabled. 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>
* mwifiex: fix ext_capab IE structure definitionAvinash Patil2013-08-261-4/+6
| | | | | | | | | | EXT_CAPAB_IE format involves IEEE header followed by bytestream of capabilities. Current structure has incorrect member u8 for data; fix it by defining it as u8[0]. 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>
* mwifiex: change default tx/rx win_size for BA setupAvinash Patil2013-04-011-0/+22
| | | | | | | | | | | | | | | | | | This patch fixes an issue where RX throughput values observed were substantially lower than TX counterparts for PCIe8897 STA. PCIe8897 supports larger rx_win_size. After changing these values we see big improvement for TX and RX throughput values. Different tx_win_size and rx_win_size are used for AP mode. All BA setup related initialization has been moved to separate function. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Sagar Bijwe <bsagar@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>
* Merge branch 'master' of ↵John W. Linville2013-02-191-1/+6
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
| * mwifiex: add 802.11AC supportYogesh Ashok Powar2013-02-181-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For STA mode, collect VHT realated IEs from the Beacons or Probe Responses and append similar VHT related IEs to association requests. For AP mode, get VHT related capability information and share it with cfg80211 at the time of wiphy register. This information is further used by cfg80211 and hostapd to start an AP with 802.11AC support. Currently only 8897 supports 802.11AC. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Frank Huang <frankh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'master' of ↵John W. Linville2013-02-081-39/+0Star
|\| | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
| * mwifiex: do not reconfigure tx buffer size in firmware while associatingBing Zhao2013-02-011-39/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's observed that reconfiguration of tx buffer size before association can cause data path failure in firmware after associated. Although this is only found with PCIe cards, but potentially it could happen with any other interfaces as well. The tx buffer reconfiguration is not really useful in firmware. Let's remove it for all interfaces. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | wireless: Remove unnecessary alloc/OOM messages, alloc cleanupsJoe Perches2013-02-041-4/+1Star
|/ | | | | | | | | | | | | | alloc failures already get standardized OOM messages and a dump_stack. Convert kzalloc's with multiplies to kcalloc. Convert kmalloc's with multiplies to kmalloc_array. Remove now unused variables. Remove unnecessary memset after kzalloc->kcalloc. Whitespace cleanups for these changes. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mwifiex: use correct htcapinfo for HT20 ibss networkAmitkumar Karwar2013-01-071-1/+3
| | | | | | | | | | | It is observed that same htcapinfo ie is included in beacon for HT20, HT40+ and HT40- ibss networks. This patch makes sure that we will not advertise 40Mhz flags while creating/joining ibss network in HT20 mode. 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>
* mwifiex: remove AMSDU_AGGR_CTRL command response handlerAmitkumar Karwar2012-09-111-21/+0Star
| | | | | | | | | HostCmd_CMD_AMSDU_AGGR_CTRL is never called with GET action. So the code in mwifiex_ret_amsdu_aggr_ctrl() becomes redundant. 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>
* mwifiex: remove 11N_CFG command response handlerAmitkumar Karwar2012-09-111-17/+0Star
| | | | | | | | | HostCmd_CMD_11N_CFG is never called with GET action. So the code in mwifiex_ret_11n_cfg() becomes redundant. 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>
* mwifiex: cleanup TX/RX BA tables for uAPAvinash Patil2012-08-061-0/+26
| | | | | | | | | | | Cleanup TX/RX BA tables when AP receives deauthentication from associated station. During BSS_IDLE event, all wmm queues, BA streams created for AP interface are deleted. 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>
* wireless: Remove casts to same typeJoe Perches2012-06-061-9/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding casts of objects to the same type is unnecessary and confusing for a human reader. For example, this cast: int y; int *p = (int *)&y; I used the coccinelle script below to find and remove these unnecessary casts. I manually removed the conversions this script produces of casts with __force, __iomem and __user. @@ type T; T *p; @@ - (T *)p + p Neatened the mwifiex_deauthenticate_infra function which was doing odd things with array pointers and not using is_zero_ether_addr. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* wireless: rename ht_info to ht_operationJohannes Berg2012-04-091-8/+9
| | | | | | | | | | | | | | | 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>
* mwifiex: fix checkpatch --strict warnings/errors Part 1Yogesh Ashok Powar2012-03-141-11/+11
| | | | | | | | For files 11n.c, 11n.h, 11n_aggr.c, 11n_rxreorder.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>
* mwifiex: rename long function names to shorter onesYogesh Ashok Powar2012-03-131-33/+27Star
| | | | | | | | 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>
* mwifiex: remove casts of void pointersAmitkumar Karwar2011-06-221-20/+13Star
| | | | | | | | | | | | | | | In some cases local pointers are used to cast void pointers passed to the function. Those unnecessary local pointers are also removed. This patch was inspired by Joe Perches' patch [PATCH net-next 1/2] wireless: Remove casts of void *; and the comments from Julian Calaby. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Cc: Joe Perches <joe@perches.com> Cc: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: remove unnecessary variable initializationYogesh Ashok Powar2011-05-051-4/+3Star
| | | | | | | | | Skip initialization of local variables with some default values if the values are not going to be used further down the code path. 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>
* mwifiex: HT capability information handlingAmitkumar Karwar2011-04-281-77/+25Star
| | | | | | | | | | | | | 1) Initialise HT capabilities in cfg80211 properly. 2) Cfg80211 stack may modify "sband->ht_cap" to disable 40Mhz operation in 2.4GHz band (after recent patch "cfg80211: module_param to disable HT40 in 2.4GHz band") Therefore read "sband->ht_cap" instead of an adapter variable "hw_dot_11n_dev_cap" to get HT capabilities. 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>
* mwifiex: remove some macro definitionsAmitkumar Karwar2011-04-191-1/+1
| | | | | | | | use corresponding macros defined in include/linux/ieee80211.h 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>
* mwifiex: remove unused function parametersAmitkumar Karwar2011-04-141-9/+4Star
| | | | | | | | | Some function parameters become useless after previous cleanup changes. 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>
* mwifiex: remove redundant "return" at end of void functionYogesh Ashok Powar2011-04-141-6/+0Star
| | | | | | | | | The return statement at the last line of a void function is not necessary. 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>
* mwifiex: cleanup ioctl wait queue and abstraction layerAmitkumar Karwar2011-04-141-7/+6Star
| | | | | | | | | | | | | | | | 1) remove mwifiex_alloc_fill_wait_queue() and mwifiex_request_ioctl() 2) avoid dynamic allocation of wait queue 3) remove unnecessary mwifiex_error_code macros that were used mainly by the wait queue status code 4) remove some abstraction functions 5) split mwifiex_prepare_cmd() to mwifiex_send_cmd_async() and mwifiex_send_sync() to handle asynchronous and synchronous commands respectively 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>
* mwifiex: remove MWIFIEX_BSS_MODE_ macrosBing Zhao2011-04-041-2/+2
| | | | | | | | | | | replace them with NL80211_IFTYPE_ macros Also remove redundant functions mwifiex_drv_get_mode() and mwifiex_bss_ioctl_mode(). 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>
* mwifiex: use IEEE80211_HT_CAP_ macros for 11n cap_infoMarc Yang2011-04-041-51/+34Star
| | | | | | | | | | | | | | | | | | | | | The hw_dot_11n_dev_cap reported by firmware hw_spec has different format than the 11n capabilities. Hence a lot of SET_ and RESET_ bit operation macros were used to convert the dev_cap format to 11n capability format. However the locally defined 11n ht_cap macros are not necessary as we can use IEEE80211_HT_CAP_ macros directly. The 32-bit dev_cap bitmap is added as comment to explain the mapping between firmware and 11n spec. Some unused macros and unnecessary adapter variables are also removed. Signed-off-by: Marc Yang <yangyang@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>
* mwifiex: remove helper functions for displaying 11n capabilitiesYogesh Ashok Powar2011-04-041-96/+0Star
| | | | | | | | | 'iw list' is sufficient to retrieve the information which was displayed by these functions. 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>
* wireless: mwifiex: initial commit for Marvell mwifiex driverBing Zhao2011-03-301-0/+922
This driver adds WiFi support for Marvell 802.11n based chipsets with SDIO interface. Currently only SD8787 is supported. More chipsets will be supported later. drivers/net/wireless/mwifiex/ Signed-off-by: Nishant Sarmukadam <nishants@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: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Marc Yang <yangyang@marvell.com> Signed-off-by: Ramesh Radhakrishnan <rramesh@marvell.com> Signed-off-by: Frank Huang <frankh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>