Created
September 8, 2021 09:44
-
-
Save martijnberger/162c93c0889928ce5fc06bc98413d811 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ur ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/11n_aggr.c drivers/net/wireless/marvell/mwifiex/11n_aggr.c | |
--- ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/11n_aggr.c 2021-09-03 07:58:03.000000000 +0000 | |
+++ drivers/net/wireless/marvell/mwifiex/11n_aggr.c 2021-09-07 12:49:56.000000000 +0000 | |
@@ -62,7 +62,7 @@ | |
}; | |
struct tx_packet_hdr *tx_header; | |
- tx_header = skb_put(skb_aggr, sizeof(*tx_header)); | |
+ tx_header = (void *)skb_put(skb_aggr, sizeof(*tx_header)); | |
/* Copy DA and SA */ | |
dt_offset = 2 * ETH_ALEN; | |
diff -ur ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/cfg80211.c drivers/net/wireless/marvell/mwifiex/cfg80211.c | |
--- ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/cfg80211.c 2021-09-03 07:58:03.000000000 +0000 | |
+++ drivers/net/wireless/marvell/mwifiex/cfg80211.c 2021-09-07 13:22:42.000000000 +0000 | |
@@ -1133,7 +1133,7 @@ | |
static int | |
mwifiex_cfg80211_change_virtual_intf(struct wiphy *wiphy, | |
struct net_device *dev, | |
- enum nl80211_iftype type, | |
+ enum nl80211_iftype type, u32 *flags, | |
struct vif_params *params) | |
{ | |
struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); | |
@@ -2074,7 +2074,7 @@ | |
struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); | |
if (!mwifiex_stop_bg_scan(priv)) | |
- cfg80211_sched_scan_stopped_rtnl(priv->wdev.wiphy, 0); | |
+ cfg80211_sched_scan_stopped_rtnl(priv->wdev.wiphy); | |
if (mwifiex_deauthenticate(priv, NULL)) | |
return -EFAULT; | |
@@ -2343,7 +2343,7 @@ | |
(int)sme->ssid_len, (char *)sme->ssid, sme->bssid); | |
if (!mwifiex_stop_bg_scan(priv)) | |
- cfg80211_sched_scan_stopped_rtnl(priv->wdev.wiphy, 0); | |
+ cfg80211_sched_scan_stopped_rtnl(priv->wdev.wiphy); | |
ret = mwifiex_cfg80211_assoc(priv, sme->ssid_len, sme->ssid, sme->bssid, | |
priv->bss_mode, sme->channel, sme, 0); | |
@@ -2553,7 +2553,7 @@ | |
priv->scan_block = false; | |
if (!mwifiex_stop_bg_scan(priv)) | |
- cfg80211_sched_scan_stopped_rtnl(priv->wdev.wiphy, 0); | |
+ cfg80211_sched_scan_stopped_rtnl(priv->wdev.wiphy); | |
user_scan_cfg = kzalloc(sizeof(*user_scan_cfg), GFP_KERNEL); | |
if (!user_scan_cfg) | |
@@ -2738,7 +2738,7 @@ | |
* previous bgscan configuration in the firmware | |
*/ | |
static int mwifiex_cfg80211_sched_scan_stop(struct wiphy *wiphy, | |
- struct net_device *dev, u64 reqid) | |
+ struct net_device *dev) | |
{ | |
struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); | |
@@ -2859,6 +2859,7 @@ | |
const char *name, | |
unsigned char name_assign_type, | |
enum nl80211_iftype type, | |
+ u32 *flags, | |
struct vif_params *params) | |
{ | |
struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy); | |
@@ -4351,7 +4352,7 @@ | |
NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 | | |
NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P; | |
- wiphy->max_sched_scan_reqs = 1; | |
+ //wiphy->max_sched_scan_reqs = 1; | |
wiphy->max_sched_scan_ssids = MWIFIEX_MAX_SSID_LIST_LENGTH; | |
wiphy->max_sched_scan_ie_len = MWIFIEX_MAX_VSIE_LEN; | |
wiphy->max_match_sets = MWIFIEX_MAX_SSID_LIST_LENGTH; | |
diff -ur ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/decl.h drivers/net/wireless/marvell/mwifiex/decl.h | |
--- ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/decl.h 2021-09-03 07:58:03.000000000 +0000 | |
+++ drivers/net/wireless/marvell/mwifiex/decl.h 2021-09-07 12:47:46.000000000 +0000 | |
@@ -29,6 +29,10 @@ | |
#include <uapi/linux/if_arp.h> | |
#include <net/cfg80211.h> | |
+/* backport */ | |
+#define IEEE80211_NUM_ACS 4 | |
+ | |
+ | |
#define MWIFIEX_BSS_COEX_COUNT 2 | |
#define MWIFIEX_MAX_BSS_NUM (3) | |
@@ -311,4 +315,15 @@ | |
SEC_CHAN_BELOW = 3 | |
}; | |
+static inline void *skb_put_data(struct sk_buff *skb, const void *data, | |
+ unsigned int len) | |
+{ | |
+ void *tmp = skb_put(skb, len); | |
+ | |
+ memcpy(tmp, data, len); | |
+ | |
+ return tmp; | |
+} | |
+ | |
+ | |
#endif /* !_MWIFIEX_DECL_H_ */ | |
diff -ur ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/init.c drivers/net/wireless/marvell/mwifiex/init.c | |
--- ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/init.c 2021-09-03 07:58:03.000000000 +0000 | |
+++ drivers/net/wireless/marvell/mwifiex/init.c 2021-09-07 12:35:26.000000000 +0000 | |
@@ -25,6 +25,23 @@ | |
#include "wmm.h" | |
#include "11n.h" | |
+#ifndef from_timer | |
+#define TIMER_DATA_TYPE unsigned long | |
+#define TIMER_FUNC_TYPE void (*)(TIMER_DATA_TYPE) | |
+ | |
+static inline void timer_setup(struct timer_list *timer, | |
+ void (*callback) (struct timer_list *), | |
+ unsigned int flags) | |
+{ | |
+ __setup_timer(timer, (TIMER_FUNC_TYPE) callback, | |
+ (TIMER_DATA_TYPE) timer, flags); | |
+} | |
+ | |
+#define from_timer(var, callback_timer, timer_fieldname) \ | |
+ container_of(callback_timer, typeof(*var), timer_fieldname) | |
+#endif | |
+ | |
+ | |
/* | |
* This function adds a BSS priority table to the table list. | |
* | |
diff -ur ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/main.c drivers/net/wireless/marvell/mwifiex/main.c | |
--- ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/main.c 2021-09-03 07:58:03.000000000 +0000 | |
+++ drivers/net/wireless/marvell/mwifiex/main.c 2021-09-07 13:04:09.000000000 +0000 | |
@@ -27,6 +27,54 @@ | |
#define VERSION "1.0" | |
#define MFG_FIRMWARE "mwifiex_mfg.bin" | |
+#ifndef from_timer | |
+#define TIMER_DATA_TYPE unsigned long | |
+#define TIMER_FUNC_TYPE void (*)(TIMER_DATA_TYPE) | |
+ | |
+static inline void timer_setup(struct timer_list *timer, | |
+ void (*callback) (struct timer_list *), | |
+ unsigned int flags) | |
+{ | |
+ __setup_timer(timer, (TIMER_FUNC_TYPE) callback, | |
+ (TIMER_DATA_TYPE) timer, flags); | |
+} | |
+ | |
+#define from_timer(var, callback_timer, timer_fieldname) \ | |
+ container_of(callback_timer, typeof(*var), timer_fieldname) | |
+#endif | |
+ | |
+/** | |
+ * ether_addr_to_u64 - Convert an Ethernet address into a u64 value. | |
+ * @addr: Pointer to a six-byte array containing the Ethernet address | |
+ * | |
+ * Return a u64 value of the address | |
+ */ | |
+static inline u64 ether_addr_to_u64(const u8 *addr) | |
+{ | |
+ u64 u = 0; | |
+ int i; | |
+ | |
+ for (i = 0; i < ETH_ALEN; i++) | |
+ u = u << 8 | addr[i]; | |
+ | |
+ return u; | |
+} | |
+ | |
+/** | |
+ * u64_to_ether_addr - Convert a u64 to an Ethernet address. | |
+ * @u: u64 to convert to an Ethernet MAC address | |
+ * @addr: Pointer to a six-byte array to contain the Ethernet address | |
+ */ | |
+static inline void u64_to_ether_addr(u64 u, u8 *addr) | |
+{ | |
+ int i; | |
+ | |
+ for (i = ETH_ALEN - 1; i >= 0; i--) { | |
+ addr[i] = u & 0xff; | |
+ u = u >> 8; | |
+ } | |
+} | |
+ | |
static unsigned int debug_mask = MWIFIEX_DEFAULT_DEBUG_MASK; | |
module_param(debug_mask, uint, 0); | |
MODULE_PARM_DESC(debug_mask, "bitmap for debug flags"); | |
@@ -601,7 +649,7 @@ | |
rtnl_lock(); | |
/* Create station interface by default */ | |
wdev = mwifiex_add_virtual_intf(adapter->wiphy, "mlan%d", NET_NAME_ENUM, | |
- NL80211_IFTYPE_STATION, NULL); | |
+ NL80211_IFTYPE_STATION, NULL, NULL); | |
if (IS_ERR(wdev)) { | |
mwifiex_dbg(adapter, ERROR, | |
"cannot create default STA interface\n"); | |
@@ -611,7 +659,7 @@ | |
if (driver_mode & MWIFIEX_DRIVER_MODE_UAP) { | |
wdev = mwifiex_add_virtual_intf(adapter->wiphy, "uap%d", NET_NAME_ENUM, | |
- NL80211_IFTYPE_AP, NULL); | |
+ NL80211_IFTYPE_AP, NULL, NULL); | |
if (IS_ERR(wdev)) { | |
mwifiex_dbg(adapter, ERROR, | |
"cannot create AP interface\n"); | |
@@ -622,7 +670,7 @@ | |
if (driver_mode & MWIFIEX_DRIVER_MODE_P2P) { | |
wdev = mwifiex_add_virtual_intf(adapter->wiphy, "p2p%d", NET_NAME_ENUM, | |
- NL80211_IFTYPE_P2P_CLIENT, NULL); | |
+ NL80211_IFTYPE_P2P_CLIENT, NULL, NULL); | |
if (IS_ERR(wdev)) { | |
mwifiex_dbg(adapter, ERROR, | |
"cannot create p2p client interface\n"); | |
@@ -759,7 +807,7 @@ | |
mwifiex_dbg(priv->adapter, INFO, | |
"aborting bgscan on ndo_stop\n"); | |
mwifiex_stop_bg_scan(priv); | |
- cfg80211_sched_scan_stopped(priv->wdev.wiphy, 0); | |
+ cfg80211_sched_scan_stopped(priv->wdev.wiphy); | |
} | |
return 0; | |
@@ -1280,6 +1328,7 @@ | |
return &priv->stats; | |
} | |
+#if 0 | |
static u16 | |
mwifiex_netdev_select_wmm_queue(struct net_device *dev, struct sk_buff *skb, | |
struct net_device *sb_dev, | |
@@ -1288,6 +1337,15 @@ | |
skb->priority = cfg80211_classify8021d(skb, NULL); | |
return mwifiex_1d_to_wmm_queue[skb->priority]; | |
} | |
+#else | |
+static u16 | |
+mwifiex_netdev_select_wmm_queue(struct net_device *dev, struct sk_buff *skb, | |
+ void *accel_priv, select_queue_fallback_t fallback) | |
+{ | |
+ skb->priority = cfg80211_classify8021d(skb, NULL); | |
+ return mwifiex_1d_to_wmm_queue[skb->priority]; | |
+} | |
+#endif | |
/* Network device handlers */ | |
static const struct net_device_ops mwifiex_netdev_ops = { | |
@@ -1326,7 +1384,7 @@ | |
struct net_device *dev) | |
{ | |
dev->netdev_ops = &mwifiex_netdev_ops; | |
- dev->needs_free_netdev = true; | |
+ // NOT IN 4.9 dev->needs_free_netdev = true; | |
/* Initialize private structure */ | |
priv->current_key_index = 0; | |
priv->media_connected = false; | |
diff -ur ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/main.h drivers/net/wireless/marvell/mwifiex/main.h | |
--- ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/main.h 2021-09-03 07:58:03.000000000 +0000 | |
+++ drivers/net/wireless/marvell/mwifiex/main.h 2021-09-07 13:27:47.000000000 +0000 | |
@@ -50,6 +50,65 @@ | |
#include <linux/slab.h> | |
#include <linux/of_irq.h> | |
+/* BACKPORT */ | |
+#ifndef from_timer | |
+#define TIMER_DATA_TYPE unsigned long | |
+#define TIMER_FUNC_TYPE void (*)(TIMER_DATA_TYPE) | |
+ | |
+static inline void timer_setup(struct timer_list *timer, | |
+ void (*callback) (struct timer_list *), | |
+ unsigned int flags) | |
+{ | |
+ __setup_timer(timer, (TIMER_FUNC_TYPE) callback, | |
+ (TIMER_DATA_TYPE) timer, flags); | |
+} | |
+ | |
+#define from_timer(var, callback_timer, timer_fieldname) \ | |
+ container_of(callback_timer, typeof(*var), timer_fieldname) | |
+#endif | |
+ | |
+#define check_mul_overflow(a, b, d) ({ \ | |
+ typeof(a) __a = (a); \ | |
+ typeof(b) __b = (b); \ | |
+ typeof(d) __d = (d); \ | |
+ (void) (&__a == &__b); \ | |
+ (void) (&__a == __d); \ | |
+ __builtin_mul_overflow(__a, __b, __d); \ | |
+}) | |
+ | |
+/** | |
+ * array_size() - Calculate size of 2-dimensional array. | |
+ * | |
+ * @a: dimension one | |
+ * @b: dimension two | |
+ * | |
+ * Calculates size of 2-dimensional array: @a * @b. | |
+ * | |
+ * Returns: number of bytes needed to represent the array or SIZE_MAX on | |
+ * overflow. | |
+ */ | |
+static inline __must_check size_t array_size(size_t a, size_t b) | |
+{ | |
+ size_t bytes; | |
+ | |
+ if (check_mul_overflow(a, b, &bytes)) | |
+ return SIZE_MAX; | |
+ | |
+ return bytes; | |
+} | |
+ | |
+static inline void *skb_put_zero(struct sk_buff *skb, unsigned int len) | |
+{ | |
+ void *tmp = skb_put(skb, len); | |
+ | |
+ memset(tmp, 0, len); | |
+ | |
+ return tmp; | |
+} | |
+ | |
+ | |
+/* BACKPORT */ | |
+ | |
#include "decl.h" | |
#include "ioctl.h" | |
#include "util.h" | |
@@ -1564,6 +1623,7 @@ | |
const char *name, | |
unsigned char name_assign_type, | |
enum nl80211_iftype type, | |
+ u32 *flags, | |
struct vif_params *params); | |
int mwifiex_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev); | |
diff -ur ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/pcie.c drivers/net/wireless/marvell/mwifiex/pcie.c | |
--- ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/pcie.c 2021-09-03 07:58:03.000000000 +0000 | |
+++ drivers/net/wireless/marvell/mwifiex/pcie.c 2021-09-08 08:57:00.000000000 +0000 | |
@@ -320,6 +320,7 @@ | |
return; | |
} | |
+#if 0 | |
static void mwifiex_pcie_coredump(struct device *dev) | |
{ | |
struct pci_dev *pdev; | |
@@ -332,6 +333,7 @@ | |
&card->work_flags)) | |
schedule_work(&card->work); | |
} | |
+#endif | |
static const struct pci_device_id mwifiex_ids[] = { | |
{ | |
@@ -359,6 +361,7 @@ | |
MODULE_DEVICE_TABLE(pci, mwifiex_ids); | |
+#if 0 | |
/* | |
* Cleanup all software without cleaning anything related to PCIe and HW. | |
*/ | |
@@ -419,6 +422,64 @@ | |
.reset_prepare = mwifiex_pcie_reset_prepare, | |
.reset_done = mwifiex_pcie_reset_done, | |
}; | |
+#else | |
+void mwifiex_do_flr(struct mwifiex_adapter *adapter, bool prepare) | |
+{ | |
+ struct mwifiex_if_ops if_ops; | |
+ | |
+ if (!prepare) { | |
+ mwifiex_reinit_sw(adapter); | |
+ } else { | |
+ memcpy(&if_ops, &adapter->if_ops, | |
+ sizeof(struct mwifiex_if_ops)); | |
+ mwifiex_shutdown_sw(adapter); | |
+ } | |
+} | |
+ | |
+static void mwifiex_pcie_reset_notify(struct pci_dev *pdev, bool prepare) | |
+{ | |
+ struct mwifiex_adapter *adapter; | |
+ struct pcie_service_card *card; | |
+ | |
+ if (!pdev) { | |
+ pr_err("%s: PCIe device is not specified\n", __func__); | |
+ return; | |
+ } | |
+ | |
+ card = (struct pcie_service_card *)pci_get_drvdata(pdev); | |
+ if (!card || !card->adapter) { | |
+ pr_err("%s: Card or adapter structure is not valid (%ld)\n", | |
+ __func__, (long)card); | |
+ return; | |
+ } | |
+ | |
+ adapter = card->adapter; | |
+ mwifiex_dbg(adapter, INFO, | |
+ "%s: vendor=0x%4.04x device=0x%4.04x rev=%d %s\n", | |
+ __func__, pdev->vendor, pdev->device, | |
+ pdev->revision, | |
+ prepare ? "Pre-FLR" : "Post-FLR"); | |
+ | |
+ if (prepare) { | |
+ /* Kernel would be performing FLR after this notification. | |
+ * Cleanup all software without cleaning anything related to | |
+ * PCIe and HW. | |
+ */ | |
+ mwifiex_do_flr(adapter, prepare); | |
+ } else { | |
+ /* Kernel stores and restores PCIe function context before and | |
+ * after performing FLR respectively. Reconfigure the software | |
+ * and firmware including firmware redownload | |
+ */ | |
+ mwifiex_do_flr(adapter, prepare); | |
+ } | |
+ mwifiex_dbg(adapter, INFO, "%s, successful\n", __func__); | |
+} | |
+ | |
+static const struct pci_error_handlers mwifiex_pcie_err_handler[] = { | |
+ { .reset_notify = mwifiex_pcie_reset_notify, }, | |
+}; | |
+#endif | |
#ifdef CONFIG_PM_SLEEP | |
/* Power Management Hooks */ | |
@@ -433,13 +494,13 @@ | |
.probe = mwifiex_pcie_probe, | |
.remove = mwifiex_pcie_remove, | |
.driver = { | |
- .coredump = mwifiex_pcie_coredump, | |
+// .coredump = mwifiex_pcie_coredump, | |
#ifdef CONFIG_PM_SLEEP | |
.pm = &mwifiex_pcie_pm_ops, | |
#endif | |
}, | |
.shutdown = mwifiex_pcie_shutdown, | |
- .err_handler = &mwifiex_pcie_err_handler, | |
+ .err_handler = mwifiex_pcie_err_handler, | |
}; | |
/* | |
diff -ur ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/sdio.c drivers/net/wireless/marvell/mwifiex/sdio.c | |
--- ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/sdio.c 2021-09-03 07:58:03.000000000 +0000 | |
+++ drivers/net/wireless/marvell/mwifiex/sdio.c 2021-09-08 08:46:18.000000000 +0000 | |
@@ -466,6 +466,7 @@ | |
return ret; | |
} | |
+#if 0 | |
static void mwifiex_sdio_coredump(struct device *dev) | |
{ | |
struct sdio_func *func = dev_to_sdio_func(dev); | |
@@ -476,6 +477,7 @@ | |
&card->work_flags)) | |
schedule_work(&card->work); | |
} | |
+#endif | |
/* Device ID for SD8786 */ | |
#define SDIO_DEVICE_ID_MARVELL_8786 (0x9116) | |
@@ -526,7 +528,7 @@ | |
.remove = mwifiex_sdio_remove, | |
.drv = { | |
.owner = THIS_MODULE, | |
- .coredump = mwifiex_sdio_coredump, | |
+ //.coredump = mwifiex_sdio_coredump, | |
.pm = &mwifiex_sdio_pm_ops, | |
} | |
}; | |
diff -ur ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c | |
--- ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c 2021-09-03 07:58:03.000000000 +0000 | |
+++ drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c 2021-09-07 12:51:24.000000000 +0000 | |
@@ -1241,7 +1241,7 @@ | |
break; | |
case HostCmd_CMD_802_11_BG_SCAN_QUERY: | |
ret = mwifiex_ret_802_11_scan(priv, resp); | |
- cfg80211_sched_scan_results(priv->wdev.wiphy, 0); | |
+ cfg80211_sched_scan_results(priv->wdev.wiphy); | |
mwifiex_dbg(adapter, CMD, | |
"info: CMD_RESP: BG_SCAN result is ready!\n"); | |
break; | |
diff -ur ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/sta_event.c drivers/net/wireless/marvell/mwifiex/sta_event.c | |
--- ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/sta_event.c 2021-09-03 07:58:03.000000000 +0000 | |
+++ drivers/net/wireless/marvell/mwifiex/sta_event.c 2021-09-07 12:53:21.000000000 +0000 | |
@@ -852,7 +852,7 @@ | |
case EVENT_BG_SCAN_STOPPED: | |
dev_dbg(adapter->dev, "event: BGS_STOPPED\n"); | |
- cfg80211_sched_scan_stopped(priv->wdev.wiphy, 0); | |
+ cfg80211_sched_scan_stopped(priv->wdev.wiphy); | |
if (priv->sched_scanning) | |
priv->sched_scanning = false; | |
break; | |
@@ -883,7 +883,7 @@ | |
case EVENT_RSSI_LOW: | |
cfg80211_cqm_rssi_notify(priv->netdev, | |
NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW, | |
- 0, GFP_KERNEL); | |
+ GFP_KERNEL); | |
mwifiex_send_cmd(priv, HostCmd_CMD_RSSI_INFO, | |
HostCmd_ACT_GEN_GET, 0, NULL, false); | |
priv->subsc_evt_rssi_state = RSSI_LOW_RECVD; | |
@@ -898,7 +898,7 @@ | |
case EVENT_RSSI_HIGH: | |
cfg80211_cqm_rssi_notify(priv->netdev, | |
NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH, | |
- 0, GFP_KERNEL); | |
+ GFP_KERNEL); | |
mwifiex_send_cmd(priv, HostCmd_CMD_RSSI_INFO, | |
HostCmd_ACT_GEN_GET, 0, NULL, false); | |
priv->subsc_evt_rssi_state = RSSI_HIGH_RECVD; | |
diff -ur ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | |
--- ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c 2021-09-03 07:58:03.000000000 +0000 | |
+++ drivers/net/wireless/marvell/mwifiex/sta_ioctl.c 2021-09-07 12:50:34.000000000 +0000 | |
@@ -529,7 +529,7 @@ | |
#endif | |
mwifiex_dbg(adapter, CMD, "aborting bgscan!\n"); | |
mwifiex_stop_bg_scan(priv); | |
- cfg80211_sched_scan_stopped(priv->wdev.wiphy, 0); | |
+ cfg80211_sched_scan_stopped(priv->wdev.wiphy); | |
#ifdef CONFIG_PM | |
} | |
#endif | |
diff -ur ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/tdls.c drivers/net/wireless/marvell/mwifiex/tdls.c | |
--- ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/tdls.c 2021-09-03 07:58:03.000000000 +0000 | |
+++ drivers/net/wireless/marvell/mwifiex/tdls.c 2021-09-08 08:45:58.000000000 +0000 | |
@@ -346,7 +346,7 @@ | |
chan_bw = IEEE80211_VHT_CHANWIDTH_USE_HT; | |
break; | |
} | |
- vht_oper->center_freq_seg0_idx = | |
+ vht_oper->center_freq_seg1_idx = | |
mwifiex_get_center_freq_index(priv, BAND_AAC, | |
bss_desc->channel, | |
chan_bw); | |
@@ -359,7 +359,7 @@ | |
{ | |
struct ieee_types_extcap *extcap; | |
- extcap = skb_put(skb, sizeof(struct ieee_types_extcap)); | |
+ extcap = (void *)skb_put(skb, sizeof(struct ieee_types_extcap)); | |
extcap->ieee_hdr.element_id = WLAN_EID_EXT_CAPABILITY; | |
extcap->ieee_hdr.len = 8; | |
memset(extcap->ext_capab, 0, 8); | |
@@ -431,7 +431,7 @@ | |
{ | |
struct ieee_types_bss_co_2040 *bssco; | |
- bssco = skb_put(skb, sizeof(struct ieee_types_bss_co_2040)); | |
+ bssco = (void *)skb_put(skb, sizeof(struct ieee_types_bss_co_2040)); | |
bssco->ieee_hdr.element_id = WLAN_EID_BSS_COEX_2040; | |
bssco->ieee_hdr.len = sizeof(struct ieee_types_bss_co_2040) - | |
sizeof(struct ieee_types_header); | |
@@ -443,7 +443,7 @@ | |
struct ieee_types_generic *supp_chan; | |
u8 chan_supp[] = {1, 11}; | |
- supp_chan = skb_put(skb, | |
+ supp_chan = (void *)skb_put(skb, | |
(sizeof(struct ieee_types_header) + sizeof(chan_supp))); | |
supp_chan->ieee_hdr.element_id = WLAN_EID_SUPPORTED_CHANNELS; | |
supp_chan->ieee_hdr.len = sizeof(chan_supp); | |
@@ -455,7 +455,7 @@ | |
struct ieee_types_generic *reg_class; | |
u8 rc_list[] = {1, | |
1, 2, 3, 4, 12, 22, 23, 24, 25, 27, 28, 29, 30, 32, 33}; | |
- reg_class = skb_put(skb, | |
+ reg_class = (void *)skb_put(skb, | |
(sizeof(struct ieee_types_header) + sizeof(rc_list))); | |
reg_class->ieee_hdr.element_id = WLAN_EID_SUPPORTED_REGULATORY_CLASSES; | |
reg_class->ieee_hdr.len = sizeof(rc_list); | |
@@ -475,7 +475,7 @@ | |
capab = priv->curr_bss_params.bss_descriptor.cap_info_bitmap; | |
- tf = skb_put(skb, offsetof(struct ieee80211_tdls_data, u)); | |
+ tf = (void *)skb_put(skb, offsetof(struct ieee80211_tdls_data, u)); | |
memcpy(tf->da, peer, ETH_ALEN); | |
memcpy(tf->sa, priv->curr_addr, ETH_ALEN); | |
tf->ether_type = cpu_to_be16(ETH_P_TDLS); | |
@@ -616,7 +616,7 @@ | |
{ | |
struct ieee80211_tdls_lnkie *lnkid; | |
- lnkid = skb_put(skb, sizeof(struct ieee80211_tdls_lnkie)); | |
+ lnkid = (void *)skb_put(skb, sizeof(struct ieee80211_tdls_lnkie)); | |
lnkid->ie_type = WLAN_EID_LINK_ID; | |
lnkid->ie_len = sizeof(struct ieee80211_tdls_lnkie) - | |
sizeof(struct ieee_types_header); | |
@@ -741,7 +741,7 @@ | |
capab = priv->curr_bss_params.bss_descriptor.cap_info_bitmap; | |
- mgmt = skb_put(skb, offsetof(struct ieee80211_mgmt, u)); | |
+ mgmt = (void *)skb_put(skb, offsetof(struct ieee80211_mgmt, u)); | |
memset(mgmt, 0, 24); | |
memcpy(mgmt->da, peer, ETH_ALEN); | |
diff -ur ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/txrx.c drivers/net/wireless/marvell/mwifiex/txrx.c | |
--- ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/txrx.c 2021-09-03 07:58:03.000000000 +0000 | |
+++ drivers/net/wireless/marvell/mwifiex/txrx.c 2021-09-07 12:46:19.000000000 +0000 | |
@@ -341,7 +341,9 @@ | |
return; | |
spin_lock_irqsave(&priv->ack_status_lock, flags); | |
- ack_skb = idr_remove(&priv->ack_status_frames, tx_status->tx_token_id); | |
+ ack_skb = idr_find(&priv->ack_status_frames, tx_status->tx_token_id); | |
+ if (ack_skb) | |
+ idr_remove(&priv->ack_status_frames, tx_status->tx_token_id); | |
spin_unlock_irqrestore(&priv->ack_status_lock, flags); | |
if (ack_skb) { | |
diff -ur ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/usb.c drivers/net/wireless/marvell/mwifiex/usb.c | |
--- ../linux-4.19.206/drivers/net/wireless/marvell/mwifiex/usb.c 2021-09-03 07:58:03.000000000 +0000 | |
+++ drivers/net/wireless/marvell/mwifiex/usb.c 2021-09-08 08:47:18.000000000 +0000 | |
@@ -665,6 +665,7 @@ | |
usb_put_dev(interface_to_usbdev(intf)); | |
} | |
+#if 0 | |
static void mwifiex_usb_coredump(struct device *dev) | |
{ | |
struct usb_interface *intf = to_usb_interface(dev); | |
@@ -673,7 +674,7 @@ | |
mwifiex_fw_dump_event(mwifiex_get_priv(card->adapter, | |
MWIFIEX_BSS_ROLE_ANY)); | |
} | |
- | |
+#endif | |
static struct usb_driver mwifiex_usb_driver = { | |
.name = "mwifiex_usb", | |
.probe = mwifiex_usb_probe, | |
@@ -683,7 +684,7 @@ | |
.resume = mwifiex_usb_resume, | |
.soft_unbind = 1, | |
.drvwrap.driver = { | |
- .coredump = mwifiex_usb_coredump, | |
+// .coredump = mwifiex_usb_coredump, | |
}, | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment