mac80211: update to backports-4.14-rc2
[openwrt/staging/chunkeey.git] / package / kernel / mac80211 / patches / 307-mac80211-add-hdrlen-to-ieee80211_tx_data.patch
index 1a6fd8471c00d712e371960c1ffb41c8b3589d7f..baaca173c7bc4d3fab4cd30b9351353d43fb56b8 100644 (file)
@@ -21,7 +21,7 @@ Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
  
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -925,7 +925,7 @@ ieee80211_tx_h_fragment(struct ieee80211
+@@ -921,7 +921,7 @@ ieee80211_tx_h_fragment(struct ieee80211
        struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
        struct ieee80211_hdr *hdr = (void *)skb->data;
        int frag_threshold = tx->local->hw.wiphy->frag_threshold;
@@ -30,7 +30,7 @@ Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
        int fragnum;
  
        /* no matter what happens, tx->skb moves to tx->skbs */
-@@ -946,8 +946,6 @@ ieee80211_tx_h_fragment(struct ieee80211
+@@ -942,8 +942,6 @@ ieee80211_tx_h_fragment(struct ieee80211
        if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU))
                return TX_DROP;
  
@@ -39,7 +39,7 @@ Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
        /* internal error, why isn't DONTFRAG set? */
        if (WARN_ON(skb->len + FCS_LEN <= frag_threshold))
                return TX_DROP;
-@@ -1179,6 +1177,8 @@ ieee80211_tx_prepare(struct ieee80211_su
+@@ -1175,6 +1173,8 @@ ieee80211_tx_prepare(struct ieee80211_su
  
        hdr = (struct ieee80211_hdr *) skb->data;
  
@@ -48,7 +48,7 @@ Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
        if (likely(sta)) {
                if (!IS_ERR(sta))
                        tx->sta = sta;
-@@ -3437,6 +3437,7 @@ begin:
+@@ -3434,6 +3434,7 @@ begin:
        tx.local = local;
        tx.skb = skb;
        tx.sdata = vif_to_sdata(info->control.vif);
@@ -56,7 +56,7 @@ Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
  
        if (txq->sta)
                tx.sta = container_of(txq->sta, struct sta_info, sta);
-@@ -3731,6 +3732,7 @@ ieee80211_build_data_template(struct iee
+@@ -3756,6 +3757,7 @@ ieee80211_build_data_template(struct iee
        hdr = (void *)skb->data;
        tx.sta = sta_info_get(sdata, hdr->addr1);
        tx.skb = skb;
@@ -66,7 +66,7 @@ Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
                rcu_read_unlock();
 --- a/net/mac80211/util.c
 +++ b/net/mac80211/util.c
-@@ -1227,6 +1227,7 @@ void ieee80211_send_auth(struct ieee8021
+@@ -1232,6 +1232,7 @@ void ieee80211_send_auth(struct ieee8021
        struct ieee80211_local *local = sdata->local;
        struct sk_buff *skb;
        struct ieee80211_mgmt *mgmt;
@@ -74,8 +74,8 @@ Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
        int err;
  
        /* 24 + 6 = header + auth_algo + auth_transaction + status_code */
-@@ -1251,8 +1252,10 @@ void ieee80211_send_auth(struct ieee8021
-               memcpy(skb_put(skb, extra_len), extra, extra_len);
+@@ -1255,8 +1256,10 @@ void ieee80211_send_auth(struct ieee8021
+               skb_put_data(skb, extra, extra_len);
  
        if (auth_alg == WLAN_AUTH_SHARED_KEY && transaction == 3) {
 +              hdrlen = ieee80211_hdrlen(mgmt->frame_control);
@@ -155,7 +155,7 @@ Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
                               size_t klen, u8 *data, size_t data_len);
 --- a/net/mac80211/wpa.c
 +++ b/net/mac80211/wpa.c
-@@ -43,7 +43,7 @@ ieee80211_tx_h_michael_mic_add(struct ie
+@@ -44,7 +44,7 @@ ieee80211_tx_h_michael_mic_add(struct ie
            skb->len < 24 || !ieee80211_is_data_present(hdr->frame_control))
                return TX_CONTINUE;
  
@@ -164,7 +164,7 @@ Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
        if (skb->len < hdrlen)
                return TX_DROP;
  
-@@ -186,7 +186,6 @@ mic_fail_no_key:
+@@ -187,7 +187,6 @@ mic_fail_no_key:
  
  static int tkip_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb)
  {
@@ -172,7 +172,7 @@ Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
        struct ieee80211_key *key = tx->key;
        struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
        unsigned int hdrlen;
-@@ -201,7 +200,7 @@ static int tkip_encrypt_skb(struct ieee8
+@@ -202,7 +201,7 @@ static int tkip_encrypt_skb(struct ieee8
                return 0;
        }
  
@@ -181,7 +181,7 @@ Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
        len = skb->len - hdrlen;
  
        if (info->control.hw_key)
-@@ -419,7 +418,7 @@ static int ccmp_encrypt_skb(struct ieee8
+@@ -420,7 +419,7 @@ static int ccmp_encrypt_skb(struct ieee8
                return 0;
        }
  
@@ -190,7 +190,7 @@ Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
        len = skb->len - hdrlen;
  
        if (info->control.hw_key)
-@@ -652,7 +651,7 @@ static int gcmp_encrypt_skb(struct ieee8
+@@ -653,7 +652,7 @@ static int gcmp_encrypt_skb(struct ieee8
                return 0;
        }
  
@@ -199,7 +199,7 @@ Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
        len = skb->len - hdrlen;
  
        if (info->control.hw_key)
-@@ -792,7 +791,6 @@ static ieee80211_tx_result
+@@ -793,7 +792,6 @@ static ieee80211_tx_result
  ieee80211_crypto_cs_encrypt(struct ieee80211_tx_data *tx,
                            struct sk_buff *skb)
  {
@@ -207,7 +207,7 @@ Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
        struct ieee80211_key *key = tx->key;
        struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
        int hdrlen;
-@@ -808,8 +806,7 @@ ieee80211_crypto_cs_encrypt(struct ieee8
+@@ -809,8 +807,7 @@ ieee80211_crypto_cs_encrypt(struct ieee8
                     pskb_expand_head(skb, iv_len, 0, GFP_ATOMIC)))
                return TX_DROP;