Add more logging in places that affect HT/VHT/HE state, so things get easier to debug.
Unified · Split
| @@ -164,12 +164,15 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata, · 163 unmodified lines | ||
| 164 | 164 | chandef->freq1_offset = channel->freq_offset; |
| 165 | 165 | |
| 166 | 166 | if (channel->band == NL80211_BAND_6GHZ) { |
| 167 | − if (!ieee80211_chandef_he_6ghz_oper(sdata, he_oper, chandef)) | |
| 167 | + if (!ieee80211_chandef_he_6ghz_oper(sdata, he_oper, chandef)) { | |
| 168 | + mlme_dbg(sdata, | |
| 169 | + "bad 6 GHz operation, disabling HT/VHT/HE\n"); | |
| 168 | 170 | ret = IEEE80211_STA_DISABLE_HT | |
| 169 | 171 | IEEE80211_STA_DISABLE_VHT | |
| 170 | 172 | IEEE80211_STA_DISABLE_HE; |
| 171 | − else | |
| 173 | + } else { | |
| 172 | 174 | ret = 0; |
| 175 | + } | |
| 173 | 176 | vht_chandef = *chandef; |
| 174 | 177 | goto out; |
| 175 | 178 | } else if (sband->band == NL80211_BAND_S1GHZ) { |
| @@ -190,6 +193,7 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata, · 14 unmodified lines | ||
| 190 | 193 | ieee80211_apply_htcap_overrides(sdata, &sta_ht_cap); |
| 191 | 194 | |
| 192 | 195 | if (!ht_oper || !sta_ht_cap.ht_supported) { |
| 196 | + mlme_dbg(sdata, "HT operation missing / HT not supported\n"); | |
| 193 | 197 | ret = IEEE80211_STA_DISABLE_HT | |
| 194 | 198 | IEEE80211_STA_DISABLE_VHT | |
| 195 | 199 | IEEE80211_STA_DISABLE_HE; |
| @@ -223,6 +227,7 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata, · 27 unmodified lines | ||
| 223 | 227 | if (sta_ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) { |
| 224 | 228 | ieee80211_chandef_ht_oper(ht_oper, chandef); |
| 225 | 229 | } else { |
| 230 | + mlme_dbg(sdata, "40 MHz not supported\n"); | |
| 226 | 231 | /* 40 MHz (and 80 MHz) must be supported for VHT */ |
| 227 | 232 | ret = IEEE80211_STA_DISABLE_VHT; |
| 228 | 233 | /* also mark 40 MHz disabled */ |
| @@ -231,6 +236,7 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata, · 2 unmodified lines | ||
| 231 | 236 | } |
| 232 | 237 | |
| 233 | 238 | if (!vht_oper || !sband->vht_cap.vht_supported) { |
| 239 | + mlme_dbg(sdata, "VHT operation missing / VHT not supported\n"); | |
| 234 | 240 | ret = IEEE80211_STA_DISABLE_VHT; |
| 235 | 241 | goto out; |
| 236 | 242 | } |
| @@ -253,7 +259,7 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata, · 16 unmodified lines | ||
| 253 | 259 | &vht_chandef)) { |
| 254 | 260 | if (!(ifmgd->flags & IEEE80211_STA_DISABLE_HE)) |
| 255 | 261 | sdata_info(sdata, |
| 256 | − "HE AP VHT information is invalid, disable HE\n"); | |
| 262 | + "HE AP VHT information is invalid, disabling HE\n"); | |
| 257 | 263 | ret = IEEE80211_STA_DISABLE_HE; |
| 258 | 264 | goto out; |
| 259 | 265 | } |
| @@ -263,7 +269,7 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata, · 3 unmodified lines | ||
| 263 | 269 | &vht_chandef)) { |
| 264 | 270 | if (!(ifmgd->flags & IEEE80211_STA_DISABLE_VHT)) |
| 265 | 271 | sdata_info(sdata, |
| 266 | − "AP VHT information is invalid, disable VHT\n"); | |
| 272 | + "AP VHT information is invalid, disabling VHT\n"); | |
| 267 | 273 | ret = IEEE80211_STA_DISABLE_VHT; |
| 268 | 274 | goto out; |
| 269 | 275 | } |
| @@ -271,7 +277,7 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata, · 1 unmodified line | ||
| 271 | 277 | if (!cfg80211_chandef_valid(&vht_chandef)) { |
| 272 | 278 | if (!(ifmgd->flags & IEEE80211_STA_DISABLE_VHT)) |
| 273 | 279 | sdata_info(sdata, |
| 274 | − "AP VHT information is invalid, disable VHT\n"); | |
| 280 | + "AP VHT information is invalid, disabling VHT\n"); | |
| 275 | 281 | ret = IEEE80211_STA_DISABLE_VHT; |
| 276 | 282 | goto out; |
| 277 | 283 | } |
| @@ -284,7 +290,7 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata, · 6 unmodified lines | ||
| 284 | 290 | if (!cfg80211_chandef_compatible(chandef, &vht_chandef)) { |
| 285 | 291 | if (!(ifmgd->flags & IEEE80211_STA_DISABLE_VHT)) |
| 286 | 292 | sdata_info(sdata, |
| 287 | − "AP VHT information doesn't match HT, disable VHT\n"); | |
| 293 | + "AP VHT information doesn't match HT, disabling VHT\n"); | |
| 288 | 294 | ret = IEEE80211_STA_DISABLE_VHT; |
| 289 | 295 | goto out; |
| 290 | 296 | } |
| @@ -5036,19 +5042,23 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata, · 4745 unmodified lines | ||
| 5036 | 5042 | |
| 5037 | 5043 | /* disable HT/VHT/HE if we don't support them */ |
| 5038 | 5044 | if (!sband->ht_cap.ht_supported && !is_6ghz) { |
| 5045 | + mlme_dbg(sdata, "HT not supported, disabling HT/VHT/HE\n"); | |
| 5039 | 5046 | ifmgd->flags |= IEEE80211_STA_DISABLE_HT; |
| 5040 | 5047 | ifmgd->flags |= IEEE80211_STA_DISABLE_VHT; |
| 5041 | 5048 | ifmgd->flags |= IEEE80211_STA_DISABLE_HE; |
| 5042 | 5049 | } |
| 5043 | 5050 | |
| 5044 | 5051 | if (!sband->vht_cap.vht_supported && is_5ghz) { |
| 5052 | + mlme_dbg(sdata, "VHT not supported, disabling VHT/HE\n"); | |
| 5045 | 5053 | ifmgd->flags |= IEEE80211_STA_DISABLE_VHT; |
| 5046 | 5054 | ifmgd->flags |= IEEE80211_STA_DISABLE_HE; |
| 5047 | 5055 | } |
| 5048 | 5056 | |
| 5049 | 5057 | if (!ieee80211_get_he_iftype_cap(sband, |
| 5050 | − ieee80211_vif_type_p2p(&sdata->vif))) | |
| 5058 | + ieee80211_vif_type_p2p(&sdata->vif))) { | |
| 5059 | + mlme_dbg(sdata, "HE not supported, disabling it\n"); | |
| 5051 | 5060 | ifmgd->flags |= IEEE80211_STA_DISABLE_HE; |
| 5061 | + } | |
| 5052 | 5062 | |
| 5053 | 5063 | if (!(ifmgd->flags & IEEE80211_STA_DISABLE_HT) && !is_6ghz) { |
| 5054 | 5064 | ht_oper = elems->ht_operation; |
| @@ -5072,6 +5082,8 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata, · 17 unmodified lines | ||
| 5072 | 5082 | } |
| 5073 | 5083 | |
| 5074 | 5084 | if (!elems->vht_cap_elem) { |
| 5085 | + sdata_info(sdata, | |
| 5086 | + "bad VHT capabilities, disabling VHT\n"); | |
| 5075 | 5087 | ifmgd->flags |= IEEE80211_STA_DISABLE_VHT; |
| 5076 | 5088 | vht_oper = NULL; |
| 5077 | 5089 | } |
| @@ -5119,8 +5131,10 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata, · 41 unmodified lines | ||
| 5119 | 5131 | break; |
| 5120 | 5132 | } |
| 5121 | 5133 | |
| 5122 | − if (!have_80mhz) | |
| 5134 | + if (!have_80mhz) { | |
| 5135 | + sdata_info(sdata, "80 MHz not supported, disabling VHT\n"); | |
| 5123 | 5136 | ifmgd->flags |= IEEE80211_STA_DISABLE_VHT; |
| 5137 | + } | |
| 5124 | 5138 | |
| 5125 | 5139 | if (sband->band == NL80211_BAND_S1GHZ) { |
| 5126 | 5140 | s1g_oper = elems->s1g_oper; |
| @@ -5684,12 +5698,14 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, · 557 unmodified lines | ||
| 5684 | 5698 | else if (!is_6ghz) |
| 5685 | 5699 | ifmgd->flags |= IEEE80211_STA_DISABLE_HT; |
| 5686 | 5700 | vht_elem = ieee80211_bss_get_elem(req->bss, WLAN_EID_VHT_CAPABILITY); |
| 5687 | − if (vht_elem && vht_elem->datalen >= sizeof(struct ieee80211_vht_cap)) | |
| 5701 | + if (vht_elem && vht_elem->datalen >= sizeof(struct ieee80211_vht_cap)) { | |
| 5688 | 5702 | memcpy(&assoc_data->ap_vht_cap, vht_elem->data, |
| 5689 | 5703 | sizeof(struct ieee80211_vht_cap)); |
| 5690 | − else if (is_5ghz) | |
| 5704 | + } else if (is_5ghz) { | |
| 5705 | + sdata_info(sdata, "VHT capa missing/short, disabling VHT/HE\n"); | |
| 5691 | 5706 | ifmgd->flags |= IEEE80211_STA_DISABLE_VHT | |
| 5692 | 5707 | IEEE80211_STA_DISABLE_HE; |
| 5708 | + } | |
| 5693 | 5709 | rcu_read_unlock(); |
| 5694 | 5710 | |
| 5695 | 5711 | if (WARN((sdata->vif.driver_flags & IEEE80211_VIF_SUPPORTS_UAPSD) && |
| @@ -5763,16 +5779,21 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, · 67 unmodified lines | ||
| 5763 | 5779 | } |
| 5764 | 5780 | |
| 5765 | 5781 | if (req->flags & ASSOC_REQ_DISABLE_HT) { |
| 5782 | + mlme_dbg(sdata, "HT disabled by flag, disabling HT/VHT/HE\n"); | |
| 5766 | 5783 | ifmgd->flags |= IEEE80211_STA_DISABLE_HT; |
| 5767 | 5784 | ifmgd->flags |= IEEE80211_STA_DISABLE_VHT; |
| 5768 | 5785 | ifmgd->flags |= IEEE80211_STA_DISABLE_HE; |
| 5769 | 5786 | } |
| 5770 | 5787 | |
| 5771 | − if (req->flags & ASSOC_REQ_DISABLE_VHT) | |
| 5788 | + if (req->flags & ASSOC_REQ_DISABLE_VHT) { | |
| 5789 | + mlme_dbg(sdata, "VHT disabled by flag, disabling VHT\n"); | |
| 5772 | 5790 | ifmgd->flags |= IEEE80211_STA_DISABLE_VHT; |
| 5791 | + } | |
| 5773 | 5792 | |
| 5774 | − if (req->flags & ASSOC_REQ_DISABLE_HE) | |
| 5793 | + if (req->flags & ASSOC_REQ_DISABLE_HE) { | |
| 5794 | + mlme_dbg(sdata, "HE disabled by flag, disabling VHT\n"); | |
| 5775 | 5795 | ifmgd->flags |= IEEE80211_STA_DISABLE_HE; |
| 5796 | + } | |
| 5776 | 5797 | |
| 5777 | 5798 | err = ieee80211_prep_connection(sdata, req->bss, true, override); |
| 5778 | 5799 | if (err) |