mac80211: set network header in TDLS frames
authorArik Nemtsov <arik@wizery.com>
Tue, 9 Sep 2014 14:11:02 +0000 (17:11 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 11 Sep 2014 10:25:22 +0000 (12:25 +0200)
Correctly mark the network header location in mac80211-generated TDLS
frames. These may be used by lower-level drivers.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/tdls.c

index bcf51e43ccc1732411cafc82f429d552a710ca26..4ea25dec06984792234f4a77edc1e26c157b0662 100644 (file)
@@ -412,6 +412,9 @@ ieee80211_prep_tdls_encap_data(struct wiphy *wiphy, struct net_device *dev,
        tf->ether_type = cpu_to_be16(ETH_P_TDLS);
        tf->payload_type = WLAN_TDLS_SNAP_RFTYPE;
 
+       /* network header is after the ethernet header */
+       skb_set_network_header(skb, ETH_HLEN);
+
        switch (action_code) {
        case WLAN_TDLS_SETUP_REQUEST:
                tf->category = WLAN_CATEGORY_TDLS;