Commit 6943e003 authored by Johannes Berg's avatar Johannes Berg

wifi: mac80211: add flag to disallow puncturing in 5 GHz

Some devices may not be capable of handling puncturing in 5 GHz
only (vs. the current flag that just removes puncturing support
completely). Add a flag to support such devices: check and then
downgrade the channel width if needed.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240318184907.49759510da7d.I12c5a61f0be512e0c4e574c2f794ef4b37ecaf6b@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent dc63b1d0
...@@ -2779,6 +2779,8 @@ struct ieee80211_txq { ...@@ -2779,6 +2779,8 @@ struct ieee80211_txq {
* *
* @IEEE80211_HW_DISALLOW_PUNCTURING: HW requires disabling puncturing in EHT * @IEEE80211_HW_DISALLOW_PUNCTURING: HW requires disabling puncturing in EHT
* and connecting with a lower bandwidth instead * and connecting with a lower bandwidth instead
* @IEEE80211_HW_DISALLOW_PUNCTURING_5GHZ: HW requires disabling puncturing in
* EHT in 5 GHz and connecting with a lower bandwidth instead
* *
* @IEEE80211_HW_HANDLES_QUIET_CSA: HW/driver handles quieting for CSA, so * @IEEE80211_HW_HANDLES_QUIET_CSA: HW/driver handles quieting for CSA, so
* no need to stop queues. This really should be set by a driver that * no need to stop queues. This really should be set by a driver that
...@@ -2843,6 +2845,7 @@ enum ieee80211_hw_flags { ...@@ -2843,6 +2845,7 @@ enum ieee80211_hw_flags {
IEEE80211_HW_DETECTS_COLOR_COLLISION, IEEE80211_HW_DETECTS_COLOR_COLLISION,
IEEE80211_HW_MLO_MCAST_MULTI_LINK_TX, IEEE80211_HW_MLO_MCAST_MULTI_LINK_TX,
IEEE80211_HW_DISALLOW_PUNCTURING, IEEE80211_HW_DISALLOW_PUNCTURING,
IEEE80211_HW_DISALLOW_PUNCTURING_5GHZ,
IEEE80211_HW_HANDLES_QUIET_CSA, IEEE80211_HW_HANDLES_QUIET_CSA,
/* keep last, obviously */ /* keep last, obviously */
......
...@@ -498,6 +498,7 @@ static const char *hw_flag_names[] = { ...@@ -498,6 +498,7 @@ static const char *hw_flag_names[] = {
FLAG(DETECTS_COLOR_COLLISION), FLAG(DETECTS_COLOR_COLLISION),
FLAG(MLO_MCAST_MULTI_LINK_TX), FLAG(MLO_MCAST_MULTI_LINK_TX),
FLAG(DISALLOW_PUNCTURING), FLAG(DISALLOW_PUNCTURING),
FLAG(DISALLOW_PUNCTURING_5GHZ),
FLAG(HANDLES_QUIET_CSA), FLAG(HANDLES_QUIET_CSA),
#undef FLAG #undef FLAG
}; };
......
...@@ -599,6 +599,10 @@ static bool ieee80211_chandef_usable(struct ieee80211_sub_if_data *sdata, ...@@ -599,6 +599,10 @@ static bool ieee80211_chandef_usable(struct ieee80211_sub_if_data *sdata,
ieee80211_hw_check(&sdata->local->hw, DISALLOW_PUNCTURING)) ieee80211_hw_check(&sdata->local->hw, DISALLOW_PUNCTURING))
return false; return false;
if (chandef->punctured && chandef->chan->band == NL80211_BAND_5GHZ &&
ieee80211_hw_check(&sdata->local->hw, DISALLOW_PUNCTURING_5GHZ))
return false;
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment