linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ath6kl: Remove modparam multi_norm_if_support
@ 2011-11-18  4:35 Vasanthakumar Thiagarajan
  2011-11-18  4:35 ` [PATCH 2/3] ath6kl: Find ar->max_norm_iface in firmware IE parsing Vasanthakumar Thiagarajan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vasanthakumar Thiagarajan @ 2011-11-18  4:35 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

This modparam was introduced to enable non-p2p mode operation
on two virtual interfaces. It does not seem to be necessary to
have a separate module parameter to do that. Instead, this option
can be enabled when any one of the interfaces is not going to be
used for p2p (ath6kl_p2p).

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index ed3fbbe..afa7279 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -23,10 +23,8 @@
 #include "testmode.h"
 
 static unsigned int ath6kl_p2p;
-static unsigned int multi_norm_if_support;
 
 module_param(ath6kl_p2p, uint, 0644);
-module_param(multi_norm_if_support, uint, 0644);
 
 #define RATETAB_ENT(_rate, _rateid, _flags) {   \
 	.bitrate    = (_rate),                  \
@@ -2454,14 +2452,13 @@ struct ath6kl *ath6kl_core_alloc(struct device *dev)
 	}
 
 	ar = wiphy_priv(wiphy);
-	if (!multi_norm_if_support)
-		ar->p2p = !!ath6kl_p2p;
+	ar->p2p = !!ath6kl_p2p;
 	ar->wiphy = wiphy;
 	ar->dev = dev;
 
 	ar->vif_max = 1;
 
-	if (multi_norm_if_support)
+	if (!ar->p2p)
 		ar->max_norm_iface = 2;
 	else
 		ar->max_norm_iface = 1;
-- 
1.7.0.4


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

* [PATCH 2/3] ath6kl: Find ar->max_norm_iface in firmware IE parsing
  2011-11-18  4:35 [PATCH 1/3] ath6kl: Remove modparam multi_norm_if_support Vasanthakumar Thiagarajan
@ 2011-11-18  4:35 ` Vasanthakumar Thiagarajan
  2011-11-18  4:35 ` [PATCH 3/3] ath6kl: Enable multiple vif support Vasanthakumar Thiagarajan
  2011-11-21 16:06 ` [PATCH 1/3] ath6kl: Remove modparam multi_norm_if_support Kalle Valo
  2 siblings, 0 replies; 4+ messages in thread
From: Vasanthakumar Thiagarajan @ 2011-11-18  4:35 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

Currently the max number of vifs which can be used for non-p2p
mode is determined in ath6kl_core_alloc(). But the maximum
supported vifs are parsed from firmware IE in ath6kl_fetch_fw_api2()
which would happen after ath6kl_core_alloc().

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c |    6 ------
 drivers/net/wireless/ath/ath6kl/init.c     |    3 +++
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index afa7279..1fb45cc 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -2458,12 +2458,6 @@ struct ath6kl *ath6kl_core_alloc(struct device *dev)
 
 	ar->vif_max = 1;
 
-	if (!ar->p2p)
-		ar->max_norm_iface = 2;
-	else
-		ar->max_norm_iface = 1;
-
-	/* FIXME: Remove this once the multivif support is enabled */
 	ar->max_norm_iface = 1;
 
 	spin_lock_init(&ar->lock);
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c
index 6c4f6a9..48544ed 100644
--- a/drivers/net/wireless/ath/ath6kl/init.c
+++ b/drivers/net/wireless/ath/ath6kl/init.c
@@ -971,6 +971,9 @@ static int ath6kl_fetch_fw_api2(struct ath6kl *ar)
 			ar->vif_max = min_t(unsigned int, le32_to_cpup(val),
 					    ATH6KL_VIF_MAX);
 
+			if (ar->vif_max > 1 && !ar->p2p)
+				ar->max_norm_iface = 2;
+
 			ath6kl_dbg(ATH6KL_DBG_BOOT,
 				   "found vif max ie %d\n", ar->vif_max);
 			break;
-- 
1.7.0.4


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

