mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 15:43:08 -04:00
wifi: ath12k: Set IEEE80211_OFFLOAD_ENCAP_4ADDR after tx_encap_type vdev param
Currently, IEEE80211_OFFLOAD_ENCAP_4ADDR is set when
IEEE80211_OFFLOAD_ENCAP_ENABLED is present in vif->offload_flags
at the beginning of ath12k_mac_update_vif_offload().
However, if the WMI vdev set_param for tx_encap_type fails,
IEEE80211_OFFLOAD_ENCAP_ENABLED is cleared but
IEEE80211_OFFLOAD_ENCAP_4ADDR remains set, leaving the flags in
an inconsistent state.
Fix this by setting IEEE80211_OFFLOAD_ENCAP_4ADDR only after the
tx_encap_type has been configured via the WMI vdev set parameter.
Compile tested only.
Fixes: 729cad3c3c ("wifi: ath12k: Add 4-address mode support for eth offload")
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/20260701182428.906441-1-tamizh.raja@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
This commit is contained in:
committed by
Jeff Johnson
parent
12b09e478a
commit
be72d6aece
@@ -10118,16 +10118,15 @@ static void ath12k_mac_update_vif_offload(struct ath12k_link_vif *arvif)
|
||||
vif->type != NL80211_IFTYPE_AP)
|
||||
vif->offload_flags &= ~(IEEE80211_OFFLOAD_ENCAP_ENABLED |
|
||||
IEEE80211_OFFLOAD_DECAP_ENABLED |
|
||||
IEEE80211_OFFLOAD_ENCAP_MCAST);
|
||||
IEEE80211_OFFLOAD_ENCAP_MCAST |
|
||||
IEEE80211_OFFLOAD_ENCAP_4ADDR);
|
||||
|
||||
if (vif->offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED) {
|
||||
if (vif->offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED)
|
||||
ahvif->dp_vif.tx_encap_type = ATH12K_HW_TXRX_ETHERNET;
|
||||
vif->offload_flags |= IEEE80211_OFFLOAD_ENCAP_4ADDR;
|
||||
} else if (test_bit(ATH12K_FLAG_RAW_MODE, &ab->dev_flags)) {
|
||||
else if (test_bit(ATH12K_FLAG_RAW_MODE, &ab->dev_flags))
|
||||
ahvif->dp_vif.tx_encap_type = ATH12K_HW_TXRX_RAW;
|
||||
} else {
|
||||
else
|
||||
ahvif->dp_vif.tx_encap_type = ATH12K_HW_TXRX_NATIVE_WIFI;
|
||||
}
|
||||
|
||||
ret = ath12k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
|
||||
param_id, ahvif->dp_vif.tx_encap_type);
|
||||
@@ -10138,7 +10137,8 @@ static void ath12k_mac_update_vif_offload(struct ath12k_link_vif *arvif)
|
||||
}
|
||||
|
||||
if (vif->offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED)
|
||||
vif->offload_flags |= IEEE80211_OFFLOAD_ENCAP_MCAST;
|
||||
vif->offload_flags |= (IEEE80211_OFFLOAD_ENCAP_MCAST |
|
||||
IEEE80211_OFFLOAD_ENCAP_4ADDR);
|
||||
|
||||
param_id = WMI_VDEV_PARAM_RX_DECAP_TYPE;
|
||||
if (vif->offload_flags & IEEE80211_OFFLOAD_DECAP_ENABLED)
|
||||
|
||||
Reference in New Issue
Block a user