[PATCH ath-next 2/6] wifi: ath12k: Add support for 4-address mode
Tamizh Raja
tamizh.raja at oss.qualcomm.com
Sun Jun 7 23:03:20 PDT 2026
On Sun, Jun 7, 2026 at 9:03 PM Jeff Johnson
<jeff.johnson at oss.qualcomm.com> wrote:
>
> On 5/25/2026 4:09 AM, Tamizh Chelvam Raja wrote:
> ...
> > @@ -999,6 +1007,11 @@ static void ath12k_wifi7_mac_op_tx(struct ieee80211_hw *hw,
> > skb_cb->vif = vif;
> > skb_cb->ar = tmp_ar;
> >
> > + if (ahsta && ahsta->enable_4addr)
> > + arsta = rcu_dereference(ahsta->link[link_id]);
> > + else
> > + arsta = NULL;
> > +
> Tamizh, please check the smatch warning at:
> https://lore.kernel.org/oe-kbuild/202606051125.XaYVDQZf-lkp@intel.com/
>
> This looks legitimate since there is a path where link_id can be 15, exceeding
> the ahsta->link[] array.
>
The function has the below check at line 925 in the same function,
before the execution reaches line 979
/* handle only for MLO case, use deflink for non MLO case */
if (ieee80211_vif_is_mld(vif)) {
link_id = ath12k_mac_get_tx_link(sta, vif, link_id,
skb, info_flags);
if (link_id >= IEEE80211_MLD_MAX_NUM_LINKS) {
ieee80211_free_txskb(hw, skb);
return;
}
}
In this link_id has already been validated
- MLO path: explicitly checked link_id >= IEEE80211_MLD_MAX_NUM_LINKS
and returned early.
- Non-MLO path: link_id is set to 0 or a known-safe constant.
> /jeff
Tamizh.
More information about the ath12k
mailing list