|
@@ -47,55 +47,6 @@ struct ieee80211_hw *wiphy_to_ieee80211_hw(struct wiphy *wiphy)
|
|
|
}
|
|
|
EXPORT_SYMBOL(wiphy_to_ieee80211_hw);
|
|
|
|
|
|
-u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len,
|
|
|
- enum nl80211_iftype type)
|
|
|
-{
|
|
|
- __le16 fc = hdr->frame_control;
|
|
|
-
|
|
|
- /* drop ACK/CTS frames and incorrect hdr len (ctrl) */
|
|
|
- if (len < 16)
|
|
|
- return NULL;
|
|
|
-
|
|
|
- if (ieee80211_is_data(fc)) {
|
|
|
- if (len < 24) /* drop incorrect hdr len (data) */
|
|
|
- return NULL;
|
|
|
-
|
|
|
- if (ieee80211_has_a4(fc))
|
|
|
- return NULL;
|
|
|
- if (ieee80211_has_tods(fc))
|
|
|
- return hdr->addr1;
|
|
|
- if (ieee80211_has_fromds(fc))
|
|
|
- return hdr->addr2;
|
|
|
-
|
|
|
- return hdr->addr3;
|
|
|
- }
|
|
|
-
|
|
|
- if (ieee80211_is_mgmt(fc)) {
|
|
|
- if (len < 24) /* drop incorrect hdr len (mgmt) */
|
|
|
- return NULL;
|
|
|
- return hdr->addr3;
|
|
|
- }
|
|
|
-
|
|
|
- if (ieee80211_is_ctl(fc)) {
|
|
|
- if (ieee80211_is_pspoll(fc))
|
|
|
- return hdr->addr1;
|
|
|
-
|
|
|
- if (ieee80211_is_back_req(fc)) {
|
|
|
- switch (type) {
|
|
|
- case NL80211_IFTYPE_STATION:
|
|
|
- return hdr->addr2;
|
|
|
- case NL80211_IFTYPE_AP:
|
|
|
- case NL80211_IFTYPE_AP_VLAN:
|
|
|
- return hdr->addr1;
|
|
|
- default:
|
|
|
- break; /* fall through to the return */
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return NULL;
|
|
|
-}
|
|
|
-
|
|
|
void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx)
|
|
|
{
|
|
|
struct sk_buff *skb;
|