1: 65a1d856ebd4 = 1: bf9ffc12136f wifi: iwlwifi: use link_sta internally to the driver 2: f073758d8ccf ! 2: 9e310fa37c3c wifi: mac80211: change public RX API to use link stations @@ drivers/net/wireless/mediatek/mt76/mac80211.c: EXPORT_SYMBOL(mt76_rx_signal); { struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); struct ieee80211_hdr *hdr = mt76_skb_get_hdr(skb); + struct mt76_rx_status mstat; ++ struct ieee80211_sta *sta; +  + mstat = *((struct mt76_rx_status *)skb->cb); + memset(status, 0, sizeof(*status));  @@ drivers/net/wireless/mediatek/mt76/mac80211.c: mt76_rx_convert(struct mt76_dev *dev, struct sk_buff *skb, + memcpy(status->chain_signal, mstat.chain_signal, sizeof(mstat.chain_signal));  - if (mstat.wcid) { +- if (mstat.wcid) {  - status->link_valid = mstat.wcid->link_valid;  - status->link_id = mstat.wcid->link_id; -+ struct ieee80211_sta *sta = wcid_to_sta(mstat.wcid); -+ -+ if (mstat.wcid->link_valid) -+ *link_sta = -+ rcu_dereference(sta->link[mstat.wcid->link_id]); -+ else -+ *link_sta = &sta->deflink; - } +- } ++ sta = wcid_to_sta(mstat.wcid); ++ if (!sta) ++ *link_sta = NULL; ++ else if (mstat.wcid->link_valid) ++ *link_sta = rcu_dereference(sta->link[mstat.wcid->link_id]); ++ else ++ *link_sta = &sta->deflink;   - *sta = wcid_to_sta(mstat.wcid); *hw = mt76_phy_hw(dev, mstat.phy_idx); 3: 7a20d7204b66 = 3: 5ebeb4c6e93a wifi: mac80211: refactor RX link_id and station handling 4: 05e39fa1c158 = 4: 166e38f65bc1 wifi: mac80211: rework RX packet handling 5: 723be563c297 ! 5: 07ab91775685 wifi: cfg80211: add attribute for TX/RX denoting there is no station @@ include/uapi/linux/nl80211.h: enum nl80211_commands { * The aggregated message always precedes the per-link messages for the * same station within a dump sequence. * -+ * @NL80211_ATTR_FRAME_CMD_NO_STA: Valid for NL80211_CMD_FRAME to denote that ++ * @NL80211_ATTR_FRAME_NO_STA: Valid for @NL80211_CMD_FRAME to denote that  + * the kernel had no station for a received frame or should not use a  + * known station to transmit a frame. This is relevant to know whether  + * MLD address translation happened or to disable it when sending a frame. @@ include/uapi/linux/nl80211.h: enum nl80211_attrs {  NL80211_ATTR_STA_DUMP_LINK_STATS,  -+ NL80211_ATTR_FRAME_CMD_NO_STA, ++ NL80211_ATTR_FRAME_NO_STA,  + /* add attributes here, update the policy in nl80211.c */  @@ net/wireless/nl80211.c: static const struct nla_policy nl80211_policy[NUM_NL8021 [NL80211_ATTR_NPCA_PUNCT_BITMAP] = NLA_POLICY_FULL_RANGE(NLA_U32, &nl80211_punct_bitmap_range), [NL80211_ATTR_STA_DUMP_LINK_STATS] = { .type = NLA_FLAG }, -+ [NL80211_ATTR_FRAME_CMD_NO_STA] = { .type = NLA_FLAG }, ++ [NL80211_ATTR_FRAME_NO_STA] = { .type = NLA_FLAG }, };  /* policy for the key attributes */ @@ net/wireless/nl80211.c: static int nl80211_tx_mgmt(struct sk_buff *skb, struct g return -EINVAL;   + params.no_sta = -+ nla_get_flag(info->attrs[NL80211_ATTR_FRAME_CMD_NO_STA]); ++ nla_get_flag(info->attrs[NL80211_ATTR_FRAME_NO_STA]);  + params.buf = nla_data(info->attrs[NL80211_ATTR_FRAME]); params.len = nla_len(info->attrs[NL80211_ATTR_FRAME]); @@ net/wireless/nl80211.c: int nl80211_send_mgmt(struct cfg80211_registered_device  - NL80211_ATTR_PAD)))  + NL80211_ATTR_PAD)) ||  + (info->no_sta && -+ nla_put_flag(msg, NL80211_ATTR_FRAME_CMD_NO_STA))) ++ nla_put_flag(msg, NL80211_ATTR_FRAME_NO_STA))) goto nla_put_failure;  genlmsg_end(msg, hdr); 6: d0670e621392 = 6: 638d861e281c wifi: mac80211: report to cfg80211 when no STA is known for a frame 7: 38b9f348a67f = 7: 2c898636195a wifi: mac80211: pass station to ieee80211_tx_skb_tid 8: f0cae28bdac3 ! 8: 49d4f6c22c64 uwifi: mac80211: pass error station if non-STA transmit was requested @@ Metadata Author: Benjamin Berg   ## Commit message ## - uwifi: mac80211: pass error station if non-STA transmit was requested + wifi: mac80211: pass error station if non-STA transmit was requested  When cfg80211 requested a transmit without a station, pass an error station to ieee80211_tx_skb_tid instead of the correct one.