]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - net/mac80211/tx.c
mac80211: add Intel Mobile Communications copyright
[mirror_ubuntu-jammy-kernel.git] / net / mac80211 / tx.c
index 464106c023d8c7d9cb1bd65b39ad642bd1090bc1..d1b3c223d6f927ad08b2fc85fa50824dfa9fe6d8 100644 (file)
@@ -3,6 +3,7 @@
  * Copyright 2005-2006, Devicescape Software, Inc.
  * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
  * Copyright 2007      Johannes Berg <johannes@sipsolutions.net>
+ * Copyright 2013-2014  Intel Mobile Communications GmbH
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -1478,7 +1479,10 @@ static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata,
                tail_need = max_t(int, tail_need, 0);
        }
 
-       if (skb_cloned(skb))
+       if (skb_cloned(skb) &&
+           (!(local->hw.flags & IEEE80211_HW_SUPPORTS_CLONED_SKBS) ||
+            !skb_clone_writable(skb, ETH_HLEN) ||
+            sdata->crypto_tx_tailroom_needed_cnt))
                I802_DEBUG_INC(local->tx_expand_skb_head_cloned);
        else if (head_need || tail_need)
                I802_DEBUG_INC(local->tx_expand_skb_head);
@@ -1844,7 +1848,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
                        memcpy(hdr.addr4, skb->data + ETH_ALEN, ETH_ALEN);
                        hdrlen = 30;
                        authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED);
-                       wme_sta = test_sta_flag(sta, WLAN_STA_WME);
+                       wme_sta = sta->sta.wme;
                }
                ap_sdata = container_of(sdata->bss, struct ieee80211_sub_if_data,
                                        u.ap);
@@ -1957,7 +1961,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
                        if (sta) {
                                authorized = test_sta_flag(sta,
                                                        WLAN_STA_AUTHORIZED);
-                               wme_sta = test_sta_flag(sta, WLAN_STA_WME);
+                               wme_sta = sta->sta.wme;
                                tdls_peer = test_sta_flag(sta,
                                                          WLAN_STA_TDLS_PEER);
                                tdls_auth = test_sta_flag(sta,
@@ -2035,7 +2039,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
                sta = sta_info_get(sdata, hdr.addr1);
                if (sta) {
                        authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED);
-                       wme_sta = test_sta_flag(sta, WLAN_STA_WME);
+                       wme_sta = sta->sta.wme;
                }
        }