updating wifi patch
This commit is contained in:
parent
181a550e2c
commit
50dbcf83f7
|
@ -1,6 +1,6 @@
|
||||||
From 1126c7e788d3295e2f98d40662edf22155633267 Mon Sep 17 00:00:00 2001
|
From a359b5adc91cb9f2d3cc07705d804ef60bf6e4e3 Mon Sep 17 00:00:00 2001
|
||||||
From: Jake Day <jake@ninebysix.com>
|
From: Jake Day <jake@ninebysix.com>
|
||||||
Date: Thu, 1 Feb 2018 19:23:39 -0500
|
Date: Fri, 2 Feb 2018 12:57:32 -0500
|
||||||
Subject: fixes for marvell mwifiex
|
Subject: fixes for marvell mwifiex
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ index 042a1d0..fc9041f 100644
|
||||||
|
|
||||||
skb_src = skb_dequeue(&pra_list->skb_head);
|
skb_src = skb_dequeue(&pra_list->skb_head);
|
||||||
diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
|
diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
|
||||||
index 32c5074..4160551 100644
|
index 6e0d9a9..d008687 100644
|
||||||
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
|
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
|
||||||
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
|
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
|
||||||
@@ -416,6 +416,9 @@ mwifiex_cfg80211_set_power_mgmt(struct wiphy *wiphy,
|
@@ -416,6 +416,9 @@ mwifiex_cfg80211_set_power_mgmt(struct wiphy *wiphy,
|
||||||
|
@ -32,39 +32,11 @@ index 32c5074..4160551 100644
|
||||||
return mwifiex_drv_set_power(priv, &ps_mode);
|
return mwifiex_drv_set_power(priv, &ps_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2503,6 +2506,7 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
|
|
||||||
struct ieee80211_channel *chan;
|
|
||||||
struct ieee_types_header *ie;
|
|
||||||
struct mwifiex_user_scan_cfg *user_scan_cfg;
|
|
||||||
+ u8 mac_addr[ETH_ALEN];
|
|
||||||
|
|
||||||
mwifiex_dbg(priv->adapter, CMD,
|
|
||||||
"info: received scan request on %s\n", dev->name);
|
|
||||||
@@ -2529,15 +2533,10 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
|
|
||||||
priv->scan_request = request;
|
|
||||||
|
|
||||||
if (request->flags & NL80211_SCAN_FLAG_RANDOM_ADDR) {
|
|
||||||
- ether_addr_copy(priv->random_mac, request->mac_addr);
|
|
||||||
- for (i = 0; i < ETH_ALEN; i++) {
|
|
||||||
- priv->random_mac[i] &= request->mac_addr_mask[i];
|
|
||||||
- priv->random_mac[i] |= get_random_int() &
|
|
||||||
- ~(request->mac_addr_mask[i]);
|
|
||||||
- }
|
|
||||||
- ether_addr_copy(user_scan_cfg->random_mac, priv->random_mac);
|
|
||||||
- } else {
|
|
||||||
- eth_zero_addr(priv->random_mac);
|
|
||||||
+ get_random_mask_addr(mac_addr, request->mac_addr,
|
|
||||||
+ request->mac_addr_mask);
|
|
||||||
+ ether_addr_copy(request->mac_addr, mac_addr);
|
|
||||||
+ ether_addr_copy(user_scan_cfg->random_mac, mac_addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
user_scan_cfg->num_ssids = request->n_ssids;
|
|
||||||
diff --git a/drivers/net/wireless/marvell/mwifiex/init.c b/drivers/net/wireless/marvell/mwifiex/init.c
|
diff --git a/drivers/net/wireless/marvell/mwifiex/init.c b/drivers/net/wireless/marvell/mwifiex/init.c
|
||||||
index e11919d..7f41cf8 100644
|
index e1aa860..328829b 100644
|
||||||
--- a/drivers/net/wireless/marvell/mwifiex/init.c
|
--- a/drivers/net/wireless/marvell/mwifiex/init.c
|
||||||
+++ b/drivers/net/wireless/marvell/mwifiex/init.c
|
+++ b/drivers/net/wireless/marvell/mwifiex/init.c
|
||||||
@@ -60,7 +60,7 @@ static void wakeup_timer_fn(unsigned long data)
|
@@ -60,7 +60,7 @@ static void wakeup_timer_fn(struct timer_list *t)
|
||||||
adapter->hw_status = MWIFIEX_HW_STATUS_RESET;
|
adapter->hw_status = MWIFIEX_HW_STATUS_RESET;
|
||||||
mwifiex_cancel_all_pending_cmd(adapter);
|
mwifiex_cancel_all_pending_cmd(adapter);
|
||||||
|
|
||||||
|
@ -73,32 +45,106 @@ index e11919d..7f41cf8 100644
|
||||||
adapter->if_ops.card_reset(adapter);
|
adapter->if_ops.card_reset(adapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
|
||||||
|
index a96bd7e..79b026f 100644
|
||||||
|
--- a/drivers/net/wireless/marvell/mwifiex/main.c
|
||||||
|
+++ b/drivers/net/wireless/marvell/mwifiex/main.c
|
||||||
|
@@ -163,6 +163,7 @@ void mwifiex_queue_main_work(struct mwifiex_adapter *adapter)
|
||||||
|
spin_lock_irqsave(&adapter->main_proc_lock, flags);
|
||||||
|
if (adapter->mwifiex_processing) {
|
||||||
|
adapter->more_task_flag = true;
|
||||||
|
+ adapter->more_rx_task_flag = true;
|
||||||
|
spin_unlock_irqrestore(&adapter->main_proc_lock, flags);
|
||||||
|
} else {
|
||||||
|
spin_unlock_irqrestore(&adapter->main_proc_lock, flags);
|
||||||
|
@@ -171,18 +172,20 @@ void mwifiex_queue_main_work(struct mwifiex_adapter *adapter)
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(mwifiex_queue_main_work);
|
||||||
|
|
||||||
|
-static void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)
|
||||||
|
+void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)
|
||||||
|
{
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
|
spin_lock_irqsave(&adapter->rx_proc_lock, flags);
|
||||||
|
if (adapter->rx_processing) {
|
||||||
|
+ adapter->more_rx_task_flag = true;
|
||||||
|
spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
|
||||||
|
} else {
|
||||||
|
spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
|
||||||
|
queue_work(adapter->rx_workqueue, &adapter->rx_work);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(mwifiex_queue_rx_work);
|
||||||
|
|
||||||
|
static int mwifiex_process_rx(struct mwifiex_adapter *adapter)
|
||||||
|
{
|
||||||
|
@@ -192,13 +195,14 @@ static int mwifiex_process_rx(struct mwifiex_adapter *adapter)
|
||||||
|
|
||||||
|
spin_lock_irqsave(&adapter->rx_proc_lock, flags);
|
||||||
|
if (adapter->rx_processing || adapter->rx_locked) {
|
||||||
|
+ adapter->more_rx_task_flag = true;
|
||||||
|
spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
|
||||||
|
goto exit_rx_proc;
|
||||||
|
} else {
|
||||||
|
adapter->rx_processing = true;
|
||||||
|
spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+rx_process_start:
|
||||||
|
/* Check for Rx data */
|
||||||
|
while ((skb = skb_dequeue(&adapter->rx_data_q))) {
|
||||||
|
atomic_dec(&adapter->rx_pending);
|
||||||
|
@@ -220,6 +224,11 @@ static int mwifiex_process_rx(struct mwifiex_adapter *adapter)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
spin_lock_irqsave(&adapter->rx_proc_lock, flags);
|
||||||
|
+ if (adapter->more_rx_task_flag) {
|
||||||
|
+ adapter->more_rx_task_flag = false;
|
||||||
|
+ spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
|
||||||
|
+ goto rx_process_start;
|
||||||
|
+ }
|
||||||
|
adapter->rx_processing = false;
|
||||||
|
spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
|
||||||
|
|
||||||
|
@@ -283,10 +292,10 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
|
||||||
|
mwifiex_process_hs_config(adapter);
|
||||||
|
if (adapter->if_ops.process_int_status)
|
||||||
|
adapter->if_ops.process_int_status(adapter);
|
||||||
|
+ if (adapter->rx_work_enabled && adapter->data_received)
|
||||||
|
+ mwifiex_queue_rx_work(adapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (adapter->rx_work_enabled && adapter->data_received)
|
||||||
|
- mwifiex_queue_rx_work(adapter);
|
||||||
|
|
||||||
|
/* Need to wake up the card ? */
|
||||||
|
if ((adapter->ps_state == PS_STATE_SLEEP) &&
|
||||||
diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h
|
diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h
|
||||||
index a76bd79..a34de85 100644
|
index 154c079..4205344 100644
|
||||||
--- a/drivers/net/wireless/marvell/mwifiex/main.h
|
--- a/drivers/net/wireless/marvell/mwifiex/main.h
|
||||||
+++ b/drivers/net/wireless/marvell/mwifiex/main.h
|
+++ b/drivers/net/wireless/marvell/mwifiex/main.h
|
||||||
@@ -680,7 +680,6 @@ struct mwifiex_private {
|
@@ -889,6 +889,7 @@ struct mwifiex_adapter {
|
||||||
struct mwifiex_user_scan_chan hidden_chan[MWIFIEX_USER_SCAN_CHAN_MAX];
|
spinlock_t main_proc_lock;
|
||||||
u8 assoc_resp_ht_param;
|
u32 mwifiex_processing;
|
||||||
bool ht_param_present;
|
u8 more_task_flag;
|
||||||
- u8 random_mac[ETH_ALEN];
|
+ u8 more_rx_task_flag;
|
||||||
};
|
u16 tx_buf_size;
|
||||||
|
u16 curr_tx_buf_size;
|
||||||
|
/* sdio single port rx aggregation capability */
|
||||||
|
@@ -1661,6 +1662,7 @@ void mwifiex_upload_device_dump(struct mwifiex_adapter *adapter, void *drv_info,
|
||||||
|
int drv_info_size);
|
||||||
|
void *mwifiex_alloc_dma_align_buf(int rx_len, gfp_t flags);
|
||||||
|
void mwifiex_queue_main_work(struct mwifiex_adapter *adapter);
|
||||||
|
+void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter);
|
||||||
|
int mwifiex_get_wakeup_reason(struct mwifiex_private *priv, u16 action,
|
||||||
|
int cmd_type,
|
||||||
|
struct mwifiex_ds_wakeup_reason *wakeup_reason);
|
||||||
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||||
index cd31494..50df1c0 100644
|
index cd31494..575da92 100644
|
||||||
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
|
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||||
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||||
@@ -310,6 +310,8 @@ static void mwifiex_pcie_remove(struct pci_dev *pdev)
|
@@ -1729,6 +1729,16 @@ static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter)
|
||||||
mwifiex_init_shutdown_fw(priv, MWIFIEX_FUNC_SHUTDOWN);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ cancel_work_sync(&card->work);
|
|
||||||
+
|
|
||||||
mwifiex_remove_card(adapter);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1729,6 +1731,16 @@ static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rx_len = get_unaligned_le16(skb->data);
|
rx_len = get_unaligned_le16(skb->data);
|
||||||
|
@ -115,33 +161,15 @@ index cd31494..50df1c0 100644
|
||||||
skb_put(skb, MWIFIEX_UPLD_SIZE - skb->len);
|
skb_put(skb, MWIFIEX_UPLD_SIZE - skb->len);
|
||||||
skb_trim(skb, rx_len);
|
skb_trim(skb, rx_len);
|
||||||
|
|
||||||
diff --git a/drivers/net/wireless/marvell/mwifiex/scan.c b/drivers/net/wireless/marvell/mwifiex/scan.c
|
@@ -2781,7 +2791,7 @@ static void mwifiex_pcie_card_reset_work(struct mwifiex_adapter *adapter)
|
||||||
index c9d41ed..cddf412 100644
|
{
|
||||||
--- a/drivers/net/wireless/marvell/mwifiex/scan.c
|
struct pcie_service_card *card = adapter->card;
|
||||||
+++ b/drivers/net/wireless/marvell/mwifiex/scan.c
|
|
||||||
@@ -1948,7 +1948,8 @@ mwifiex_active_scan_req_for_passive_chan(struct mwifiex_private *priv)
|
|
||||||
|
|
||||||
adapter->active_scan_triggered = true;
|
- pci_reset_function(card->dev);
|
||||||
if (priv->scan_request->flags & NL80211_SCAN_FLAG_RANDOM_ADDR)
|
+ pci_try_reset_function(card->dev);
|
||||||
- ether_addr_copy(user_scan_cfg->random_mac, priv->random_mac);
|
|
||||||
+ ether_addr_copy(user_scan_cfg->random_mac,
|
|
||||||
+ priv->scan_request->mac_addr);
|
|
||||||
user_scan_cfg->num_ssids = priv->scan_request->n_ssids;
|
|
||||||
user_scan_cfg->ssid_list = priv->scan_request->ssids;
|
|
||||||
|
|
||||||
diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c
|
|
||||||
index fd5183c..832824a 100644
|
|
||||||
--- a/drivers/net/wireless/marvell/mwifiex/sdio.c
|
|
||||||
+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c
|
|
||||||
@@ -399,6 +399,8 @@ mwifiex_sdio_remove(struct sdio_func *func)
|
|
||||||
mwifiex_init_shutdown_fw(priv, MWIFIEX_FUNC_SHUTDOWN);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ cancel_work_sync(&card->work);
|
|
||||||
+
|
|
||||||
mwifiex_remove_card(adapter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void mwifiex_pcie_work(struct work_struct *work)
|
||||||
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
|
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
|
||||||
index fb09014..5b8329e 100644
|
index fb09014..5b8329e 100644
|
||||||
--- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
|
--- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
|
||||||
|
@ -176,7 +204,7 @@ index fb09014..5b8329e 100644
|
||||||
/* Enable auto deep sleep */
|
/* Enable auto deep sleep */
|
||||||
auto_ds.auto_ds = DEEP_SLEEP_ON;
|
auto_ds.auto_ds = DEEP_SLEEP_ON;
|
||||||
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
||||||
index 0fba5b1..4e1687f 100644
|
index 1bd4e13..27d2bac 100644
|
||||||
--- a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
--- a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
||||||
+++ b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
+++ b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
|
||||||
@@ -48,9 +48,14 @@ mwifiex_process_cmdresp_error(struct mwifiex_private *priv,
|
@@ -48,9 +48,14 @@ mwifiex_process_cmdresp_error(struct mwifiex_private *priv,
|
||||||
|
@ -197,8 +225,21 @@ index 0fba5b1..4e1687f 100644
|
||||||
|
|
||||||
if (adapter->curr_cmd->wait_q_enabled)
|
if (adapter->curr_cmd->wait_q_enabled)
|
||||||
adapter->cmd_wait_q.status = -1;
|
adapter->cmd_wait_q.status = -1;
|
||||||
|
diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c b/drivers/net/wireless/marvell/mwifiex/usb.c
|
||||||
|
index 4bc2448..d20fda1 100644
|
||||||
|
--- a/drivers/net/wireless/marvell/mwifiex/usb.c
|
||||||
|
+++ b/drivers/net/wireless/marvell/mwifiex/usb.c
|
||||||
|
@@ -144,6 +144,8 @@ static int mwifiex_usb_recv(struct mwifiex_adapter *adapter,
|
||||||
|
skb_queue_tail(&adapter->rx_data_q, skb);
|
||||||
|
adapter->data_received = true;
|
||||||
|
atomic_inc(&adapter->rx_pending);
|
||||||
|
+ if (adapter->rx_work_enabled)
|
||||||
|
+ mwifiex_queue_rx_work(adapter);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
mwifiex_dbg(adapter, ERROR,
|
||||||
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
|
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
|
||||||
index 3dd05a0..ab32ef1 100644
|
index fdb3646..b44b23b 100644
|
||||||
--- a/net/wireless/sme.c
|
--- a/net/wireless/sme.c
|
||||||
+++ b/net/wireless/sme.c
|
+++ b/net/wireless/sme.c
|
||||||
@@ -690,6 +690,11 @@ void __cfg80211_connect_result(struct net_device *dev,
|
@@ -690,6 +690,11 @@ void __cfg80211_connect_result(struct net_device *dev,
|
||||||
|
@ -213,7 +254,7 @@ index 3dd05a0..ab32ef1 100644
|
||||||
nl80211_send_connect_result(wiphy_to_rdev(wdev->wiphy), dev, cr,
|
nl80211_send_connect_result(wiphy_to_rdev(wdev->wiphy), dev, cr,
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
|
|
||||||
@@ -1062,7 +1067,7 @@ int cfg80211_connect(struct cfg80211_registered_device *rdev,
|
@@ -1105,7 +1110,7 @@ int cfg80211_connect(struct cfg80211_registered_device *rdev,
|
||||||
/*
|
/*
|
||||||
* If we have an ssid_len, we're trying to connect or are
|
* If we have an ssid_len, we're trying to connect or are
|
||||||
* already connected, so reject a new SSID unless it's the
|
* already connected, so reject a new SSID unless it's the
|
||||||
|
|
|
@ -45,20 +45,106 @@ index e1aa860..328829b 100644
|
||||||
adapter->if_ops.card_reset(adapter);
|
adapter->if_ops.card_reset(adapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
|
||||||
|
index a96bd7e..79b026f 100644
|
||||||
|
--- a/drivers/net/wireless/marvell/mwifiex/main.c
|
||||||
|
+++ b/drivers/net/wireless/marvell/mwifiex/main.c
|
||||||
|
@@ -163,6 +163,7 @@ void mwifiex_queue_main_work(struct mwifiex_adapter *adapter)
|
||||||
|
spin_lock_irqsave(&adapter->main_proc_lock, flags);
|
||||||
|
if (adapter->mwifiex_processing) {
|
||||||
|
adapter->more_task_flag = true;
|
||||||
|
+ adapter->more_rx_task_flag = true;
|
||||||
|
spin_unlock_irqrestore(&adapter->main_proc_lock, flags);
|
||||||
|
} else {
|
||||||
|
spin_unlock_irqrestore(&adapter->main_proc_lock, flags);
|
||||||
|
@@ -171,18 +172,20 @@ void mwifiex_queue_main_work(struct mwifiex_adapter *adapter)
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(mwifiex_queue_main_work);
|
||||||
|
|
||||||
|
-static void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)
|
||||||
|
+void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)
|
||||||
|
{
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
|
spin_lock_irqsave(&adapter->rx_proc_lock, flags);
|
||||||
|
if (adapter->rx_processing) {
|
||||||
|
+ adapter->more_rx_task_flag = true;
|
||||||
|
spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
|
||||||
|
} else {
|
||||||
|
spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
|
||||||
|
queue_work(adapter->rx_workqueue, &adapter->rx_work);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL_GPL(mwifiex_queue_rx_work);
|
||||||
|
|
||||||
|
static int mwifiex_process_rx(struct mwifiex_adapter *adapter)
|
||||||
|
{
|
||||||
|
@@ -192,13 +195,14 @@ static int mwifiex_process_rx(struct mwifiex_adapter *adapter)
|
||||||
|
|
||||||
|
spin_lock_irqsave(&adapter->rx_proc_lock, flags);
|
||||||
|
if (adapter->rx_processing || adapter->rx_locked) {
|
||||||
|
+ adapter->more_rx_task_flag = true;
|
||||||
|
spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
|
||||||
|
goto exit_rx_proc;
|
||||||
|
} else {
|
||||||
|
adapter->rx_processing = true;
|
||||||
|
spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+rx_process_start:
|
||||||
|
/* Check for Rx data */
|
||||||
|
while ((skb = skb_dequeue(&adapter->rx_data_q))) {
|
||||||
|
atomic_dec(&adapter->rx_pending);
|
||||||
|
@@ -220,6 +224,11 @@ static int mwifiex_process_rx(struct mwifiex_adapter *adapter)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
spin_lock_irqsave(&adapter->rx_proc_lock, flags);
|
||||||
|
+ if (adapter->more_rx_task_flag) {
|
||||||
|
+ adapter->more_rx_task_flag = false;
|
||||||
|
+ spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
|
||||||
|
+ goto rx_process_start;
|
||||||
|
+ }
|
||||||
|
adapter->rx_processing = false;
|
||||||
|
spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
|
||||||
|
|
||||||
|
@@ -283,10 +292,10 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
|
||||||
|
mwifiex_process_hs_config(adapter);
|
||||||
|
if (adapter->if_ops.process_int_status)
|
||||||
|
adapter->if_ops.process_int_status(adapter);
|
||||||
|
+ if (adapter->rx_work_enabled && adapter->data_received)
|
||||||
|
+ mwifiex_queue_rx_work(adapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (adapter->rx_work_enabled && adapter->data_received)
|
||||||
|
- mwifiex_queue_rx_work(adapter);
|
||||||
|
|
||||||
|
/* Need to wake up the card ? */
|
||||||
|
if ((adapter->ps_state == PS_STATE_SLEEP) &&
|
||||||
|
diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h
|
||||||
|
index 154c079..4205344 100644
|
||||||
|
--- a/drivers/net/wireless/marvell/mwifiex/main.h
|
||||||
|
+++ b/drivers/net/wireless/marvell/mwifiex/main.h
|
||||||
|
@@ -889,6 +889,7 @@ struct mwifiex_adapter {
|
||||||
|
spinlock_t main_proc_lock;
|
||||||
|
u32 mwifiex_processing;
|
||||||
|
u8 more_task_flag;
|
||||||
|
+ u8 more_rx_task_flag;
|
||||||
|
u16 tx_buf_size;
|
||||||
|
u16 curr_tx_buf_size;
|
||||||
|
/* sdio single port rx aggregation capability */
|
||||||
|
@@ -1661,6 +1662,7 @@ void mwifiex_upload_device_dump(struct mwifiex_adapter *adapter, void *drv_info,
|
||||||
|
int drv_info_size);
|
||||||
|
void *mwifiex_alloc_dma_align_buf(int rx_len, gfp_t flags);
|
||||||
|
void mwifiex_queue_main_work(struct mwifiex_adapter *adapter);
|
||||||
|
+void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter);
|
||||||
|
int mwifiex_get_wakeup_reason(struct mwifiex_private *priv, u16 action,
|
||||||
|
int cmd_type,
|
||||||
|
struct mwifiex_ds_wakeup_reason *wakeup_reason);
|
||||||
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||||
index cd31494..50df1c0 100644
|
index cd31494..575da92 100644
|
||||||
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
|
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||||
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
|
||||||
@@ -310,6 +310,8 @@ static void mwifiex_pcie_remove(struct pci_dev *pdev)
|
@@ -1729,6 +1729,16 @@ static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter)
|
||||||
mwifiex_init_shutdown_fw(priv, MWIFIEX_FUNC_SHUTDOWN);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ cancel_work_sync(&card->work);
|
|
||||||
+
|
|
||||||
mwifiex_remove_card(adapter);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1729,6 +1731,16 @@ static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rx_len = get_unaligned_le16(skb->data);
|
rx_len = get_unaligned_le16(skb->data);
|
||||||
|
@ -75,19 +161,15 @@ index cd31494..50df1c0 100644
|
||||||
skb_put(skb, MWIFIEX_UPLD_SIZE - skb->len);
|
skb_put(skb, MWIFIEX_UPLD_SIZE - skb->len);
|
||||||
skb_trim(skb, rx_len);
|
skb_trim(skb, rx_len);
|
||||||
|
|
||||||
diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c
|
@@ -2781,7 +2791,7 @@ static void mwifiex_pcie_card_reset_work(struct mwifiex_adapter *adapter)
|
||||||
index fd5183c..832824a 100644
|
{
|
||||||
--- a/drivers/net/wireless/marvell/mwifiex/sdio.c
|
struct pcie_service_card *card = adapter->card;
|
||||||
+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c
|
|
||||||
@@ -399,6 +399,8 @@ mwifiex_sdio_remove(struct sdio_func *func)
|
|
||||||
mwifiex_init_shutdown_fw(priv, MWIFIEX_FUNC_SHUTDOWN);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ cancel_work_sync(&card->work);
|
- pci_reset_function(card->dev);
|
||||||
+
|
+ pci_try_reset_function(card->dev);
|
||||||
mwifiex_remove_card(adapter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void mwifiex_pcie_work(struct work_struct *work)
|
||||||
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
|
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
|
||||||
index fb09014..5b8329e 100644
|
index fb09014..5b8329e 100644
|
||||||
--- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
|
--- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
|
||||||
|
@ -143,6 +225,19 @@ index 1bd4e13..27d2bac 100644
|
||||||
|
|
||||||
if (adapter->curr_cmd->wait_q_enabled)
|
if (adapter->curr_cmd->wait_q_enabled)
|
||||||
adapter->cmd_wait_q.status = -1;
|
adapter->cmd_wait_q.status = -1;
|
||||||
|
diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c b/drivers/net/wireless/marvell/mwifiex/usb.c
|
||||||
|
index 4bc2448..d20fda1 100644
|
||||||
|
--- a/drivers/net/wireless/marvell/mwifiex/usb.c
|
||||||
|
+++ b/drivers/net/wireless/marvell/mwifiex/usb.c
|
||||||
|
@@ -144,6 +144,8 @@ static int mwifiex_usb_recv(struct mwifiex_adapter *adapter,
|
||||||
|
skb_queue_tail(&adapter->rx_data_q, skb);
|
||||||
|
adapter->data_received = true;
|
||||||
|
atomic_inc(&adapter->rx_pending);
|
||||||
|
+ if (adapter->rx_work_enabled)
|
||||||
|
+ mwifiex_queue_rx_work(adapter);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
mwifiex_dbg(adapter, ERROR,
|
||||||
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
|
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
|
||||||
index fdb3646..b44b23b 100644
|
index fdb3646..b44b23b 100644
|
||||||
--- a/net/wireless/sme.c
|
--- a/net/wireless/sme.c
|
||||||
|
|
Loading…
Reference in a new issue