@@ -3330,7 +3330,8 @@ static int mac80211_hwsim_tx_last_beacon(struct ieee80211_hw *hw)
return 1;
}
-static int mac80211_hwsim_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
+static int mac80211_hwsim_set_rts_threshold(struct ieee80211_hw *hw, u8 radio_id,
+ u32 value)
{
return -EOPNOTSUPP;
}
@@ -4553,7 +4553,7 @@ struct ieee80211_ops {
struct ieee80211_key_conf *key,
struct ieee80211_key_seq *seq);
int (*set_frag_threshold)(struct ieee80211_hw *hw, u32 value);
- int (*set_rts_threshold)(struct ieee80211_hw *hw, u32 value);
+ int (*set_rts_threshold)(struct ieee80211_hw *hw, u8 radio_id, u32 value);
int (*sta_add)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_sta *sta);
int (*sta_remove)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
@@ -3033,7 +3033,13 @@ static int ieee80211_set_wiphy_params(struct wiphy *wiphy, u8 radio_id, u32 chan
}
if (changed & WIPHY_PARAM_RTS_THRESHOLD) {
- err = drv_set_rts_threshold(local, wiphy->rts_threshold);
+ u32 rts_threshold;
+
+ if (radio_id >= wiphy->n_radio)
+ rts_threshold = wiphy->rts_threshold;
+ else
+ rts_threshold = wiphy->radio_cfg[radio_id].rts_threshold;
+ err = drv_set_rts_threshold(local, radio_id, rts_threshold);
if (err)
return err;
@@ -402,16 +402,16 @@ static inline int drv_set_frag_threshold(struct ieee80211_local *local,
}
static inline int drv_set_rts_threshold(struct ieee80211_local *local,
- u32 value)
+ u8 radio_id, u32 value)
{
int ret = 0;
might_sleep();
lockdep_assert_wiphy(local->hw.wiphy);
- trace_drv_set_rts_threshold(local, value);
+ trace_drv_set_rts_threshold(local, radio_id, value);
if (local->ops->set_rts_threshold)
- ret = local->ops->set_rts_threshold(&local->hw, value);
+ ret = local->ops->set_rts_threshold(&local->hw, radio_id, value);
trace_drv_return_int(local, ret);
return ret;
}
@@ -823,9 +823,27 @@ DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
TP_ARGS(local, value)
);
-DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
- TP_PROTO(struct ieee80211_local *local, u32 value),
- TP_ARGS(local, value)
+TRACE_EVENT(drv_set_rts_threshold,
+ TP_PROTO(struct ieee80211_local *local, u8 radio_id, u32 value),
+
+ TP_ARGS(local, radio_id, value),
+
+ TP_STRUCT__entry(
+ LOCAL_ENTRY
+ __field(u8, radio_id)
+ __field(u32, value)
+ ),
+
+ TP_fast_assign(
+ LOCAL_ASSIGN;
+ __entry->radio_id = radio_id;
+ __entry->value = value;
+ ),
+
+ TP_printk(
+ LOCAL_PR_FMT " value:%d",
+ LOCAL_PR_ARG, __entry->value
+ )
);
TRACE_EVENT(drv_set_coverage_class,
@@ -1837,7 +1837,12 @@ int ieee80211_reconfig(struct ieee80211_local *local)
drv_set_frag_threshold(local, hw->wiphy->frag_threshold);
/* setup RTS threshold */
- drv_set_rts_threshold(local, hw->wiphy->rts_threshold);
+ if (hw->wiphy->n_radio)
+ for (i = 0; i < hw->wiphy->n_radio; i++)
+ drv_set_rts_threshold(local, i, hw->wiphy->radio_cfg[i].rts_threshold);
+
+ else
+ drv_set_rts_threshold(local, NL80211_WIPHY_RADIO_ID_MAX, hw->wiphy->rts_threshold);
/* reset coverage class */
drv_set_coverage_class(local, hw->wiphy->coverage_class);