diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -2595,11 +2595,15 @@ static int ht_recv_action_ht_txchwidth(struct ieee80211_node *ni, - const struct ieee80211_frame *wh, - const uint8_t *frm, const uint8_t *efrm) + const struct ieee80211_frame *wh __unused, + const uint8_t *frm, const uint8_t *efrm __unused) { int chw; + /* If 20/40 is not supported the chw cannot change. */ + if ((ni->ni_htcap & IEEE80211_HTCAP_CHWIDTH40) == 0) + return (0); + chw = (frm[2] == IEEE80211_A_HT_TXCHWIDTH_2040) ? IEEE80211_STA_RX_BW_40 : IEEE80211_STA_RX_BW_20;