From 9143cf5fc9e06af4a9bcf07f0009666ccf66961f Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 20 Mar 2015 16:24:14 +0000 Subject: mac80211: merge a few performance enhancements Signed-off-by: Felix Fietkau SVN-Revision: 44910 --- ...80211-mesh-avoid-pointless-station-lookup.patch | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 package/kernel/mac80211/patches/314-mac80211-mesh-avoid-pointless-station-lookup.patch (limited to 'package/kernel/mac80211/patches/314-mac80211-mesh-avoid-pointless-station-lookup.patch') diff --git a/package/kernel/mac80211/patches/314-mac80211-mesh-avoid-pointless-station-lookup.patch b/package/kernel/mac80211/patches/314-mac80211-mesh-avoid-pointless-station-lookup.patch new file mode 100644 index 0000000000..c476dd463c --- /dev/null +++ b/package/kernel/mac80211/patches/314-mac80211-mesh-avoid-pointless-station-lookup.patch @@ -0,0 +1,33 @@ +From: Johannes Berg +Date: Fri, 20 Mar 2015 16:24:23 +0100 +Subject: [PATCH] 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: Johannes Berg +--- + +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c +@@ -2131,12 +2131,14 @@ static struct sk_buff *ieee80211_build_h + } + + /* +- * There's no need to try to look up the destination +- * if it is a multicast address (which can only happen +- * in AP mode) ++ * There's no need to try to look up the destination station ++ * if it is a multicast address. In mesh, there's no need to ++ * 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); +- if (!multicast && !have_station) { ++ if (!multicast && !have_station && ++ !ieee80211_vif_is_mesh(&sdata->vif)) { + sta = sta_info_get(sdata, hdr.addr1); + if (sta) { + authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED); -- cgit v1.2.3