Skip to content

Commit ea5cca7

Browse files
committed
wifi: iwlwifi: mvm: disallow puncturing in US/Canada
For now, this isn't allowed. The API to mac80211 isn't great for this, but we need to change the API to move puncturing into the chanctx/chandef, and will do it better then. Signed-off-by: Johannes Berg <[email protected]> Reviewed-by: Gregory Greenman <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20231219215605.38955b68b429.I0c4ae99179b271648a747a51eb04853504c7952c@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent f7e3ab5 commit ea5cca7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,16 @@ struct ieee80211_regdomain *iwl_mvm_get_regdomain(struct wiphy *wiphy,
152152
mvm->lar_regdom_set = true;
153153
mvm->mcc_src = src_id;
154154

155+
/* Some kind of regulatory mess means we need to currently disallow
156+
* puncturing in the US and Canada. Do that here, at least until we
157+
* figure out the new chanctx APIs for puncturing.
158+
*/
159+
if (resp->mcc == cpu_to_le16(IWL_MCC_US) ||
160+
resp->mcc == cpu_to_le16(IWL_MCC_CANADA))
161+
ieee80211_hw_set(mvm->hw, DISALLOW_PUNCTURING);
162+
else
163+
__clear_bit(IEEE80211_HW_DISALLOW_PUNCTURING, mvm->hw->flags);
164+
155165
iwl_mei_set_country_code(__le16_to_cpu(resp->mcc));
156166

157167
out:

0 commit comments

Comments
 (0)