Message ID | 20250127114030.43479-2-quic_periyasa@quicinc.com |
---|---|
State | New |
Headers | show |
Series | wifi: ath12k: Add monitor interface support on QCN9274 | expand |
On 1/27/2025 5:10 PM, Karthikeyan Periyasamy wrote: > From: Hari Chandrakanthan <quic_haric@quicinc.com> > > Currently, the link_valid field is not initialized in the monitor Rx path. > This can result in random values for the link_valid and link_id leads to > undefined behaviour in mac80211. Therefore, initialize the link_valid > field in the monitor Rx path. > > Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 > Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 > > Signed-off-by: Hari Chandrakanthan <quic_haric@quicinc.com> > Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com> > Tested-by: Nicolas Escande <nico.escande@gmail.com> > --- > drivers/net/wireless/ath/ath12k/dp_mon.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c > index 7e679ce177d3..023715df1126 100644 > --- a/drivers/net/wireless/ath/ath12k/dp_mon.c > +++ b/drivers/net/wireless/ath/ath12k/dp_mon.c > @@ -2001,6 +2001,8 @@ static void ath12k_dp_mon_rx_deliver_msdu(struct ath12k *ar, struct napi_struct > bool is_mcbc = rxcb->is_mcbc; > bool is_eapol_tkip = rxcb->is_eapol; > > + status->link_valid = 0; > + > if ((status->encoding == RX_ENC_HE) && !(status->flag & RX_FLAG_RADIOTAP_HE) && > !(status->flag & RX_FLAG_SKIP_MONITOR)) { > he = skb_push(msdu, sizeof(known)); Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c index 7e679ce177d3..023715df1126 100644 --- a/drivers/net/wireless/ath/ath12k/dp_mon.c +++ b/drivers/net/wireless/ath/ath12k/dp_mon.c @@ -2001,6 +2001,8 @@ static void ath12k_dp_mon_rx_deliver_msdu(struct ath12k *ar, struct napi_struct bool is_mcbc = rxcb->is_mcbc; bool is_eapol_tkip = rxcb->is_eapol; + status->link_valid = 0; + if ((status->encoding == RX_ENC_HE) && !(status->flag & RX_FLAG_RADIOTAP_HE) && !(status->flag & RX_FLAG_SKIP_MONITOR)) { he = skb_push(msdu, sizeof(known));