aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/tdls.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-11-18mwifiex: move under marvell vendor directoryKalle Valo1-1500/+0
Part of reorganising wireless drivers directory and Kconfig. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-09-29mwifiex: don't always include ht/vht info in tdls confirm frameAniket Nagarnaik1-0/+12
Current TDLS implementation always includes ht/vht information in tdls setup confirm frame which causes teardown by legacy peer station after TDLS handshake. We will inclue ht/vht capabilities in tdls setup confirm frame only if peer station supports it to fix this problem. Signed-off-by: Aniket Nagarnaik <aniketn@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-08-06mwifiex: using right aid value for tdls action frameXinming Hu1-1/+1
Variable pos is u8 here, so memcpy is needed to store u16 aid. At the same time, aid should be platform independent, upper layer utility(wpa_supplicant,etc.,) parse it as le16, so keep it le16 here. Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-07-21mwifiex: enhance tdls link setup conditionXinming Hu1-4/+4
TDLS link status - channel switching, off channel or base channel itself indicates that TDLS link is setup. Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-07-21mwifiex: enable tdls channel switch ext_capXinming Hu1-0/+6
This patch enable tdls channel switch ext capability in tdls action frame, and also configure basic tdls channel switch parameters while tdls setup completed and tdls link is enabled.. Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-07-21mwifiex: add tdls config commandXinming Hu1-0/+64
This patch add support for a new tdls configuration command which is used for configuration of tdls channel switch parameters. Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-05-26mwifiex: change dbg print func to mwifiex_dbgZhaoyang Liu1-42/+44
This patch changes all debug print functions from dev_dbg/dev_err/dev_info to mwifiex specific debug functions. Signed-off-by: Zhaoyang Liu <liuzy@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-05-09wireless: fix typos in mwifiex and rtlwifiMasanari Iida1-1/+1
This patch fix some spelling typo in drivers/net/wirless Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-01-07mwifiex: tdls: Use setup_timerJulia Lawall1-3/+2
Convert a call to init_timer and accompanying intializations of the timer's data and function fields to a call to setup_timer. A simplified version of the semantic match that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression t,f,d; @@ -init_timer(&t); +setup_timer(&t,f,d); -t.function = f; -t.data = d; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-01-06mwifiex: report tdls peers in debugfsXinming Hu1-0/+30
This patch add provision to show TDLS peer table in debugfs file. Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2014-11-17mwifiex: add auto TDLS supportAvinash Patil1-0/+233
This patch adds auto TDLS support to mwifiex. Auto TDLS functionality works as follows: 1. Whenever userspace application has triggered TDLS connection with any peer, driver would store this peer mac address details in its database. 2. After this driver whenever driver receives packet on direct link, it would store rssi and timestamp in peer information. 3. Whenever a packet is to be transmitted to non-AP peer in station mode, driver would check if TDLS link can be established by looking at peer RSSI information. Driver would initiate TDLS setup in such cases. 4. Periodic timer is used for updating peer information. 5. Auto TDLS peer list & timer are cleared during disconnection or driver unload. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-11-17mwifiex: wmm support for TDLS linkAvinash Patil1-0/+55
This patch adds WMM support for TDLS link. Patch add WMM info IE for TDLS setup request/response frames while WMM parameter for TDLS confirm frame. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-15mwifiex: fix probable memory corruption while processing TDLS frameAvinash Patil1-1/+3
Size of RSN IE buffer in driver is 254 while maximum size of received buffer to be copied to RSN IE buffer can be 255. Add boundary check to copy maximum of 254 bytes into RSN IE buffer. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-16mwifiex: remove redundant TDLS setup action frame check and avoid leaksBing Zhao1-12/+10
The unwanted frame types are already handled in 'default' case of the switch/case below. The str_ptr is allocated but it can be leaked if the length check fails in the REQUEST/RESP cases. Fix it by allocating sta_ptr after the length checks. 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: Paul Stewart <pstew@chromium.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-10Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville1-0/+2
2014-07-03mwifiex: initialize Tx/Rx info of a packet correctlyAmitkumar Karwar1-0/+2
There are few places at the begining of Tx/Rx paths where tx_info/rx_info is not correctly initialized. This patch takes care of it. 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>
2014-06-25wireless: mwifiex: Use the proper interfacesThomas Gleixner1-6/+2
Why is converting time formats so desired if there are proper interfaces for this? Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Bing Zhao <bzhao@marvell.com> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: linux-wireless@vger.kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-25Revert "mwifiex: Use the proper interfaces"Bing Zhao1-2/+6
This reverts commit a82fc3b4a2bceb7c6587249cb690342eb5065979. Thomas corrected me on that I misunderstood Johannes' comment for net_timedelta() and the ktime_get_real() usage inside __net_timestamp(). Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: John W. Linville <linville@tuxdriver.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-20mwifiex: Use the proper interfacesThomas Gleixner1-6/+2
Why is converting time formats so desired if there are proper interfaces for this? Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-22mwifiex: use 'const' qualifier for 2nd arg of mwifiex_tdls_add_ht_operJohn W. Linville1-1/+1
Fixes the following warning: CC drivers/net/wireless/mwifiex/tdls.o drivers/net/wireless/mwifiex/tdls.c: In function ‘mwifiex_prep_tdls_encap_data’: drivers/net/wireless/mwifiex/tdls.c:475:4: warning: passing argument 2 of ‘mwifiex_tdls_add_ht_oper’ discards ‘const’ qualifier from pointer target type [enabled by default] ret = mwifiex_tdls_add_ht_oper(priv, peer, 1, skb); ^ drivers/net/wireless/mwifiex/tdls.c:190:1: note: expected ‘u8 *’ but argument is of type ‘const u8 *’ mwifiex_tdls_add_ht_oper(struct mwifiex_private *priv, u8 *mac, ^ drivers/net/wireless/mwifiex/tdls.c:481:4: warning: passing argument 2 of ‘mwifiex_tdls_add_ht_oper’ discards ‘const’ qualifier from pointer target type [enabled by default] ret = mwifiex_tdls_add_ht_oper(priv, peer, 0, skb); ^ drivers/net/wireless/mwifiex/tdls.c:190:1: note: expected ‘u8 *’ but argument is of type ‘const u8 *’ mwifiex_tdls_add_ht_oper(struct mwifiex_private *priv, u8 *mac, ^ Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-05-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-nextJohn W. Linville1-20/+24
2014-05-19cfg80211: constify MAC addresses in cfg80211 opsJohannes Berg1-20/+24
This propagates through all the drivers and mac80211. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-05-07mwifiex: add HT operation IE in TDLS setup confirmAvinash Patil1-0/+53
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>
2014-03-27mwifiex: Remove casts of pointer to same typeJoe Perches1-3/+3
Casting a pointer to a pointer of the same type is pointless, so remove these unnecessary casts. Done via coccinelle script: $ cat typecast_2.cocci @@ type T; T *foo; @@ - (T *)foo + foo Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-28mwifiex: remove global variable cmd_wait_q_requiredBing Zhao1-8/+8
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>
2014-02-24mwifiex: memory corruption in mwifiex_tdls_add_vht_capab()Dan Carpenter1-1/+1
There is a typo here because the names are confusingly similar. The intent was sizeof(struct ieee80211_vht_cap) (size 12) but sizeof(struct ieee80211_ht_cap) (size 32) was used. Anway, it's cleaner to just specify the variable instead of the type. Fixes: 5f6d5983394f ('mwifiex: add VHT support for TDLS') 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>
2014-02-12mwifiex: disable all TDLS link during disconnectionAvinash Patil1-0/+35
During deauthenticate/link lost event, disable all TDLS links as TDLS would not work when infra connection is not active. Also this will avoid an issue where ping to peer station doesn't work after reassociation to AP where we had created TDLS link in earlier association. 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>
2014-02-12mwifiex: add VHT support for TDLSAvinash Patil1-4/+217
During TDLS setup request/response, if HW is 11ac capable, we add VHT Capability IEs in outgoing data frame. Also while processing received setup request/response, we preserve peer's 11ac capability retrieved from IEs. Patch also gets VHT parameters from config_station handlers and sets it to FW using TDLS config command. Signed-off-by: Avinash Patil <patila@marvell.com> 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>
2014-02-12mwifiex: AMPDU support for TDLS linkAvinash Patil1-0/+1
This patch adds AMPDU support for TDLS link. We have set 11n capabilities including AMPDU parameters during ENABLE_LINK. We set a variable in RA list to indicate this as TDLS link. This patch uses these capabilities to know if AMPDU is allowed on TDLS link and enables AMPDU aggregation for TX and RX reording support for RA list for this peer. 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>
2014-02-12mwifiex: tdls related handling for data packets addressed to TDLS peerAvinash Patil1-0/+11
1. If data packet is addressed to TDLS peer for which link is established, mark these packets with TDLS flag so that FW can send them on direct link instead of sending via AP. 2. If data packet is addressed to TDLS peer and TDLS setup is underway, move these packets to TDLS queue. 3. If this packet is TDLS setup packet, do not block it. 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>
2014-02-12mwifiex: provision for holding and restoring packets during TDLS setupAvinash Patil1-0/+94
While TDLS link is being setup, few packets from this station to peer station may be buffered at AP. It may happen that once TDLS link is setup, packets sent from station to peer on direct link get delivered before traffic from AP arrives at peer station. This results into packet reordering issue at peer station. To avoid this, we hold data packets destined to TDLS peer during TDLS setup. These packets are moved to temperory TDLS TX queue. Upon successful TDLS setup, they are moved to RA list created for this peer. Upon failure, packets are moved back to AP's RA list for that particular TID. 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>
2014-02-12mwifiex: add cfg80211 change_station handler supportAvinash Patil1-0/+23
This patch adds cfg80211 change_station handler support for mwifiex which is needed for TDLS link setup. Driver creates a command to modify peer link capabilities and issues command to FW. 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>
2014-02-12mwifiex: add cfg80211 add_station handler supportAvinash Patil1-0/+28
This patch adds cfg80211 add_station handler support for mwifiex which is needed for TDLS setup. Driver issues create TDLS link command to FW upon receiving add_station from cfg80211. 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>
2014-02-12mwifiex: add cfg80211 tdls_oper handler supportAvinash Patil1-0/+97
This patch adds cfg80211 handler tdls_oper handler support to mwifiex. Upon enable link, driver sets status as TDLS status as setup complete and also sets AMSDU size, AMPDU params for direct link. Upon disable link, driver issues command to FW to delete this link in FW. 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>
2014-02-12mwifiex: parse TDLS action frames during RXAvinash Patil1-0/+119
This patch adds support for parsing TDLS action frames during station receive handler. Peer station capabilities are stored into station node. 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>
2014-02-12mwifiex: add tdls_mgmt handler supportAvinash Patil1-0/+423
This patch adds support for TDLS management frames transmit handler. mwifiex driver supports TDLS with external support, i.e. expects user space application to form TDLS frames. Same is advertised to cfg80211 during registration. Signed-off-by: Avinash Patil <patila@marvell.com> 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>