Skip to content

Commit e1125b0

Browse files
Tamizh Chelvam Rajajeff-t-johnson
authored andcommitted
wifi: ath12k: Set WDS vdev parameter for 4-address station interface
Set WDS vdev parameter during station interface creation to enable 4-address mode. Unlike AP interfaces that set peer-specific 4-address mode parameters after receiving 4-address frames from stations, station interfaces must send all data frames in 4-address mode immediately after association, including 4-address NULL frames. Firmware requires 4-address notification for station interfaces during vdev creation. Configure the WDS vdev parameter for station interfaces. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1 Co-developed-by: Ramya Gnanasekar <ramya.gnanasekar@oss.qualcomm.com> Signed-off-by: Ramya Gnanasekar <ramya.gnanasekar@oss.qualcomm.com> Signed-off-by: Tamizh Chelvam Raja <tamizh.raja@oss.qualcomm.com> Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Link: https://patch.msgid.link/20260525110942.2890212-2-tamizh.raja@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
1 parent 675aa75 commit e1125b0

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

  • drivers/net/wireless/ath/ath12k

drivers/net/wireless/ath/ath12k/mac.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10235,6 +10235,7 @@ int ath12k_mac_vdev_create(struct ath12k *ar, struct ath12k_link_vif *arvif)
1023510235
struct ieee80211_hw *hw = ah->hw;
1023610236
struct ath12k_vif *ahvif = arvif->ahvif;
1023710237
struct ieee80211_vif *vif = ath12k_ahvif_to_vif(ahvif);
10238+
struct wireless_dev *wdev = ieee80211_vif_to_wdev(vif);
1023810239
struct ath12k_wmi_vdev_create_arg vdev_arg = {};
1023910240
struct ath12k_wmi_peer_create_arg peer_param = {};
1024010241
struct ieee80211_bss_conf *link_conf = NULL;
@@ -10403,6 +10404,25 @@ int ath12k_mac_vdev_create(struct ath12k *ar, struct ath12k_link_vif *arvif)
1040310404
goto err_peer_del;
1040410405
}
1040510406

10407+
/*
10408+
* There could be race condition in firmware for the station
10409+
* interface between enabling 4-address peer WMI param and
10410+
* sending 4-address frame (NULL or EAPOL via TCL).
10411+
* Make the station as WDS while bringup itself
10412+
* to avoid the race condition
10413+
*/
10414+
if (vif->type == NL80211_IFTYPE_STATION &&
10415+
(wdev && wdev->use_4addr)) {
10416+
ret = ath12k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
10417+
WMI_VDEV_PARAM_WDS,
10418+
1);
10419+
if (ret) {
10420+
ath12k_warn(ar->ab, "failed to set WDS vdev param: %d\n",
10421+
ret);
10422+
goto err_peer_del;
10423+
}
10424+
}
10425+
1040610426
if (test_bit(WMI_TLV_SERVICE_11D_OFFLOAD, ab->wmi_ab.svc_map) &&
1040710427
ahvif->vdev_type == WMI_VDEV_TYPE_STA &&
1040810428
ahvif->vdev_subtype == WMI_VDEV_SUBTYPE_NONE) {

0 commit comments

Comments
 (0)