mac80211: allow station search on AP/VLANs
PATCH 1/1 mac80211: allow station search on AP/VLANs
When mac80211 receives a packet, we interate over the list of active interfaces to find the station(which transmitted the packet). Currently, station search is not allowed on AP/VLAN interface; since stations can also get mapped to AP/VLAN interfaces, they are worth considering for station search.
Found this during code review; just a theoritical fix.
--- net/mac80211/rx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
net/mac80211/rx.c +1 -2
@@ -4391,8 +4391,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,if (!ieee80211_sdata_running (sdata))continue ; -if (sdata->vif.type ==NL80211_IFTYPE_MONITOR || - sdata->vif.type ==NL80211_IFTYPE_AP_VLAN ) +if (sdata->vif.type ==NL80211_IFTYPE_MONITOR )continue ;/*
Signature · 1 line
2.7.4
Johannes Berg
maintainerQuoted 5 lines · Manikanta Pubbisetty
When mac80211 receives a packet, we interate over the list of active interfaces to find the station(which transmitted the packet). Currently, station search is not allowed on AP/VLAN interface; since stations can also get mapped to AP/VLAN interfaces, they are worth considering for station search.
I don't see how this makes sense. We use sta_info_get_bss() later, so any AP/AP_VLAN would be OK, so we don't need to try it twice for AP_VLAN?
johannes
Quoted 9 lines · Johannes Berg
Quoted 5 lines · Manikanta Pubbisetty
When mac80211 receives a packet, we interate over the list of active interfaces to find the station(which transmitted the packet). Currently, station search is not allowed on AP/VLAN interface; since stations can also get mapped to AP/VLAN interfaces, they are worth considering for station search.
I don't see how this makes sense. We use
sta_info_get_bss()later, so any AP/AP_VLAN would be OK, so we don't need to try it twice forAP_VLAN?
AP/VLANs are skipped currently, we don't even get to sta_info_get_bss() if the iftype is AP/VLAN. No?
Manikanta
Johannes Berg
maintainerQuoted 9 lines · Manikanta Pubbisetty
Quoted 7 lines · Johannes Berg
Quoted 5 lines · Manikanta Pubbisetty
When mac80211 receives a packet, we interate over the list of active interfaces to find the station(which transmitted the packet). Currently, station search is not allowed on AP/VLAN interface; since stations can also get mapped to AP/VLAN interfaces, they are worth considering for station search.
Quoted 6 lines
Quoted 3 lines
I don't see how this makes sense. We use
sta_info_get_bss()later, so any AP/AP_VLAN would be OK, so we don't need to try it twice forAP_VLAN?AP/VLANs are skipped currently, we don't even get to
sta_info_get_bss()if the iftype is AP/VLAN. No?
Yes, we won't try anything for the AP_VLANs, but when we hit the AP we look up through everything, no?
Or maybe not - the _bss() just means fallback to AP?
Hmm. But even then I can't really see where this would apply?
johannes
Quoted 9 lines · Johannes Berg
Quoted 8 lines · Manikanta Pubbisetty
Quoted 6 lines · Johannes Berg
Quoted 5 lines · Manikanta Pubbisetty
When mac80211 receives a packet, we interate over the list of active interfaces to find the station(which transmitted the packet). Currently, station search is not allowed on AP/VLAN interface; since stations can also get mapped to AP/VLAN interfaces, they are worth considering for station search.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
I don't see how this makes sense. We use
sta_info_get_bss()later, so any AP/AP_VLAN would be OK, so we don't need to try it twice forAP_VLAN?AP/VLANs are skipped currently, we don't even get to
sta_info_get_bss()if the iftype is AP/VLAN. No?Yes, we won't try anything for the
AP_VLANs, but when we hit the AP we look up through everything, no?
I think it does, it gets the correct station information when AP iftype is hit. Makes sense, we can drop this patch.
Manikanta