@@ -3456,6 +3456,11 @@ enum ieee80211_reconfig_type {
*
* @set_btcoex_: set_btcoex: Called when BTCOEX is enabled/disabled, use
* this callback to enable or disable btcoex.
+ * @set_btcoex_priority: Use this callback to set wlan high
+ * priority frames over bluetooth. Driver supported wlan frames
+ * for the BTCOEX is exposed by btcoex_support_flags.
+ * When BTCOEX enabled, the high priority wlan frames will have
+ * more priority than BT.
*/
struct ieee80211_ops {
void (*tx)(struct ieee80211_hw *hw,
@@ -3709,6 +3714,8 @@ struct ieee80211_ops {
struct ieee80211_vif *vif,
u8 instance_id);
int (*set_btcoex)(struct ieee80211_hw *hw, bool enabled);
+ int (*set_btcoex_priority)(struct ieee80211_hw *hw,
+ struct cfg80211_btcoex_priority *btcoex_priority);
};
/**
@@ -3569,6 +3569,14 @@ static int ieee80211_set_btcoex(struct wiphy *wiphy, bool enabled)
return drv_set_btcoex(local, enabled);
}
+static int ieee80211_set_btcoex_priority(struct wiphy *wiphy,
+ struct cfg80211_btcoex_priority *btcoex_priority)
+{
+ struct ieee80211_local *local = wiphy_priv(wiphy);
+
+ return drv_set_btcoex_priority(local, btcoex_priority);
+}
+
const struct cfg80211_ops mac80211_config_ops = {
.add_virtual_intf = ieee80211_add_iface,
.del_virtual_intf = ieee80211_del_iface,
@@ -3660,4 +3668,5 @@ static int ieee80211_set_btcoex(struct wiphy *wiphy, bool enabled)
.add_nan_func = ieee80211_add_nan_func,
.del_nan_func = ieee80211_del_nan_func,
.set_btcoex = ieee80211_set_btcoex,
+ .set_btcoex_priority = ieee80211_set_btcoex_priority,
};
@@ -1262,4 +1262,16 @@ static inline int drv_set_btcoex(struct ieee80211_local *local,
return ret;
}
+static inline int drv_set_btcoex_priority(struct ieee80211_local *local,
+ struct cfg80211_btcoex_priority *btcoex_priority)
+{
+ int ret = -EOPNOTSUPP;
+
+ if (local->ops->set_btcoex_priority)
+ ret = local->ops->set_btcoex_priority(&local->hw,
+ btcoex_priority);
+
+ return ret;
+}
+
#endif /* __MAC80211_DRIVER_OPS */