* [PATCH 3/3] ath6kl: Enable multiple vif support
  2011-11-18  4:35 [PATCH 1/3] ath6kl: Remove modparam multi_norm_if_support Vasanthakumar Thiagarajan
  2011-11-18  4:35 ` [PATCH 2/3] ath6kl: Find ar->max_norm_iface in firmware IE parsing Vasanthakumar Thiagarajan
@ 2011-11-18  4:35 ` Vasanthakumar Thiagarajan
  2011-11-21 16:06 ` [PATCH 1/3] ath6kl: Remove modparam multi_norm_if_support Kalle Valo
  2 siblings, 0 replies; 4+ messages in thread
From: Vasanthakumar Thiagarajan @ 2011-11-18  4:35 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

The maximum number of supported virtual interfaces are 3.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/core.h |    2 +-
 drivers/net/wireless/ath/ath6kl/init.c |   18 +++---------------
 2 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h
index b185564..75b9d0e 100644
--- a/drivers/net/wireless/ath/ath6kl/core.h
+++ b/drivers/net/wireless/ath/ath6kl/core.h
@@ -404,7 +404,7 @@ enum ath6kl_hif_type {
  * Driver's maximum limit, note that some firmwares support only one vif
  * and the runtime (current) limit must be checked from ar->vif_max.
  */
-#define ATH6KL_VIF_MAX	1
+#define ATH6KL_VIF_MAX	3
 
 /* vif flags info */
 enum ath6kl_vif_state {
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c
index 48544ed..bf159da 100644
--- a/drivers/net/wireless/ath/ath6kl/init.c
+++ b/drivers/net/wireless/ath/ath6kl/init.c
@@ -414,11 +414,7 @@ static int ath6kl_target_config_wlan_params(struct ath6kl *ar, int idx)
 			status = -EIO;
 		}
 
-	/*
-	 * FIXME: Make sure p2p configurations are not applied to
-	 * non-p2p capable interfaces when multivif support is enabled.
-	 */
-	if (ar->p2p) {
+	if (ar->p2p && (ar->vif_max == 1 || idx)) {
 		ret = ath6kl_wmi_info_req_cmd(ar->wmi, idx,
 					      P2P_FLAG_CAPABILITIES_REQ |
 					      P2P_FLAG_MACADDR_REQ |
@@ -431,11 +427,7 @@ static int ath6kl_target_config_wlan_params(struct ath6kl *ar, int idx)
 		}
 	}
 
-	/*
-	 * FIXME: Make sure p2p configurations are not applied to
-	 * non-p2p capable interfaces when multivif support is enabled.
-	 */
-	if (ar->p2p) {
+	if (ar->p2p && (ar->vif_max == 1 || idx)) {
 		/* Enable Probe Request reporting for P2P */
 		ret = ath6kl_wmi_probe_report_req_cmd(ar->wmi, idx, true);
 		if (ret) {
@@ -481,11 +473,7 @@ int ath6kl_configure_target(struct ath6kl *ar)
 		fw_submode |= HI_OPTION_FW_SUBMODE_P2PDEV <<
 			      (i * HI_OPTION_FW_SUBMODE_BITS);
 
-	/*
-	 * FIXME: This needs to be removed once the multivif
-	 * support is enabled.
-	 */
-	if (ar->p2p)
+	if (ar->p2p && ar->vif_max == 1)
 		fw_submode = HI_OPTION_FW_SUBMODE_P2PDEV;
 
 	param = HTC_PROTOCOL_VERSION;
-- 
1.7.0.4


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

* Re: [PATCH 1/3] ath6kl: Remove modparam multi_norm_if_support
  2011-11-18  4:35 [PATCH 1/3] ath6kl: Remove modparam multi_norm_if_support Vasanthakumar Thiagarajan
  2011-11-18  4:35 ` [PATCH 2/3] ath6kl: Find ar->max_norm_iface in firmware IE parsing Vasanthakumar Thiagarajan
  2011-11-18  4:35 ` [PATCH 3/3] ath6kl: Enable multiple vif support Vasanthakumar Thiagarajan
@ 2011-11-21 16:06 ` Kalle Valo
  2 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2011-11-21 16:06 UTC (permalink / raw)
  To: Vasanthakumar Thiagarajan; +Cc: linux-wireless

On 11/18/2011 06:35 AM, Vasanthakumar Thiagarajan wrote:
> This modparam was introduced to enable non-p2p mode operation
> on two virtual interfaces. It does not seem to be necessary to
> have a separate module parameter to do that. Instead, this option
> can be enabled when any one of the interfaces is not going to be
> used for p2p (ath6kl_p2p).
> 
> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

Thanks, all three patches applied.

Kalle

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

end of thread, other threads:[~2011-11-21 16:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-18  4:35 [PATCH 1/3] ath6kl: Remove modparam multi_norm_if_support Vasanthakumar Thiagarajan
2011-11-18  4:35 ` [PATCH 2/3] ath6kl: Find ar->max_norm_iface in firmware IE parsing Vasanthakumar Thiagarajan
2011-11-18  4:35 ` [PATCH 3/3] ath6kl: Enable multiple vif support Vasanthakumar Thiagarajan
2011-11-21 16:06 ` [PATCH 1/3] ath6kl: Remove modparam multi_norm_if_support Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).