All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] mwifiex p2p fixes
@ 2015-07-16 13:27 Amitkumar Karwar
  2015-07-16 13:27 ` [PATCH 1/3] UPSTREAM: mwifiex: add bss mode TLV to extended scan command Amitkumar Karwar
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Amitkumar Karwar @ 2015-07-16 13:27 UTC (permalink / raw)
  To: linux-wireless; +Cc: Cathy Luo, Amitkumar Karwar

This patch series resolves couple of issues observed during p2p
opeations.

Aniket Nagarnaik (3):
  UPSTREAM: mwifiex: add bss mode TLV to extended scan command
  UPSTREAM: mwifiex: use maximum ssid length as 0xfe for p2p
  UPSTREAM: mwifiex: correct p2p and station interface counters

 drivers/net/wireless/mwifiex/cfg80211.c |  4 +++-
 drivers/net/wireless/mwifiex/fw.h       |  6 ++++++
 drivers/net/wireless/mwifiex/scan.c     | 14 ++++++++++++++
 3 files changed, 23 insertions(+), 1 deletion(-)

-- 
1.8.1.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] UPSTREAM: mwifiex: add bss mode TLV to extended scan command
  2015-07-16 13:27 [PATCH 0/3] mwifiex p2p fixes Amitkumar Karwar
@ 2015-07-16 13:27 ` Amitkumar Karwar
  2015-07-16 13:27 ` [PATCH 2/3] UPSTREAM: mwifiex: use maximum ssid length as 0xfe for p2p Amitkumar Karwar
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Amitkumar Karwar @ 2015-07-16 13:27 UTC (permalink / raw)
  To: linux-wireless; +Cc: Cathy Luo, Aniket Nagarnaik, Amitkumar Karwar

From: Aniket Nagarnaik <aniketn@marvell.com>

We are setting BSS mode as ANY so that firmware will provide
all types of scan entries.

Signed-off-by: Aniket Nagarnaik <aniketn@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
 drivers/net/wireless/mwifiex/fw.h   |  6 ++++++
 drivers/net/wireless/mwifiex/scan.c | 10 ++++++++++
 2 files changed, 16 insertions(+)

diff --git a/drivers/net/wireless/mwifiex/fw.h b/drivers/net/wireless/mwifiex/fw.h
index cd09051..59662bb 100644
--- a/drivers/net/wireless/mwifiex/fw.h
+++ b/drivers/net/wireless/mwifiex/fw.h
@@ -177,6 +177,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
 #define TLV_TYPE_CHANNEL_STATS      (PROPRIETARY_TLV_BASE_ID + 198)
 #define TLV_BTCOEX_WL_AGGR_WINSIZE  (PROPRIETARY_TLV_BASE_ID + 202)
 #define TLV_BTCOEX_WL_SCANTIME      (PROPRIETARY_TLV_BASE_ID + 203)
+#define TLV_TYPE_BSS_MODE           (PROPRIETARY_TLV_BASE_ID + 206)
 
 #define MWIFIEX_TX_DATA_BUF_SIZE_2K        2048
 
@@ -1370,6 +1371,11 @@ struct host_cmd_ds_802_11_scan_ext {
 	u8    tlv_buffer[1];
 } __packed;
 
+struct mwifiex_ie_types_bss_mode {
+	struct mwifiex_ie_types_header  header;
+	u8 bss_mode;
+} __packed;
+
 struct mwifiex_ie_types_bss_scan_rsp {
 	struct mwifiex_ie_types_header header;
 	u8 bssid[ETH_ALEN];
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index baf9715..ef2bef8 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -823,6 +823,7 @@ mwifiex_config_scan(struct mwifiex_private *priv,
 	int i;
 	u8 ssid_filter;
 	struct mwifiex_ie_types_htcap *ht_cap;
+	struct mwifiex_ie_types_bss_mode *bss_mode;
 
 	/* The tlv_buf_len is calculated for each scan command.  The TLVs added
 	   in this routine will be preserved since the routine that sends the
@@ -968,6 +969,15 @@ mwifiex_config_scan(struct mwifiex_private *priv,
 	else
 		*max_chan_per_scan = MWIFIEX_DEF_CHANNELS_PER_SCAN_CMD;
 
+	if (adapter->ext_scan) {
+		bss_mode = (struct mwifiex_ie_types_bss_mode *)tlv_pos;
+		bss_mode->header.type = cpu_to_le16(TLV_TYPE_BSS_MODE);
+		bss_mode->header.len = cpu_to_le16(sizeof(bss_mode->bss_mode));
+		bss_mode->bss_mode = scan_cfg_out->bss_mode;
+		tlv_pos += sizeof(bss_mode->header) +
+			   le16_to_cpu(bss_mode->header.len);
+	}
+
 	/* If the input config or adapter has the number of Probes set,
 	   add tlv */
 	if (num_probes) {
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] UPSTREAM: mwifiex: use maximum ssid length as 0xfe for p2p
  2015-07-16 13:27 [PATCH 0/3] mwifiex p2p fixes Amitkumar Karwar
  2015-07-16 13:27 ` [PATCH 1/3] UPSTREAM: mwifiex: add bss mode TLV to extended scan command Amitkumar Karwar
