mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-04-13 09:59:31 +00:00
wifi: mac80211: log link information in ieee80211_determine_chan_mode
ieee80211_determine_chan_mode is called for each link and if there is a downgrade, then it is interesting to know on which link it happened. Pass through the link_id where relevant and use the new link_id_info macro instead of sdata_info so that the link ID is printed when relevant. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250101070249.d400da710fc4.I64775ec914603d3c7b0c6ea14b507c0370c11622@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
2996843287
commit
2e3de34f5c
2 changed files with 26 additions and 14 deletions
|
@ -1,7 +1,7 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Portions
|
||||
* Copyright (C) 2022 - 2023 Intel Corporation
|
||||
* Copyright (C) 2022 - 2024 Intel Corporation
|
||||
*/
|
||||
#ifndef __MAC80211_DEBUG_H
|
||||
#define __MAC80211_DEBUG_H
|
||||
|
@ -152,6 +152,14 @@ do { \
|
|||
else \
|
||||
_sdata_err((link)->sdata, fmt, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
#define link_id_info(sdata, link_id, fmt, ...) \
|
||||
do { \
|
||||
if (ieee80211_vif_is_mld(&sdata->vif)) \
|
||||
_sdata_info(sdata, "[link %d] " fmt, link_id, \
|
||||
##__VA_ARGS__); \
|
||||
else \
|
||||
_sdata_info(sdata, fmt, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
#define _link_id_dbg(print, sdata, link_id, fmt, ...) \
|
||||
do { \
|
||||
if (ieee80211_vif_is_mld(&(sdata)->vif)) \
|
||||
|
|
|
@ -344,6 +344,7 @@ ieee80211_determine_ap_chan(struct ieee80211_sub_if_data *sdata,
|
|||
|
||||
static bool
|
||||
ieee80211_verify_peer_he_mcs_support(struct ieee80211_sub_if_data *sdata,
|
||||
int link_id,
|
||||
const struct ieee80211_he_cap_elem *he_cap,
|
||||
const struct ieee80211_he_operation *he_op)
|
||||
{
|
||||
|
@ -371,9 +372,9 @@ ieee80211_verify_peer_he_mcs_support(struct ieee80211_sub_if_data *sdata,
|
|||
*/
|
||||
if ((mcs_80_map_tx & 0x3) == IEEE80211_HE_MCS_NOT_SUPPORTED ||
|
||||
(mcs_80_map_rx & 0x3) == IEEE80211_HE_MCS_NOT_SUPPORTED) {
|
||||
sdata_info(sdata,
|
||||
"Missing mandatory rates for 1 Nss, rx 0x%x, tx 0x%x, disable HE\n",
|
||||
mcs_80_map_tx, mcs_80_map_rx);
|
||||
link_id_info(sdata, link_id,
|
||||
"Missing mandatory rates for 1 Nss, rx 0x%x, tx 0x%x, disable HE\n",
|
||||
mcs_80_map_tx, mcs_80_map_rx);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -417,9 +418,9 @@ ieee80211_verify_peer_he_mcs_support(struct ieee80211_sub_if_data *sdata,
|
|||
if (ap_rx_val == IEEE80211_HE_MCS_NOT_SUPPORTED ||
|
||||
ap_tx_val == IEEE80211_HE_MCS_NOT_SUPPORTED ||
|
||||
ap_rx_val < ap_op_val || ap_tx_val < ap_op_val) {
|
||||
sdata_info(sdata,
|
||||
"Invalid rates for %d Nss, rx %d, tx %d oper %d, disable HE\n",
|
||||
nss, ap_rx_val, ap_tx_val, ap_op_val);
|
||||
link_id_info(sdata, link_id,
|
||||
"Invalid rates for %d Nss, rx %d, tx %d oper %d, disable HE\n",
|
||||
nss, ap_rx_val, ap_tx_val, ap_op_val);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -870,8 +871,8 @@ again:
|
|||
return elems;
|
||||
case NL80211_BAND_6GHZ:
|
||||
if (ap_mode < IEEE80211_CONN_MODE_HE) {
|
||||
sdata_info(sdata,
|
||||
"Rejecting non-HE 6/7 GHz connection");
|
||||
link_id_info(sdata, link_id,
|
||||
"Rejecting non-HE 6/7 GHz connection");
|
||||
ret = -EINVAL;
|
||||
goto free;
|
||||
}
|
||||
|
@ -942,16 +943,18 @@ again:
|
|||
}
|
||||
|
||||
if (chanreq->oper.width != ap_chandef->width || ap_mode != conn->mode)
|
||||
sdata_info(sdata,
|
||||
"regulatory prevented using AP config, downgraded\n");
|
||||
link_id_info(sdata, link_id,
|
||||
"regulatory prevented using AP config, downgraded\n");
|
||||
|
||||
if (conn->mode >= IEEE80211_CONN_MODE_HE &&
|
||||
(!ieee80211_verify_peer_he_mcs_support(sdata, (void *)elems->he_cap,
|
||||
(!ieee80211_verify_peer_he_mcs_support(sdata, link_id,
|
||||
(void *)elems->he_cap,
|
||||
elems->he_operation) ||
|
||||
!ieee80211_verify_sta_he_mcs_support(sdata, sband,
|
||||
elems->he_operation))) {
|
||||
conn->mode = IEEE80211_CONN_MODE_VHT;
|
||||
sdata_info(sdata, "required MCSes not supported, disabling HE\n");
|
||||
link_id_info(sdata, link_id,
|
||||
"required MCSes not supported, disabling HE\n");
|
||||
}
|
||||
|
||||
if (conn->mode >= IEEE80211_CONN_MODE_EHT &&
|
||||
|
@ -961,7 +964,8 @@ again:
|
|||
conn->bw_limit = min_t(enum ieee80211_conn_bw_limit,
|
||||
conn->bw_limit,
|
||||
IEEE80211_CONN_BW_LIMIT_160);
|
||||
sdata_info(sdata, "required MCSes not supported, disabling EHT\n");
|
||||
link_id_info(sdata, link_id,
|
||||
"required MCSes not supported, disabling EHT\n");
|
||||
}
|
||||
|
||||
/* the mode can only decrease, so this must terminate */
|
||||
|
|
Loading…
Add table
Reference in a new issue