All of lore.kernel.org
 help / color / mirror / Atom feed
From: <c_traja@qti.qualcomm.com>
To: <linux-wireless@vger.kernel.org>
Cc: <johannes@sipsolutions.net>, <ath10k@lists.infradead.org>,
	Tamizh chelvam <c_traja@qti.qualcomm.com>
Subject: [PATCHv2 4/4] mac80211: Add support to set/update btcoex priority value
Date: Sat, 25 Feb 2017 19:07:53 +0530	[thread overview]
Message-ID: <1488029873-14600-5-git-send-email-c_traja@qti.qualcomm.com> (raw)
In-Reply-To: <1488029873-14600-1-git-send-email-c_traja@qti.qualcomm.com>

From: Tamizh chelvam <c_traja@qti.qualcomm.com>

This patch add support to set or modify the btcoex priority value
for the driver which has btcoex priority feature support.

Signed-off-by: Tamizh chelvam <c_traja@qti.qualcomm.com>
---
 include/net/mac80211.h    |    6 ++++--
 net/mac80211/cfg.c        |    5 +++--
 net/mac80211/driver-ops.h |    7 ++++---
 net/mac80211/trace.h      |   12 +++++++++---
 4 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 57717f1..33890b4 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -3448,7 +3448,8 @@ enum ieee80211_reconfig_type {
  *	ieee80211_nan_func_terminated() with
  *	NL80211_NAN_FUNC_TERM_REASON_USER_REQUEST reason code upon removal.
  * @set_btcoex_: Called when BTCOEX is enabled/disabled, use
- *     this callback to enable or disable btcoex.
+ *     this callback to enable or disable btcoex and use this callback to
+ *     set btcoex_priority. BTCOEX should be enabled to set this priority.
  */
 struct ieee80211_ops {
 	void (*tx)(struct ieee80211_hw *hw,
@@ -3730,7 +3731,8 @@ struct ieee80211_ops {
 	void (*del_nan_func)(struct ieee80211_hw *hw,
 			    struct ieee80211_vif *vif,
 			    u8 instance_id);
-	int (*set_btcoex)(struct ieee80211_hw *hw, bool enabled);
+	int (*set_btcoex)(struct ieee80211_hw *hw, bool enabled,
+			  int btcoex_priority);
 };
 
 /**
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 7e17eff..c640e7d 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -3574,11 +3574,12 @@ static int ieee80211_set_multicast_to_unicast(struct wiphy *wiphy,
 	return 0;
 }
 
-static int ieee80211_set_btcoex(struct wiphy *wiphy, bool enabled)
+static int ieee80211_set_btcoex(struct wiphy *wiphy, bool enabled,
+				int btcoex_priority)
 {
 	struct ieee80211_local *local = wiphy_priv(wiphy);
 
-	return drv_set_btcoex(local, enabled);
+	return drv_set_btcoex(local, enabled, btcoex_priority);
 }
 
 const struct cfg80211_ops mac80211_config_ops = {
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 16d9c98..3826202 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -1249,13 +1249,14 @@ static inline void drv_del_nan_func(struct ieee80211_local *local,
 }
 
 static inline int drv_set_btcoex(struct ieee80211_local *local,
-				 bool enabled)
+				 bool enabled, int btcoex_priority)
 {
 	int ret = -EOPNOTSUPP;
 
-	trace_drv_set_btcoex(local, enabled);
+	trace_drv_set_btcoex(local, enabled, btcoex_priority);
 	if (local->ops->set_btcoex)
-		ret = local->ops->set_btcoex(&local->hw, enabled);
+		ret = local->ops->set_btcoex(&local->hw, enabled,
+					     btcoex_priority);
 
 	trace_drv_return_int(local, ret);
 
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index 0d9b5a0..c3efca9 100644
--- a/net/mac80211/trace.h
+++ b/net/mac80211/trace.h
@@ -743,17 +743,23 @@
 );
 
 TRACE_EVENT(drv_set_btcoex,
-	TP_PROTO(struct ieee80211_local *local, bool enabled),
-	TP_ARGS(local, enabled),
+	TP_PROTO(struct ieee80211_local *local, bool enabled,
+		 int btcoex_priority),
+	TP_ARGS(local, enabled, btcoex_priority),
 	TP_STRUCT__entry(
 		LOCAL_ENTRY
 		__field(bool, enabled)
+		__field(int, btcoex_priority)
 	),
 	TP_fast_assign(
 		LOCAL_ASSIGN;
 		__entry->enabled = enabled;
+		__entry->btcoex_priority = btcoex_priority;
 	),
-	TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
+	TP_printk(
+		LOCAL_PR_FMT " enabled:%d btcoex_priority :%d",
+		LOCAL_PR_ARG, __entry->enabled, __entry->btcoex_priority
+	)
 );
 
 TRACE_EVENT(drv_set_coverage_class,
-- 
1.7.9.5

WARNING: multiple messages have this Message-ID (diff)
From: <c_traja@qti.qualcomm.com>
To: linux-wireless@vger.kernel.org
Cc: Tamizh chelvam <c_traja@qti.qualcomm.com>,
	johannes@sipsolutions.net, ath10k@lists.infradead.org
Subject: [PATCHv2 4/4] mac80211: Add support to set/update btcoex priority value
Date: Sat, 25 Feb 2017 19:07:53 +0530	[thread overview]
Message-ID: <1488029873-14600-5-git-send-email-c_traja@qti.qualcomm.com> (raw)
In-Reply-To: <1488029873-14600-1-git-send-email-c_traja@qti.qualcomm.com>

From: Tamizh chelvam <c_traja@qti.qualcomm.com>

This patch add support to set or modify the btcoex priority value
for the driver which has btcoex priority feature support.

Signed-off-by: Tamizh chelvam <c_traja@qti.qualcomm.com>
---
 include/net/mac80211.h    |    6 ++++--
 net/mac80211/cfg.c        |    5 +++--
 net/mac80211/driver-ops.h |    7 ++++---
 net/mac80211/trace.h      |   12 +++++++++---
 4 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 57717f1..33890b4 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -3448,7 +3448,8 @@ enum ieee80211_reconfig_type {
  *	ieee80211_nan_func_terminated() with
  *	NL80211_NAN_FUNC_TERM_REASON_USER_REQUEST reason code upon removal.
  * @set_btcoex_: Called when BTCOEX is enabled/disabled, use
- *     this callback to enable or disable btcoex.
+ *     this callback to enable or disable btcoex and use this callback to
+ *     set btcoex_priority. BTCOEX should be enabled to set this priority.
  */
 struct ieee80211_ops {
 	void (*tx)(struct ieee80211_hw *hw,
@@ -3730,7 +3731,8 @@ struct ieee80211_ops {
 	void (*del_nan_func)(struct ieee80211_hw *hw,
 			    struct ieee80211_vif *vif,
 			    u8 instance_id);
-	int (*set_btcoex)(struct ieee80211_hw *hw, bool enabled);
+	int (*set_btcoex)(struct ieee80211_hw *hw, bool enabled,
+			  int btcoex_priority);
 };
 
 /**
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 7e17eff..c640e7d 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -3574,11 +3574,12 @@ static int ieee80211_set_multicast_to_unicast(struct wiphy *wiphy,
 	return 0;
 }
 
-static int ieee80211_set_btcoex(struct wiphy *wiphy, bool enabled)
+static int ieee80211_set_btcoex(struct wiphy *wiphy, bool enabled,
+				int btcoex_priority)
 {
 	struct ieee80211_local *local = wiphy_priv(wiphy);
 
-	return drv_set_btcoex(local, enabled);
+	return drv_set_btcoex(local, enabled, btcoex_priority);
 }
 
 const struct cfg80211_ops mac80211_config_ops = {
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 16d9c98..3826202 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -1249,13 +1249,14 @@ static inline void drv_del_nan_func(struct ieee80211_local *local,
 }
 
 static inline int drv_set_btcoex(struct ieee80211_local *local,
-				 bool enabled)
+				 bool enabled, int btcoex_priority)
 {
 	int ret = -EOPNOTSUPP;
 
-	trace_drv_set_btcoex(local, enabled);
+	trace_drv_set_btcoex(local, enabled, btcoex_priority);
 	if (local->ops->set_btcoex)
-		ret = local->ops->set_btcoex(&local->hw, enabled);
+		ret = local->ops->set_btcoex(&local->hw, enabled,
+					     btcoex_priority);
 
 	trace_drv_return_int(local, ret);
 
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index 0d9b5a0..c3efca9 100644
--- a/net/mac80211/trace.h
+++ b/net/mac80211/trace.h
@@ -743,17 +743,23 @@
 );
 
 TRACE_EVENT(drv_set_btcoex,
-	TP_PROTO(struct ieee80211_local *local, bool enabled),
-	TP_ARGS(local, enabled),
+	TP_PROTO(struct ieee80211_local *local, bool enabled,
+		 int btcoex_priority),
+	TP_ARGS(local, enabled, btcoex_priority),
 	TP_STRUCT__entry(
 		LOCAL_ENTRY
 		__field(bool, enabled)
+		__field(int, btcoex_priority)
 	),
 	TP_fast_assign(
 		LOCAL_ASSIGN;
 		__entry->enabled = enabled;
+		__entry->btcoex_priority = btcoex_priority;
 	),
-	TP_printk(LOCAL_PR_FMT " enabled:%d", LOCAL_PR_ARG, __entry->enabled)
+	TP_printk(
+		LOCAL_PR_FMT " enabled:%d btcoex_priority :%d",
+		LOCAL_PR_ARG, __entry->enabled, __entry->btcoex_priority
+	)
 );
 
 TRACE_EVENT(drv_set_coverage_class,
-- 
1.7.9.5


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  parent reply	other threads:[~2017-02-25 13:46 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-25 13:37 [PATCHv2 0/4] cfg80211: mac80211: BTCOEX feature support c_traja
2017-02-25 13:37 ` c_traja
2017-02-25 13:37 ` [PATCHv2 1/4] cfg80211: Add support to enable or disable btcoex c_traja
2017-02-25 13:37   ` c_traja
2017-02-25 14:48   ` kbuild test robot
2017-02-25 14:48     ` kbuild test robot
2017-02-25 14:48   ` kbuild test robot
2017-02-25 14:48     ` kbuild test robot
2017-03-02  8:45   ` Johannes Berg
2017-03-02  8:45     ` Johannes Berg
2017-03-02 11:49     ` Raja, Tamizh Chelvam
2017-03-02 11:49       ` Raja, Tamizh Chelvam
2017-02-25 13:37 ` [PATCHv2 2/4] mac80211: " c_traja
2017-02-25 13:37   ` c_traja
2017-02-25 13:37 ` [PATCHv2 3/4] cfg80211: Add Support set btcoex priority value c_traja
2017-02-25 13:37   ` c_traja
2017-02-25 15:12   ` kbuild test robot
2017-02-25 15:12     ` kbuild test robot
2017-03-02  8:50   ` Johannes Berg
2017-03-02  8:50     ` Johannes Berg
2017-03-02 11:48     ` Raja, Tamizh Chelvam
2017-03-02 11:48       ` Raja, Tamizh Chelvam
2017-03-02 12:15       ` Johannes Berg
2017-03-02 12:15         ` Johannes Berg
2017-03-02 13:08         ` Raja, Tamizh Chelvam
2017-03-02 13:08           ` Raja, Tamizh Chelvam
2017-03-02 13:43           ` Johannes Berg
2017-03-02 13:43             ` Johannes Berg
2017-03-02  8:51   ` Johannes Berg
2017-03-02  8:51     ` Johannes Berg
2017-02-25 13:37 ` c_traja [this message]
2017-02-25 13:37   ` [PATCHv2 4/4] mac80211: Add support to set/update " c_traja
2017-02-25 14:41 ` [PATCHv2 0/4] cfg80211: mac80211: BTCOEX feature support Arend Van Spriel
2017-02-25 14:41   ` Arend Van Spriel
2017-02-27 10:33   ` Raja, Tamizh Chelvam
2017-02-27 10:33     ` Raja, Tamizh Chelvam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1488029873-14600-5-git-send-email-c_traja@qti.qualcomm.com \
    --to=c_traja@qti.qualcomm.com \
    --cc=ath10k@lists.infradead.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.