Skip to content

Commit 6941a12

Browse files
kitakar5525qzed
authored andcommitted
Revert "wireless/mwifiex: Add quirks for Surface devices"
This reverts commit 7f59405. (corresponds to commit d95adde)
1 parent 659cf71 commit 6941a12

File tree

11 files changed

+16
-48
lines changed

11 files changed

+16
-48
lines changed

drivers/net/wireless/marvell/mwifiex/11n_aggr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
200200

201201
do {
202202
/* Check if AMSDU can accommodate this MSDU */
203-
if (skb_tailroom(skb_aggr) < (skb_src->len + LLC_SNAP_LEN))
203+
if ((skb_aggr->len + skb_src->len + LLC_SNAP_LEN) >
204+
adapter->tx_buf_size)
204205
break;
205206

206207
skb_src = skb_dequeue(&pra_list->skb_head);

drivers/net/wireless/marvell/mwifiex/cfg80211.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,7 @@ mwifiex_cfg80211_set_power_mgmt(struct wiphy *wiphy,
437437
mwifiex_dbg(priv->adapter, INFO,
438438
"info: ignore timeout value for IEEE Power Save\n");
439439

440-
//ps_mode = enabled;
441-
442-
mwifiex_dbg(priv->adapter, INFO, "overriding ps_mode to false\n");
443-
ps_mode = 0;
440+
ps_mode = enabled;
444441

445442
return mwifiex_drv_set_power(priv, &ps_mode);
446443
}

drivers/net/wireless/marvell/mwifiex/cmdevt.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,19 +1000,18 @@ mwifiex_cmd_timeout_func(struct timer_list *t)
10001000
if (cmd_node->wait_q_enabled) {
10011001
adapter->cmd_wait_q.status = -ETIMEDOUT;
10021002
mwifiex_cancel_pending_ioctl(adapter);
1003-
adapter->cmd_sent = false;
10041003
}
10051004
}
10061005
if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING) {
10071006
mwifiex_init_fw_complete(adapter);
10081007
return;
10091008
}
10101009

1011-
//if (adapter->if_ops.device_dump)
1012-
// adapter->if_ops.device_dump(adapter);
1010+
if (adapter->if_ops.device_dump)
1011+
adapter->if_ops.device_dump(adapter);
10131012

1014-
//if (adapter->if_ops.card_reset)
1015-
// adapter->if_ops.card_reset(adapter);
1013+
if (adapter->if_ops.card_reset)
1014+
adapter->if_ops.card_reset(adapter);
10161015
}
10171016

10181017
void
@@ -1578,7 +1577,6 @@ int mwifiex_ret_get_hw_spec(struct mwifiex_private *priv,
15781577
adapter->key_api_minor_ver);
15791578
break;
15801579
case FW_API_VER_ID:
1581-
case FW_KEY_API_VER_ID:
15821580
adapter->fw_api_ver =
15831581
api_rev->major_ver;
15841582
mwifiex_dbg(adapter, INFO,

drivers/net/wireless/marvell/mwifiex/fw.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,6 @@ struct host_cmd_ds_802_11_ps_mode_enh {
10521052
enum API_VER_ID {
10531053
KEY_API_VER_ID = 1,
10541054
FW_API_VER_ID = 2,
1055-
FW_KEY_API_VER_ID = 4,
10561055
};
10571056

10581057
struct hw_spec_api_rev {

drivers/net/wireless/marvell/mwifiex/main.c

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ void mwifiex_queue_main_work(struct mwifiex_adapter *adapter)
163163
spin_lock_irqsave(&adapter->main_proc_lock, flags);
164164
if (adapter->mwifiex_processing) {
165165
adapter->more_task_flag = true;
166-
adapter->more_rx_task_flag = true;
167166
spin_unlock_irqrestore(&adapter->main_proc_lock, flags);
168167
} else {
169168
spin_unlock_irqrestore(&adapter->main_proc_lock, flags);
@@ -172,20 +171,18 @@ void mwifiex_queue_main_work(struct mwifiex_adapter *adapter)
172171
}
173172
EXPORT_SYMBOL_GPL(mwifiex_queue_main_work);
174173

175-
void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)
174+
static void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)
176175
{
177176
unsigned long flags;
178177

179178
spin_lock_irqsave(&adapter->rx_proc_lock, flags);
180179
if (adapter->rx_processing) {
181-
adapter->more_rx_task_flag = true;
182180
spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
183181
} else {
184182
spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
185183
queue_work(adapter->rx_workqueue, &adapter->rx_work);
186184
}
187185
}
188-
EXPORT_SYMBOL_GPL(mwifiex_queue_rx_work);
189186

190187
static int mwifiex_process_rx(struct mwifiex_adapter *adapter)
191188
{
@@ -195,15 +192,13 @@ static int mwifiex_process_rx(struct mwifiex_adapter *adapter)
195192

196193
spin_lock_irqsave(&adapter->rx_proc_lock, flags);
197194
if (adapter->rx_processing || adapter->rx_locked) {
198-
adapter->more_rx_task_flag = true;
199195
spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
200196
goto exit_rx_proc;
201197
} else {
202198
adapter->rx_processing = true;
203199
spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
204200
}
205201

206-
rx_process_start:
207202
/* Check for Rx data */
208203
while ((skb = skb_dequeue(&adapter->rx_data_q))) {
209204
atomic_dec(&adapter->rx_pending);
@@ -225,11 +220,6 @@ static int mwifiex_process_rx(struct mwifiex_adapter *adapter)
225220
}
226221
}
227222
spin_lock_irqsave(&adapter->rx_proc_lock, flags);
228-
if (adapter->more_rx_task_flag) {
229-
adapter->more_rx_task_flag = false;
230-
spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
231-
goto rx_process_start;
232-
}
233223
adapter->rx_processing = false;
234224
spin_unlock_irqrestore(&adapter->rx_proc_lock, flags);
235225

@@ -293,10 +283,11 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
293283
mwifiex_process_hs_config(adapter);
294284
if (adapter->if_ops.process_int_status)
295285
adapter->if_ops.process_int_status(adapter);
296-
if (adapter->rx_work_enabled && adapter->data_received)
297-
mwifiex_queue_rx_work(adapter);
298286
}
299287

