mac80211: allocate tailroom for forwarded mesh packets
[openwrt/staging/blogic.git] / package / kernel / mac80211 / patches / subsys / 358-mac80211-add-NEED_ALIGNED4_SKBS-hw-flag.patch
index 417013890ba8baef6f41f9ca6a89e410a077289f..f4048b0420c5d94bc40f2120e02f4bca38c31cdb 100644 (file)
@@ -21,11 +21,9 @@ wep/tkip/ccmp.
 Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
 ---
 
-Index: backports-v4.18-rc7/include/net/mac80211.h
-===================================================================
---- backports-v4.18-rc7.orig/include/net/mac80211.h
-+++ backports-v4.18-rc7/include/net/mac80211.h
-@@ -2084,6 +2084,9 @@ struct ieee80211_txq {
+--- a/include/net/mac80211.h
++++ b/include/net/mac80211.h
+@@ -2131,6 +2131,9 @@ struct ieee80211_txq {
   * @IEEE80211_HW_DOESNT_SUPPORT_QOS_NDP: The driver (or firmware) doesn't
   *    support QoS NDP for AP probing - that's most likely a driver bug.
   *
@@ -35,7 +33,7 @@ Index: backports-v4.18-rc7/include/net/mac80211.h
   * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays
   */
  enum ieee80211_hw_flags {
-@@ -2129,6 +2132,7 @@ enum ieee80211_hw_flags {
+@@ -2176,6 +2179,7 @@ enum ieee80211_hw_flags {
        IEEE80211_HW_SUPPORTS_TDLS_BUFFER_STA,
        IEEE80211_HW_DEAUTH_NEED_MGD_TX_PREP,
        IEEE80211_HW_DOESNT_SUPPORT_QOS_NDP,
@@ -43,10 +41,8 @@ Index: backports-v4.18-rc7/include/net/mac80211.h
  
        /* keep last, obviously */
        NUM_IEEE80211_HW_FLAGS
-Index: backports-v4.18-rc7/net/mac80211/debugfs.c
-===================================================================
---- backports-v4.18-rc7.orig/net/mac80211/debugfs.c
-+++ backports-v4.18-rc7/net/mac80211/debugfs.c
+--- a/net/mac80211/debugfs.c
++++ b/net/mac80211/debugfs.c
 @@ -214,6 +214,7 @@ static const char *hw_flag_names[] = {
        FLAG(SUPPORTS_TDLS_BUFFER_STA),
        FLAG(DEAUTH_NEED_MGD_TX_PREP),
@@ -55,11 +51,9 @@ Index: backports-v4.18-rc7/net/mac80211/debugfs.c
  #undef FLAG
  };
  
-Index: backports-v4.18-rc7/net/mac80211/ieee80211_i.h
-===================================================================
---- backports-v4.18-rc7.orig/net/mac80211/ieee80211_i.h
-+++ backports-v4.18-rc7/net/mac80211/ieee80211_i.h
-@@ -1550,6 +1550,29 @@ ieee80211_vif_get_num_mcast_if(struct ie
+--- a/net/mac80211/ieee80211_i.h
++++ b/net/mac80211/ieee80211_i.h
+@@ -1559,6 +1559,29 @@ ieee80211_vif_get_num_mcast_if(struct ie
        return -1;
  }
  
@@ -89,10 +83,8 @@ Index: backports-v4.18-rc7/net/mac80211/ieee80211_i.h
  u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local,
                                     struct ieee80211_rx_status *status,
                                     unsigned int mpdu_len,
-Index: backports-v4.18-rc7/net/mac80211/sta_info.h
-===================================================================
---- backports-v4.18-rc7.orig/net/mac80211/sta_info.h
-+++ backports-v4.18-rc7/net/mac80211/sta_info.h
+--- a/net/mac80211/sta_info.h
++++ b/net/mac80211/sta_info.h
 @@ -301,7 +301,7 @@ struct ieee80211_fast_tx {
        u8 hdr_len;
        u8 sa_offs, da_offs, pn_offs;
@@ -102,11 +94,9 @@ Index: backports-v4.18-rc7/net/mac80211/sta_info.h
               sizeof(rfc1042_header)] __aligned(2);
  
        struct rcu_head rcu_head;
-Index: backports-v4.18-rc7/net/mac80211/status.c
-===================================================================
---- backports-v4.18-rc7.orig/net/mac80211/status.c
-+++ backports-v4.18-rc7/net/mac80211/status.c
-@@ -653,9 +653,22 @@ void ieee80211_tx_monitor(struct ieee802
+--- a/net/mac80211/status.c
++++ b/net/mac80211/status.c
+@@ -655,9 +655,22 @@ void ieee80211_tx_monitor(struct ieee802
        struct sk_buff *skb2;
        struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
        struct ieee80211_sub_if_data *sdata;
@@ -129,10 +119,8 @@ Index: backports-v4.18-rc7/net/mac80211/status.c
        /* send frame to monitor interfaces now */
        rtap_len = ieee80211_tx_radiotap_len(info);
        if (WARN_ON_ONCE(skb_headroom(skb) < rtap_len)) {
-Index: backports-v4.18-rc7/net/mac80211/tkip.c
-===================================================================
---- backports-v4.18-rc7.orig/net/mac80211/tkip.c
-+++ backports-v4.18-rc7/net/mac80211/tkip.c
+--- a/net/mac80211/tkip.c
++++ b/net/mac80211/tkip.c
 @@ -201,10 +201,12 @@ void ieee80211_get_tkip_p2k(struct ieee8
  {
        struct ieee80211_key *key = (struct ieee80211_key *)
@@ -147,11 +135,9 @@ Index: backports-v4.18-rc7/net/mac80211/tkip.c
        u32 iv32 = get_unaligned_le32(&data[4]);
        u16 iv16 = data[2] | (data[0] << 8);
  
-Index: backports-v4.18-rc7/net/mac80211/tx.c
-===================================================================
---- backports-v4.18-rc7.orig/net/mac80211/tx.c
-+++ backports-v4.18-rc7/net/mac80211/tx.c
-@@ -1169,8 +1169,7 @@ ieee80211_tx_prepare(struct ieee80211_su
+--- a/net/mac80211/tx.c
++++ b/net/mac80211/tx.c
+@@ -1175,8 +1175,7 @@ ieee80211_tx_prepare(struct ieee80211_su
        info->flags &= ~IEEE80211_TX_INTFL_NEED_TXPROCESSING;
  
        hdr = (struct ieee80211_hdr *) skb->data;
@@ -161,7 +147,7 @@ Index: backports-v4.18-rc7/net/mac80211/tx.c
  
        if (likely(sta)) {
                if (!IS_ERR(sta))
-@@ -2200,7 +2199,7 @@ netdev_tx_t ieee80211_monitor_start_xmit
+@@ -2215,7 +2214,7 @@ netdev_tx_t ieee80211_monitor_start_xmit
                goto fail;
  
        hdr = (struct ieee80211_hdr *)(skb->data + len_rthdr);
@@ -170,7 +156,7 @@ Index: backports-v4.18-rc7/net/mac80211/tx.c
  
        if (skb->len < len_rthdr + hdrlen)
                goto fail;
-@@ -2418,7 +2417,7 @@ static struct sk_buff *ieee80211_build_h
+@@ -2433,7 +2432,7 @@ static struct sk_buff *ieee80211_build_h
        struct ieee80211_chanctx_conf *chanctx_conf;
        struct ieee80211_sub_if_data *ap_sdata;
        enum nl80211_band band;
@@ -179,7 +165,7 @@ Index: backports-v4.18-rc7/net/mac80211/tx.c
  
        if (IS_ERR(sta))
                sta = NULL;
-@@ -2638,6 +2637,9 @@ static struct sk_buff *ieee80211_build_h
+@@ -2653,6 +2652,9 @@ static struct sk_buff *ieee80211_build_h
                hdrlen += 2;
        }
  
@@ -189,7 +175,7 @@ Index: backports-v4.18-rc7/net/mac80211/tx.c
        /*
         * Drop unicast frames to unauthorised stations unless they are
         * EAPOL frames from the local station.
-@@ -2718,6 +2720,7 @@ static struct sk_buff *ieee80211_build_h
+@@ -2733,6 +2735,7 @@ static struct sk_buff *ieee80211_build_h
  
        skb_pull(skb, skip_header_bytes);
        head_need = hdrlen + encaps_len + meshhdrlen - skb_headroom(skb);
@@ -197,7 +183,7 @@ Index: backports-v4.18-rc7/net/mac80211/tx.c
  
        /*
         * So we need to modify the skb header and hence need a copy of
-@@ -2750,6 +2753,9 @@ static struct sk_buff *ieee80211_build_h
+@@ -2765,6 +2768,9 @@ static struct sk_buff *ieee80211_build_h
                memcpy(skb_push(skb, meshhdrlen), &mesh_hdr, meshhdrlen);
  #endif
  
@@ -207,7 +193,7 @@ Index: backports-v4.18-rc7/net/mac80211/tx.c
        if (ieee80211_is_data_qos(fc)) {
                __le16 *qos_control;
  
-@@ -2925,6 +2931,9 @@ void ieee80211_check_fast_xmit(struct st
+@@ -2940,6 +2946,9 @@ void ieee80211_check_fast_xmit(struct st
                fc |= cpu_to_le16(IEEE80211_STYPE_QOS_DATA);
        }
  
@@ -217,7 +203,7 @@ Index: backports-v4.18-rc7/net/mac80211/tx.c
        /* We store the key here so there's no point in using rcu_dereference()
         * but that's fine because the code that changes the pointers will call
         * this function after doing so. For a single CPU that would be enough,
-@@ -3513,7 +3522,7 @@ begin:
+@@ -3540,7 +3549,7 @@ begin:
  
                if (tx.key &&
                    (tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV))
@@ -226,11 +212,9 @@ Index: backports-v4.18-rc7/net/mac80211/tx.c
  
                ieee80211_xmit_fast_finish(sta->sdata, sta, pn_offs,
                                           tx.key, skb);
-Index: backports-v4.18-rc7/net/mac80211/util.c
-===================================================================
---- backports-v4.18-rc7.orig/net/mac80211/util.c
-+++ backports-v4.18-rc7/net/mac80211/util.c
-@@ -1274,6 +1274,7 @@ void ieee80211_send_auth(struct ieee8021
+--- a/net/mac80211/util.c
++++ b/net/mac80211/util.c
+@@ -1388,6 +1388,7 @@ void ieee80211_send_auth(struct ieee8021
                         u32 tx_flags)
  {
        struct ieee80211_local *local = sdata->local;
@@ -238,7 +222,7 @@ Index: backports-v4.18-rc7/net/mac80211/util.c
        struct sk_buff *skb;
        struct ieee80211_mgmt *mgmt;
        unsigned int hdrlen;
-@@ -1300,7 +1301,7 @@ void ieee80211_send_auth(struct ieee8021
+@@ -1414,7 +1415,7 @@ void ieee80211_send_auth(struct ieee8021
                skb_put_data(skb, extra, extra_len);
  
        if (auth_alg == WLAN_AUTH_SHARED_KEY && transaction == 3) {