]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - wilink8-wlan/build-utilites.git/commitdiff
Added Kernel patches
authorsaurabh narang <saurabhnarang@ti.com>
Wed, 2 Sep 2020 01:31:42 +0000 (20:31 -0500)
committersaurabh narang <saurabhnarang@ti.com>
Wed, 2 Sep 2020 01:31:42 +0000 (20:31 -0500)
Signed-off-by: saurabh narang <saurabhnarang@ti.com>
patches/kernel_patches/4.19.38/0019-print-debug-info-depending-upon-received-pkt-type.patch [new file with mode: 0644]
patches/kernel_patches/4.19.38/0020-ensure-clock-freq-index-is-within-array-bounds.patch [new file with mode: 0644]
patches/kernel_patches/4.19.38/0021-updating-minimum-firmware-requirement.patch [new file with mode: 0644]

diff --git a/patches/kernel_patches/4.19.38/0019-print-debug-info-depending-upon-received-pkt-type.patch b/patches/kernel_patches/4.19.38/0019-print-debug-info-depending-upon-received-pkt-type.patch
new file mode 100644 (file)
index 0000000..c1f35bd
--- /dev/null
@@ -0,0 +1,84 @@
+From 9a97ad88468662d96763baea4f35fbb4fe85baa6 Mon Sep 17 00:00:00 2001
+From: saurabh narang <saurabhnarang@ti.com>
+Date: Tue, 1 Sep 2020 15:37:08 -0500
+Subject: [PATCH 19/21] print debug info depending upon received pkt type
+
+Signed-off-by: saurabh narang <saurabhnarang@ti.com>
+---
+ drivers/net/wireless/ti/wlcore/rx.c | 44 ++++++++++++++++++++++++++++++++-----
+ 1 file changed, 38 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/net/wireless/ti/wlcore/rx.c b/drivers/net/wireless/ti/wlcore/rx.c
+index 078a494..30253d0 100644
+--- a/drivers/net/wireless/ti/wlcore/rx.c
++++ b/drivers/net/wireless/ti/wlcore/rx.c
+@@ -120,6 +120,7 @@ static int wl1271_rx_handle_data(struct wl1271 *wl, u8 *data, u32 length,
+       struct wl1271_rx_descriptor *desc;
+       struct sk_buff *skb;
+       struct ieee80211_hdr *hdr;
++      struct ieee80211_bar *bar;
+       u8 beacon = 0;
+       u8 is_data = 0;
+       u8 reserved = 0, offset_to_data = 0;
+@@ -189,21 +190,52 @@ static int wl1271_rx_handle_data(struct wl1271 *wl, u8 *data, u32 length,
+       *hlid = desc->hlid;
+       hdr = (struct ieee80211_hdr *)skb->data;
++      bar = (struct ieee80211_bar *)skb->data;
++
++      //IS the frame a Beacon
+       if (ieee80211_is_beacon(hdr->frame_control))
++      {
+               beacon = 1;
++      seq_num = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
++      wl1271_debug(DEBUG_RX, "Beacon - rx skb 0x%p: %d seq %d hlid %d", skb,
++                   skb->len - desc->pad_len,
++                   seq_num, *hlid);
++      }
++      //Is the frame a Data frame
+       if (ieee80211_is_data_present(hdr->frame_control))
++      {
+               is_data = 1;
++      seq_num = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
++      wl1271_debug(DEBUG_RX, "Data - rx skb 0x%p: %d seq %d hlid %d", skb,
++                   skb->len - desc->pad_len,
++                   seq_num, *hlid);
++      }       
++      //Is the frame a Control Frame
++      if (ieee80211_is_ctl(hdr->frame_control))
++      {
++              //Only Print debug info for BAR Frames
++              if(ieee80211_is_back_req(hdr->frame_control))
++              {
++                      seq_num = (le16_to_cpu(bar->start_seq_num) & IEEE80211_SCTL_SEQ) >> 4;
++              wl1271_debug(DEBUG_RX, "BAR - rx skb 0x%p: %d start_seq %d hlid %d", skb,
++                           skb->len - desc->pad_len,
++                           seq_num, *hlid);
++              }       
++      }
++      //Is the frame a Management Frame
++      if ( ieee80211_is_mgmt(hdr->frame_control))
++      {
++              seq_num = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
++              wl1271_debug(DEBUG_RX, "MGMT - rx skb 0x%p: %d seq %d hlid %d", skb,
++                           skb->len - desc->pad_len,
++                           seq_num, *hlid);
++      }
++
+       wl1271_rx_status(wl, desc, IEEE80211_SKB_RXCB(skb), beacon,
+                        ieee80211_is_probe_resp(hdr->frame_control));
+       wlcore_hw_set_rx_csum(wl, desc, skb);
+-      seq_num = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
+-      wl1271_debug(DEBUG_RX, "rx skb 0x%p: %d B %s seq %d hlid %d", skb,
+-                   skb->len - desc->pad_len,
+-                   beacon ? "beacon" : "",
+-                   seq_num, *hlid);
+-
+       skb_queue_tail(&wl->deferred_rx_queue, skb);
+       queue_work(wl->freezable_wq, &wl->netstack_work);
+-- 
+1.9.1
+
diff --git a/patches/kernel_patches/4.19.38/0020-ensure-clock-freq-index-is-within-array-bounds.patch b/patches/kernel_patches/4.19.38/0020-ensure-clock-freq-index-is-within-array-bounds.patch
new file mode 100644 (file)
index 0000000..fe17cd6
--- /dev/null
@@ -0,0 +1,26 @@
+From 0237f4891e24228ae763c3a67768d4cb13779161 Mon Sep 17 00:00:00 2001
+From: saurabh narang <saurabhnarang@ti.com>
+Date: Tue, 1 Sep 2020 15:55:30 -0500
+Subject: [PATCH 20/21] ensure clock freq index is within array bounds
+
+Signed-off-by: saurabh narang <saurabhnarang@ti.com>
+---
+ drivers/net/wireless/ti/wl18xx/main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c
+index f230c28..1032a2f 100644
+--- a/drivers/net/wireless/ti/wl18xx/main.c
++++ b/drivers/net/wireless/ti/wl18xx/main.c
+@@ -733,7 +733,7 @@ static int wl18xx_set_clk(struct wl1271 *wl)
+       /* TODO: PG2: apparently we need to read the clk type */
+       ret = wl18xx_top_reg_read(wl, PRIMARY_CLK_DETECT, &clk_freq);
+-      if (ret < 0)
++      if (ret < 0 || clk_freq < 0 || clk_freq >= NUM_CLOCK_CONFIGS)
+               goto out;
+       wl1271_debug(DEBUG_BOOT, "clock freq %d (%d, %d, %d, %d, %s)", clk_freq,
+-- 
+1.9.1
+
diff --git a/patches/kernel_patches/4.19.38/0021-updating-minimum-firmware-requirement.patch b/patches/kernel_patches/4.19.38/0021-updating-minimum-firmware-requirement.patch
new file mode 100644 (file)
index 0000000..1d87553
--- /dev/null
@@ -0,0 +1,34 @@
+From a124343d21ef5d24c1febf7dce3189b15d9c8f1d Mon Sep 17 00:00:00 2001
+From: RazB <r-Bouganim@ti.com>
+Date: Tue, 1 Sep 2020 17:07:14 -0500
+Subject: [PATCH 21/21] updating minimum firmware requirement
+
+This patch mandates the driver to work with firmware version
+8.9.0.0.83 or above.
+This is to fix kernel panic caused by establishing a PMF/WPA3
+connection using older firmware versions
+
+Latest firmware is available at:
+git://git.ti.com/wilink8-wlan/wl18xx_fw.git
+
+Signed-off-by: RazB <r-Bouganim@ti.com>
+---
+ drivers/net/wireless/ti/wl18xx/wl18xx.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/net/wireless/ti/wl18xx/wl18xx.h b/drivers/net/wireless/ti/wl18xx/wl18xx.h
+index 5371cbd..5c4e8bd 100644
+--- a/drivers/net/wireless/ti/wl18xx/wl18xx.h
++++ b/drivers/net/wireless/ti/wl18xx/wl18xx.h
+@@ -29,7 +29,7 @@
+ #define WL18XX_IFTYPE_VER     9
+ #define WL18XX_MAJOR_VER      WLCORE_FW_VER_IGNORE
+ #define WL18XX_SUBTYPE_VER    WLCORE_FW_VER_IGNORE
+-#define WL18XX_MINOR_VER      58
++#define WL18XX_MINOR_VER      83
+ #define WL18XX_CMD_MAX_SIZE          740
+-- 
+1.9.1
+