Commit e33f5569 authored by Johannes Berg's avatar Johannes Berg

mac80211: mesh: avoid pointless station lookup

In ieee80211_build_hdr(), the station is looked up to build the
header correctly (QoS field) and to check for authorization. For
mesh, authorization isn't checked here, and QoS capability is
mandatory, so the station lookup can be avoided.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent a8d15ff0
...@@ -2052,12 +2052,14 @@ static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata, ...@@ -2052,12 +2052,14 @@ static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata,
} }
/* /*
* There's no need to try to look up the destination * There's no need to try to look up the destination station
* if it is a multicast address (which can only happen * if it is a multicast address. In mesh, there's no need to
* in AP mode) * look up the station at all as it always must be QoS capable
* and mesh mode checks authorization later.
*/ */
multicast = is_multicast_ether_addr(hdr.addr1); multicast = is_multicast_ether_addr(hdr.addr1);
if (!multicast && !have_station) { if (!multicast && !have_station &&
!ieee80211_vif_is_mesh(&sdata->vif)) {
sta = sta_info_get(sdata, hdr.addr1); sta = sta_info_get(sdata, hdr.addr1);
if (sta) { if (sta) {
authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED); authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment