@@ -1952,6 +1952,7 @@ struct ieee80211_sta {
struct ieee80211_sta_vht_cap vht_cap;
struct ieee80211_sta_he_cap he_cap;
struct ieee80211_he_operation he_operation;
+ struct ieee80211_he_obss_pd he_obss_pd;
u16 max_rx_aggregation_subframes;
bool wme;
u8 uapsd_queues;
@@ -67,3 +67,27 @@ ieee80211_he_op_ie_to_sta_he_op(struct ieee80211_sub_if_data *sdata,
}
memcpy(he_operation, he_op_ie_elem, sizeof(*he_operation));
}
+
+void
+ieee80211_he_spr_ie_to_sta_he_obss_pd(struct ieee80211_sub_if_data *sdata,
+ const struct ieee80211_he_spr *he_spr_ie_elem,
+ struct sta_info *sta)
+{
+ struct ieee80211_he_obss_pd *he_obss_pd = &sta->sta.he_obss_pd;
+ const u8 *data = he_spr_ie_elem->optional;
+
+ memset(he_obss_pd, 0, sizeof(*he_obss_pd));
+
+ if (!he_spr_ie_elem)
+ return;
+
+ if (he_spr_ie_elem->he_sr_control &
+ IEEE80211_HE_SPR_NON_SRG_OFFSET_PRESENT)
+ data++;
+ if (he_spr_ie_elem->he_sr_control &
+ IEEE80211_HE_SPR_SRG_INFORMATION_PRESENT) {
+ he_obss_pd->max_offset = *data++;
+ he_obss_pd->min_offset = *data++;
+ he_obss_pd->enable = true;
+ }
+}
@@ -1870,6 +1870,10 @@ ieee80211_he_cap_ie_to_sta_he_cap(struct ieee80211_sub_if_data *sdata,
struct ieee80211_supported_band *sband,
const u8 *he_cap_ie, u8 he_cap_len,
struct sta_info *sta);
+void
+ieee80211_he_spr_ie_to_sta_he_obss_pd(struct ieee80211_sub_if_data *sdata,
+ const struct ieee80211_he_spr *he_spr_ie_elem,
+ struct sta_info *sta);
void
ieee80211_he_op_ie_to_sta_he_op(struct ieee80211_sub_if_data *sdata,
@@ -3377,6 +3377,7 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
bss_conf->uora_ocw_range = elems.uora_element[0];
ieee80211_he_op_ie_to_sta_he_op(sdata, elems.he_operation, sta);
+ ieee80211_he_spr_ie_to_sta_he_obss_pd(sdata, elems.he_spr, sta);
/* TODO: OPEN: what happens if BSS color disable is set? */
}