mac80211: refresh patches
authorChristian Lamparter <chunkeey@gmail.com>
Sat, 15 Jun 2019 17:51:28 +0000 (19:51 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Sat, 15 Jun 2019 17:55:32 +0000 (19:55 +0200)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
package/kernel/mac80211/patches/mwl/941-mwl8k-Fix-rate_idx-underflow.patch
package/kernel/mac80211/patches/subsys/357-mac80211-optimize-skb-resizing.patch

index 4f4812be8052f834c860ee7b8de81496bdf1cc76..d034dcf51f32a8a29bdfeae2aabf1b2e2f92ed95 100644 (file)
@@ -37,11 +37,9 @@ Signed-off-by: Petr Štetiar <ynezz@true.cz>
  drivers/net/wireless/marvell/mwl8k.c | 13 +++++++++----
  1 file changed, 9 insertions(+), 4 deletions(-)
 
-diff --git a/drivers/net/wireless/marvell/mwl8k.c b/drivers/net/wireless/marvell/mwl8k.c
-index 8e4e9b6..ffc565a 100644
 --- a/drivers/net/wireless/marvell/mwl8k.c
 +++ b/drivers/net/wireless/marvell/mwl8k.c
-@@ -441,6 +441,9 @@ struct mwl8k_sta {
+@@ -441,6 +441,9 @@ static const struct ieee80211_rate mwl8k
  #define MWL8K_CMD_UPDATE_STADB                0x1123
  #define MWL8K_CMD_BASTREAM            0x1125
  
@@ -51,7 +49,7 @@ index 8e4e9b6..ffc565a 100644
  static const char *mwl8k_cmd_name(__le16 cmd, char *buf, int bufsize)
  {
        u16 command = le16_to_cpu(cmd);
-@@ -1016,8 +1019,9 @@ static void mwl8k_rxd_ap_refill(void *_rxd, dma_addr_t addr, int len)
+@@ -1016,8 +1019,9 @@ mwl8k_rxd_ap_process(void *_rxd, struct
  
        if (rxd->channel > 14) {
                status->band = NL80211_BAND_5GHZ;
@@ -63,7 +61,7 @@ index 8e4e9b6..ffc565a 100644
        } else {
                status->band = NL80211_BAND_2GHZ;
        }
-@@ -1124,8 +1128,9 @@ static void mwl8k_rxd_sta_refill(void *_rxd, dma_addr_t addr, int len)
+@@ -1124,8 +1128,9 @@ mwl8k_rxd_sta_process(void *_rxd, struct
  
        if (rxd->channel > 14) {
                status->band = NL80211_BAND_5GHZ;
@@ -75,6 +73,3 @@ index 8e4e9b6..ffc565a 100644
        } else {
                status->band = NL80211_BAND_2GHZ;
        }
--- 
-1.9.1
-
index 919aa36a48ac52b564ff9bd62d8ec0fbc6ee19fc..82ed1723c02cfe4f1018ccbaf32d171bd9bd5758 100644 (file)
@@ -67,14 +67,20 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        struct ieee80211_hdr *hdr;
 -      bool enc_tailroom;
 -      int tail_need = 0;
-+      int head_need, head_max;
-+      int tail_need, tail_max;
-+      bool enc_tailroom = false;
+-
 -      hdr = (struct ieee80211_hdr *) skb->data;
 -      enc_tailroom = may_encrypt &&
 -                     (sdata->crypto_tx_tailroom_needed_cnt ||
 -                      ieee80211_is_mgmt(hdr->frame_control));
+-
+-      if (enc_tailroom) {
+-              tail_need = IEEE80211_ENCRYPT_TAILROOM;
+-              tail_need -= skb_tailroom(skb);
+-              tail_need = max_t(int, tail_need, 0);
++      int head_need, head_max;
++      int tail_need, tail_max;
++      bool enc_tailroom = false;
++
 +      if (sdata && !hdr_len &&
 +          !(info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT)) {
 +              hdr = (struct ieee80211_hdr *) skb->data;
@@ -82,11 +88,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +                              ieee80211_is_mgmt(hdr->frame_control));
 +              hdr_len += sdata->encrypt_headroom;
 +      }
--      if (enc_tailroom) {
--              tail_need = IEEE80211_ENCRYPT_TAILROOM;
--              tail_need -= skb_tailroom(skb);
--              tail_need = max_t(int, tail_need, 0);
++
 +      head_need = head_max = hdr_len;
 +      tail_need = tail_max = 0;
 +      if (!sdata) {
@@ -129,13 +131,13 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 -      bool may_encrypt;
 -
 -      may_encrypt = !(info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT);
--
 -      headroom = local->tx_headroom;
 -      if (may_encrypt)
 -              headroom += sdata->encrypt_headroom;
 -      headroom -= skb_headroom(skb);
 -      headroom = max_t(int, 0, headroom);
+-
 -      if (ieee80211_skb_resize(sdata, skb, headroom, may_encrypt)) {
 +      if (ieee80211_skb_resize(local, sdata, skb, 0, 0)) {
                ieee80211_free_txskb(&local->hw, skb);