@ 2015-07-16 13:27 ` Amitkumar Karwar
  2015-07-16 13:27 ` [PATCH 3/3] UPSTREAM: mwifiex: correct p2p and station interface counters Amitkumar Karwar
  2015-07-16 15:02 ` [PATCH 0/3] mwifiex p2p fixes Amitkumar Karwar
  3 siblings, 0 replies; 5+ messages in thread
From: Amitkumar Karwar @ 2015-07-16 13:27 UTC (permalink / raw)
  To: linux-wireless; +Cc: Cathy Luo, Aniket Nagarnaik, Amitkumar Karwar

From: Aniket Nagarnaik <aniketn@marvell.com>

0xfe is basically a magic number used to ask firmware match
provided string in a SSID. In this case, firmware will
return scan results containing"DIRECT-" string.

Signed-off-by: Aniket Nagarnaik <aniketn@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
 drivers/net/wireless/mwifiex/scan.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index ef2bef8..ef8da8e 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -909,6 +909,10 @@ mwifiex_config_scan(struct mwifiex_private *priv,
 				wildcard_ssid_tlv->max_ssid_length =
 							IEEE80211_MAX_SSID_LEN;
 
+			if (!memcmp(user_scan_in->ssid_list[i].ssid,
+				    "DIRECT-", 7))
+				wildcard_ssid_tlv->max_ssid_length = 0xfe;
+
 			memcpy(wildcard_ssid_tlv->ssid,
 			       user_scan_in->ssid_list[i].ssid, ssid_len);
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] UPSTREAM: mwifiex: correct p2p and station interface counters
  2015-07-16 13:27 [PATCH 0/3] mwifiex p2p fixes Amitkumar Karwar
  2015-07-16 13:27 ` [PATCH 1/3] UPSTREAM: mwifiex: add bss mode TLV to extended scan command Amitkumar Karwar
  2015-07-16 13:27 ` [PATCH 2/3] UPSTREAM: mwifiex: use maximum ssid length as 0xfe for p2p Amitkumar Karwar
@ 2015-07-16 13:27 ` Amitkumar Karwar
  2015-07-16 15:02 ` [PATCH 0/3] mwifiex p2p fixes Amitkumar Karwar
  3 siblings, 0 replies; 5+ messages in thread
From: Amitkumar Karwar @ 2015-07-16 13:27 UTC (permalink / raw)
  To: linux-wireless; +Cc: Cathy Luo, Aniket Nagarnaik, Amitkumar Karwar

From: Aniket Nagarnaik <aniketn@marvell.com>

While changing interface type from p2p client or p2p go to
station, we should update counters for p2p interface and
station interface. Also calling mwifiex_cfg80211_deinit_p2p
method instead of mwifiex_cfg80211_init_p2p_client method to
deinit p2p interface.

Signed-off-by: Aniket Nagarnaik <aniketn@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
 drivers/net/wireless/mwifiex/cfg80211.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index b15e4c7..b024015 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -1115,8 +1115,10 @@ mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy,
 	case NL80211_IFTYPE_P2P_GO:
 		switch (type) {
 		case NL80211_IFTYPE_STATION:
-			if (mwifiex_cfg80211_init_p2p_client(priv))
+			if (mwifiex_cfg80211_deinit_p2p(priv))
 				return -EFAULT;
+			priv->adapter->curr_iface_comb.p2p_intf--;
+			priv->adapter->curr_iface_comb.sta_intf++;
 			dev->ieee80211_ptr->iftype = type;
 			break;
 		case NL80211_IFTYPE_ADHOC:
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [PATCH 0/3] mwifiex p2p fixes
  2015-07-16 13:27 [PATCH 0/3] mwifiex p2p fixes Amitkumar Karwar
                   ` (2 preceding siblings ...)
  2015-07-16 13:27 ` [PATCH 3/3] UPSTREAM: mwifiex: correct p2p and station interface counters Amitkumar Karwar
@ 2015-07-16 15:02 ` Amitkumar Karwar
  3 siblings, 0 replies; 5+ messages in thread
From: Amitkumar Karwar @ 2015-07-16 15:02 UTC (permalink / raw)
  To: linux-wireless

Hi Kalle,

> From: Amitkumar Karwar [mailto:akarwar@marvell.com]
> Sent: Thursday, July 16, 2015 6:57 PM
> To: linux-wireless@vger.kernel.org
> Cc: Cathy Luo; Amitkumar Karwar
> Subject: [PATCH 0/3] mwifiex p2p fixes
> 
> This patch series resolves couple of issues observed during p2p
> opeations.
> 
> Aniket Nagarnaik (3):
>   UPSTREAM: mwifiex: add bss mode TLV to extended scan command
>   UPSTREAM: mwifiex: use maximum ssid length as 0xfe for p2p
>   UPSTREAM: mwifiex: correct p2p and station interface counters
> 
>  drivers/net/wireless/mwifiex/cfg80211.c |  4 +++-
>  drivers/net/wireless/mwifiex/fw.h       |  6 ++++++
>  drivers/net/wireless/mwifiex/scan.c     | 14 ++++++++++++++
>  3 files changed, 23 insertions(+), 1 deletion(-)
> 

Please ignore this patch series.
I will remove redundant tag "UPSTREAM:" and submit updated version.

Regards,
Amitkumar

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-16 15:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-16 13:27 [PATCH 0/3] mwifiex p2p fixes Amitkumar Karwar
2015-07-16 13:27 ` [PATCH 1/3] UPSTREAM: mwifiex: add bss mode TLV to extended scan command Amitkumar Karwar
2015-07-16 13:27 ` [PATCH 2/3] UPSTREAM: mwifiex: use maximum ssid length as 0xfe for p2p Amitkumar Karwar
2015-07-16 13:27 ` [PATCH 3/3] UPSTREAM: mwifiex: correct p2p and station interface counters Amitkumar Karwar
2015-07-16 15:02 ` [PATCH 0/3] mwifiex p2p fixes Amitkumar Karwar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.