@@ -738,7 +738,7 @@ struct ieee80211_bss_conf {
u8 tx_pwr_env_num;
u8 pwr_reduction;
bool eht_support;
- u16 eht_puncturing;
+ u32 eht_puncturing;
bool csa_active;
bool mu_mimo_owner;
@@ -1220,7 +1220,7 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
struct ieee80211_local *local = sdata->local;
struct beacon_data *old;
struct ieee80211_sub_if_data *vlan;
- u32 changed = BSS_CHANGED_BEACON_INT |
+ u64 changed = BSS_CHANGED_BEACON_INT |
BSS_CHANGED_BEACON_ENABLED |
BSS_CHANGED_BEACON |
BSS_CHANGED_P2P_PS |
@@ -1296,6 +1296,14 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO;
}
+ if (params->eht_cap) {
+ if (!ieee80211_valid_disable_subchannel_bitmap(
+ ¶ms->punct_bitmap,
+ params->chandef.width))
+ return -EINVAL;
+ link_conf->eht_puncturing = params->punct_bitmap;
+ changed |= BSS_CHANGED_EHT_PUNCTURING;
+ }
if (sdata->vif.type == NL80211_IFTYPE_AP &&
params->mbssid_config.tx_wdev) {
err = ieee80211_set_ap_mbssid_options(sdata,
@@ -2566,4 +2566,6 @@ ieee80211_eht_cap_ie_to_sta_eht_cap(struct ieee80211_sub_if_data *sdata,
const struct ieee80211_eht_cap_elem *eht_cap_ie_elem,
u8 eht_cap_len,
struct link_sta_info *link_sta);
+bool ieee80211_valid_disable_subchannel_bitmap(u32 *bitmap,
+ enum nl80211_chan_width bw);
#endif /* IEEE80211_I_H */
@@ -119,8 +119,8 @@ static const struct ieee80211_per_bw_puncturing_values per_bw_puncturing[] = {
IEEE80211_PER_BW_VALID_PUNCTURING_VALUES(320)
};
-static bool ieee80211_valid_disable_subchannel_bitmap(u16 *bitmap,
- enum nl80211_chan_width bw)
+bool ieee80211_valid_disable_subchannel_bitmap(u32 *bitmap,
+ enum nl80211_chan_width bw)
{
u32 idx, i;
@@ -206,7 +206,7 @@ ieee80211_handle_puncturing_bitmap(struct ieee80211_link_data *link,
ieee80211_extract_dis_subch_bmap(eht_oper, chandef,
bitmap);
- if (ieee80211_valid_disable_subchannel_bitmap(&bitmap,
+ if (ieee80211_valid_disable_subchannel_bitmap((u32 *)&bitmap,
chandef->width))
break;
link->u.mgd.conn_flags |=
@@ -5638,7 +5638,7 @@ static bool ieee80211_config_puncturing(struct ieee80211_link_data *link,
extracted == link->conf->eht_puncturing)
return true;
- if (!ieee80211_valid_disable_subchannel_bitmap(&bitmap,
+ if (!ieee80211_valid_disable_subchannel_bitmap((u32 *)&bitmap,
link->conf->chandef.width)) {
link_info(link,
"Got an invalid disable subchannel bitmap from AP %pM: bitmap = 0x%x, bw = 0x%x. disconnect\n",
@@ -7132,7 +7132,7 @@ ieee80211_setup_assoc_link(struct ieee80211_sub_if_data *sdata,
u16 bitmap;
bitmap = get_unaligned_le16(disable_subchannel_bitmap);
- if (ieee80211_valid_disable_subchannel_bitmap(&bitmap,
+ if (ieee80211_valid_disable_subchannel_bitmap((u32 *)&bitmap,
link->conf->chandef.width))
ieee80211_handle_puncturing_bitmap(link,
eht_oper,