Skip to content

Commit

Permalink
Revert "wireless/mwifiex: Add quirks for Surface devices"
Browse files Browse the repository at this point in the history
This reverts commit 367d6a9.
  • Loading branch information
qzed committed Dec 18, 2019
1 parent 2d775a4 commit d95adde
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 47 deletions.
3 changes: 2 additions & 1 deletion drivers/net/wireless/marvell/mwifiex/11n_aggr.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,

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

skb_src = skb_dequeue(&pra_list->skb_head);
Expand Down
5 changes: 1 addition & 4 deletions drivers/net/wireless/marvell/mwifiex/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,7 @@ mwifiex_cfg80211_set_power_mgmt(struct wiphy *wiphy,
mwifiex_dbg(priv->adapter, INFO,
"info: ignore timeout value for IEEE Power Save\n");

//ps_mode = enabled;

mwifiex_dbg(priv->adapter, INFO, "overriding ps_mode to false\n");
ps_mode = 0;
ps_mode = enabled;

return mwifiex_drv_set_power(priv, &ps_mode);
}
Expand Down
10 changes: 4 additions & 6 deletions drivers/net/wireless/marvell/mwifiex/cmdevt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1004,19 +1004,18 @@ mwifiex_cmd_timeout_func(struct timer_list *t)
if (cmd_node->wait_q_enabled) {
adapter->cmd_wait_q.status = -ETIMEDOUT;
mwifiex_cancel_pending_ioctl(adapter);
adapter->cmd_sent = false;
}
}
if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING) {
mwifiex_init_fw_complete(adapter);
return;
}

//if (adapter->if_ops.device_dump)
// adapter->if_ops.device_dump(adapter);
if (adapter->if_ops.device_dump)
adapter->if_ops.device_dump(adapter);

//if (adapter->if_ops.card_reset)
// adapter->if_ops.card_reset(adapter);
if (adapter->if_ops.card_reset)
adapter->if_ops.card_reset(adapter);
}

void
Expand Down Expand Up @@ -1579,7 +1578,6 @@ int mwifiex_ret_get_hw_spec(struct mwifiex_private *priv,
adapter->key_api_minor_ver);
break;
case FW_API_VER_ID:
case FW_KEY_API_VER_ID:
adapter->fw_api_ver =
api_rev->major_ver;
mwifiex_dbg(adapter, INFO,
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/marvell/mwifiex/fw.h
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,6 @@ struct host_cmd_ds_802_11_ps_mode_enh {
enum API_VER_ID {
KEY_API_VER_ID = 1,
FW_API_VER_ID = 2,
FW_KEY_API_VER_ID = 4,
};

struct hw_spec_api_rev {
Expand Down
17 changes: 4 additions & 13 deletions drivers/net/wireless/marvell/mwifiex/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ 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);
Expand All @@ -172,18 +171,16 @@ void mwifiex_queue_main_work(struct mwifiex_adapter *adapter)
}
EXPORT_SYMBOL_GPL(mwifiex_queue_main_work);

void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)
static void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter)
{
spin_lock_bh(&adapter->rx_proc_lock);
if (adapter->rx_processing) {
adapter->more_rx_task_flag = true;
spin_unlock_bh(&adapter->rx_proc_lock);
} else {
spin_unlock_bh(&adapter->rx_proc_lock);
queue_work(adapter->rx_workqueue, &adapter->rx_work);
}
}
EXPORT_SYMBOL_GPL(mwifiex_queue_rx_work);

static int mwifiex_process_rx(struct mwifiex_adapter *adapter)
{
Expand All @@ -192,15 +189,13 @@ static int mwifiex_process_rx(struct mwifiex_adapter *adapter)

spin_lock_bh(&adapter->rx_proc_lock);
if (adapter->rx_processing || adapter->rx_locked) {
adapter->more_rx_task_flag = true;
spin_unlock_bh(&adapter->rx_proc_lock);
goto exit_rx_proc;
} else {
adapter->rx_processing = true;
spin_unlock_bh(&adapter->rx_proc_lock);
}

rx_process_start:
/* Check for Rx data */
while ((skb = skb_dequeue(&adapter->rx_data_q))) {
atomic_dec(&adapter->rx_pending);
Expand All @@ -222,11 +217,6 @@ static int mwifiex_process_rx(struct mwifiex_adapter *adapter)
}
}
spin_lock_bh(&adapter->rx_proc_lock);
if (adapter->more_rx_task_flag) {
adapter->more_rx_task_flag = false;
spin_unlock_bh(&adapter->rx_proc_lock);
goto rx_process_start;
}
adapter->rx_processing = false;
spin_unlock_bh(&adapter->rx_proc_lock);

Expand Down Expand Up @@ -290,10 +280,11 @@ 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) &&
(adapter->pm_wakeup_card_req &&
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/wireless/marvell/mwifiex/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,6 @@ 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 */
Expand Down Expand Up @@ -1696,7 +1695,6 @@ void mwifiex_upload_device_dump(struct mwifiex_adapter *adapter);
void *mwifiex_alloc_dma_align_buf(int rx_len, gfp_t flags);
void mwifiex_fw_dump_event(struct mwifiex_private *priv);
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);
Expand Down
9 changes: 0 additions & 9 deletions drivers/net/wireless/marvell/mwifiex/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -1743,15 +1743,6 @@ static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter)
}

rx_len = get_unaligned_le16(skb->data);

if (rx_len == 0) {
mwifiex_dbg(adapter, ERROR,
"0 byte cmdrsp\n");
mwifiex_map_pci_memory(adapter, skb, MWIFIEX_UPLD_SIZE,
PCI_DMA_FROMDEVICE);
return 0;
}

skb_put(skb, MWIFIEX_UPLD_SIZE - skb->len);
skb_trim(skb, rx_len);

Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/marvell/mwifiex/sta_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ static bool drcs;
module_param(drcs, bool, 0644);
MODULE_PARM_DESC(drcs, "multi-channel operation:1, single-channel operation:0");

static bool disable_auto_ds = 1;
module_param(disable_auto_ds, bool, 0644);
static bool disable_auto_ds;
module_param(disable_auto_ds, bool, 0);
MODULE_PARM_DESC(disable_auto_ds,
"deepsleep enabled=0(default), deepsleep disabled=1");
/*
Expand Down
10 changes: 3 additions & 7 deletions drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,9 @@ mwifiex_process_cmdresp_error(struct mwifiex_private *priv,
struct mwifiex_adapter *adapter = priv->adapter;
struct host_cmd_ds_802_11_ps_mode_enh *pm;

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

if (adapter->curr_cmd->wait_q_enabled)
adapter->cmd_wait_q.status = -1;
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/wireless/marvell/mwifiex/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ 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,
Expand Down
Empty file modified scripts/leaking_addresses.pl
100644 → 100755
Empty file.

0 comments on commit d95adde

Please sign in to comment.