Message ID | 20220708095823.12959-1-MeiChia.Chiu@mediatek.com |
---|---|
State | New |
Headers | show |
Series | mac80211: fix a center frequency recalculation issue in ieee80211_chandef_downgrade | expand |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index bccc3a309ed0..bcb4aa7d7599 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -4075,7 +4075,7 @@ u32 ieee80211_chandef_downgrade(struct cfg80211_chan_def *c) /* n_P20 */ tmp = (150 + c->chan->center_freq - c->center_freq1) / 20; /* n_P160 */ - tmp /= 80; + tmp /= 8; c->center_freq1 = c->center_freq1 - 80 + 160 * tmp; c->width = NL80211_CHAN_WIDTH_160; ret = IEEE80211_STA_DISABLE_320MHZ;