aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 2b02b2b9d645..adb85dd5098d 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -127,7 +127,8 @@ void ieee80211_prepare_rates(struct ieee80211_local *local,
127 } 127 }
128} 128}
129 129
130u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len) 130u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len,
131 enum ieee80211_if_types type)
131{ 132{
132 u16 fc; 133 u16 fc;
133 134
@@ -159,6 +160,18 @@ u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len)
159 case IEEE80211_FTYPE_CTL: 160 case IEEE80211_FTYPE_CTL:
160 if ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PSPOLL) 161 if ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PSPOLL)
161 return hdr->addr1; 162 return hdr->addr1;
163 else if ((fc & IEEE80211_FCTL_STYPE) ==
164 IEEE80211_STYPE_BACK_REQ) {
165 switch (type) {
166 case IEEE80211_IF_TYPE_STA:
167 return hdr->addr2;
168 case IEEE80211_IF_TYPE_AP:
169 case IEEE80211_IF_TYPE_VLAN:
170 return hdr->addr1;
171 default:
172 return NULL;
173 }
174 }
162 else 175 else
163 return NULL; 176 return NULL;
164 } 177 }