@@ -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);
};
/**
@@ -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 = {
@@ -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);
@@ -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,