mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-14 19:38:37 +04:00
ieee80211_mgmt_tx() walks the links of an AP MLD to decide whether a frame needs an off-channel transmission. It pins the link that holds the requested channel only when the destination is a station that already associated as an MLD. A frame to an address the access point does not know keeps link_id at -1, the link reaches the driver unspecified, and the driver picks the default link, which holds a different channel and a different address. A DPP Authentication Request shows this: the enrollee announces itself on channel 6, the access point answers under the address of its 5 GHz link, and the enrollee never sees the frame. Pin the link whenever an active link holds the requested channel. ieee80211_tx_skb_tid() warns on a link id for an interface that is not an MLD and on one that names an inactive link, and active_links is zero for an interface that is not an MLD, so that one test covers both. A station MLD that sends from its MLD address to an address other than its AP gets the same pin. A link whose own address is the MLD address also matched the frame on that address and ended the search, so a lower link that uses the MLD address hid the link with the requested channel. Skip such a link when the frame names another channel. Frames to a station keep their present behaviour: the branch runs only where the caller named a channel, and where the destination is a station that associated as an MLD the same branch already pinned the link. Signed-off-by: Felix Fietkau <nbd@nbd.name>