Message ID | 20250310200237.652950-4-aloka.dixit@oss.qualcomm.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Jeff Johnson |
Headers | show |
Series | wifi: MBSSID support in MLO | expand |
On 3/10/2025 1:02 PM, Aloka Dixit wrote: > Three out of four callers to ath12k_mac_get_tx_arvif() have > link_conf pointer already set for other operations. Pass it > as a parameter. Modify ath12k_control_beaconing() to set > link_conf first. > > Signed-off-by: Aloka Dixit <aloka.dixit@oss.qualcomm.com> > --- > drivers/net/wireless/ath/ath12k/mac.c | 31 +++++++++++++++------------ > 1 file changed, 17 insertions(+), 14 deletions(-) > Forgot to add tested on tag: Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Will send the driver changes again with the tag if required once nl80211/mac80211 review completes. - Aloka
On 3/10/2025 1:06 PM, Aloka Dixit wrote: > On 3/10/2025 1:02 PM, Aloka Dixit wrote: >> Three out of four callers to ath12k_mac_get_tx_arvif() have >> link_conf pointer already set for other operations. Pass it >> as a parameter. Modify ath12k_control_beaconing() to set >> link_conf first. >> >> Signed-off-by: Aloka Dixit <aloka.dixit@oss.qualcomm.com> >> --- >> drivers/net/wireless/ath/ath12k/mac.c | 31 +++++++++++++++------------ >> 1 file changed, 17 insertions(+), 14 deletions(-) >> > > Forgot to add tested on tag: > Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 > > Will send the driver changes again with the tag if required once > nl80211/mac80211 review completes. If Johannes accepts the first two patches I can add this to the ath12k patch. Note, however, that you forgot the wireless-next subject prefix tag ;) /jeff
On 3/10/2025 4:18 PM, Jeff Johnson wrote: > On 3/10/2025 1:06 PM, Aloka Dixit wrote: >> On 3/10/2025 1:02 PM, Aloka Dixit wrote: >>> Three out of four callers to ath12k_mac_get_tx_arvif() have >>> link_conf pointer already set for other operations. Pass it >>> as a parameter. Modify ath12k_control_beaconing() to set >>> link_conf first. >>> >>> Signed-off-by: Aloka Dixit <aloka.dixit@oss.qualcomm.com> >>> --- >>> drivers/net/wireless/ath/ath12k/mac.c | 31 +++++++++++++++------------ >>> 1 file changed, 17 insertions(+), 14 deletions(-) >>> >> >> Forgot to add tested on tag: >> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 >> >> Will send the driver changes again with the tag if required once >> nl80211/mac80211 review completes. > > If Johannes accepts the first two patches I can add this to the ath12k patch. > > Note, however, that you forgot the wireless-next subject prefix tag ;) > > /jeff Yeah, I see a nice table with warnings now, will take care of it once the technical review is done :-)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 84da77bf245b..200a2a8ff166 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -580,22 +580,16 @@ static int ath12k_mac_vif_link_chan(struct ieee80211_vif *vif, u8 link_id, return 0; } -static struct ath12k_link_vif *ath12k_mac_get_tx_arvif(struct ath12k_link_vif *arvif) +static struct ath12k_link_vif * +ath12k_mac_get_tx_arvif(struct ath12k_link_vif *arvif, + struct ieee80211_bss_conf *link_conf) { - struct ieee80211_bss_conf *link_conf, *tx_bss_conf; + struct ieee80211_bss_conf *tx_bss_conf; struct ath12k *ar = arvif->ar; struct ath12k_vif *tx_ahvif; lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy); - link_conf = ath12k_mac_get_link_bss_conf(arvif); - if (!link_conf) { - ath12k_warn(ar->ab, - "unable to access bss link conf for link %u required to retrieve transmitting link conf\n", - arvif->link_id); - return NULL; - } - tx_bss_conf = wiphy_dereference(ath12k_ar_to_hw(ar)->wiphy, link_conf->tx_bss_conf); if (tx_bss_conf) { @@ -1729,7 +1723,7 @@ static int ath12k_mac_setup_bcn_tmpl(struct ath12k_link_vif *arvif) return -ENOLINK; } - tx_arvif = ath12k_mac_get_tx_arvif(arvif); + tx_arvif = ath12k_mac_get_tx_arvif(arvif, link_conf); if (tx_arvif) { if (tx_arvif != arvif && arvif->is_up) return 0; @@ -1799,6 +1793,7 @@ static void ath12k_control_beaconing(struct ath12k_link_vif *arvif, { struct ath12k_wmi_vdev_up_params params = {}; struct ath12k_vif *ahvif = arvif->ahvif; + struct ieee80211_bss_conf *link_conf; struct ath12k_link_vif *tx_arvif; struct ath12k *ar = arvif->ar; int ret; @@ -1831,7 +1826,15 @@ static void ath12k_control_beaconing(struct ath12k_link_vif *arvif, params.aid = ahvif->aid; params.bssid = arvif->bssid; - tx_arvif = ath12k_mac_get_tx_arvif(arvif); + link_conf = ath12k_mac_get_link_bss_conf(arvif); + if (!link_conf) { + ath12k_warn(ar->ab, + "unable to access bss link conf for link %u required to retrieve transmitting link conf\n", + arvif->link_id); + return; + } + + tx_arvif = ath12k_mac_get_tx_arvif(arvif, link_conf); if (tx_arvif) { params.tx_bssid = tx_arvif->bssid; params.nontx_profile_idx = info->bssid_index; @@ -7868,7 +7871,7 @@ static int ath12k_mac_setup_vdev_params_mbssid(struct ath12k_link_vif *arvif, return -ENOLINK; } - tx_arvif = ath12k_mac_get_tx_arvif(arvif); + tx_arvif = ath12k_mac_get_tx_arvif(arvif, link_conf); if (!tx_arvif) return 0; @@ -9322,7 +9325,7 @@ ath12k_mac_update_vif_chan(struct ath12k *ar, params.aid = ahvif->aid; params.bssid = arvif->bssid; - tx_arvif = ath12k_mac_get_tx_arvif(arvif); + tx_arvif = ath12k_mac_get_tx_arvif(arvif, link_conf); if (tx_arvif) { params.tx_bssid = tx_arvif->bssid; params.nontx_profile_idx = link_conf->bssid_index;
Three out of four callers to ath12k_mac_get_tx_arvif() have link_conf pointer already set for other operations. Pass it as a parameter. Modify ath12k_control_beaconing() to set link_conf first. Signed-off-by: Aloka Dixit <aloka.dixit@oss.qualcomm.com> --- drivers/net/wireless/ath/ath12k/mac.c | 31 +++++++++++++++------------ 1 file changed, 17 insertions(+), 14 deletions(-)