288+
if (adapter->rx_work_enabled && adapter->data_received)
289+
mwifiex_queue_rx_work(adapter);
290+
300291
/* Need to wake up the card ? */
301292
if ((adapter->ps_state == PS_STATE_SLEEP) &&
302293
(adapter->pm_wakeup_card_req &&

drivers/net/wireless/marvell/mwifiex/main.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,6 @@ struct mwifiex_adapter {
909909
spinlock_t main_proc_lock;
910910
u32 mwifiex_processing;
911911
u8 more_task_flag;
912-
u8 more_rx_task_flag;
913912
u16 tx_buf_size;
914913
u16 curr_tx_buf_size;
915914
/* sdio single port rx aggregation capability */
@@ -1696,7 +1695,6 @@ void mwifiex_upload_device_dump(struct mwifiex_adapter *adapter);
16961695
void *mwifiex_alloc_dma_align_buf(int rx_len, gfp_t flags);
16971696
void mwifiex_fw_dump_event(struct mwifiex_private *priv);
16981697
void mwifiex_queue_main_work(struct mwifiex_adapter *adapter);
1699-
void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter);
17001698
int mwifiex_get_wakeup_reason(struct mwifiex_private *priv, u16 action,
17011699
int cmd_type,
17021700
struct mwifiex_ds_wakeup_reason *wakeup_reason);

drivers/net/wireless/marvell/mwifiex/pcie.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,15 +1748,6 @@ static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter)
17481748
}
17491749

17501750
rx_len = get_unaligned_le16(skb->data);
1751-
1752-
if (rx_len == 0) {
1753-
mwifiex_dbg(adapter, ERROR,
1754-
"0 byte cmdrsp\n");
1755-
mwifiex_map_pci_memory(adapter, skb, MWIFIEX_UPLD_SIZE,
1756-
PCI_DMA_FROMDEVICE);
1757-
return 0;
1758-
}
1759-
17601751
skb_put(skb, MWIFIEX_UPLD_SIZE - skb->len);
17611752
skb_trim(skb, rx_len);
17621753

drivers/net/wireless/marvell/mwifiex/sta_cmd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ static bool drcs;
3030
module_param(drcs, bool, 0644);
3131
MODULE_PARM_DESC(drcs, "multi-channel operation:1, single-channel operation:0");
3232

33-
static bool disable_auto_ds = 1;
34-
module_param(disable_auto_ds, bool, 0644);
33+
static bool disable_auto_ds;
34+
module_param(disable_auto_ds, bool, 0);
3535
MODULE_PARM_DESC(disable_auto_ds,
3636
"deepsleep enabled=0(default), deepsleep disabled=1");
3737
/*

drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,9 @@ mwifiex_process_cmdresp_error(struct mwifiex_private *priv,
4848
struct host_cmd_ds_802_11_ps_mode_enh *pm;
4949
unsigned long flags;
5050

51-
if (resp->command == 271 && resp->result == 2){
52-
// ignore this command as the firmware does not support it
53-
}
54-
else {
55-
mwifiex_dbg(adapter, ERROR,
56-
"CMD_RESP: cmd %#x error, result=%#x\n",
57-
resp->command, resp->result);
58-
}
51+
mwifiex_dbg(adapter, ERROR,
52+
"CMD_RESP: cmd %#x error, result=%#x\n",
53+
resp->command, resp->result);
5954

6055
if (adapter->curr_cmd->wait_q_enabled)
6156
adapter->cmd_wait_q.status = -1;

drivers/net/wireless/marvell/mwifiex/usb.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,6 @@ static int mwifiex_usb_recv(struct mwifiex_adapter *adapter,
144144
skb_queue_tail(&adapter->rx_data_q, skb);
145145
adapter->data_received = true;
146146
atomic_inc(&adapter->rx_pending);
147-
if (adapter->rx_work_enabled)
148-
mwifiex_queue_rx_work(adapter);
149147
break;
150148
default:
151149
mwifiex_dbg(adapter, ERROR,

0 commit comments

Comments
 (0)