fixes for marvell mwifiex driver

this disables power save, fixes handling of amsdu packets, and adds checking len on cmd complete
This commit is contained in:
Jake Day 2017-10-03 18:52:03 -04:00
parent 6f92091bcb
commit 0386bc9df9
4 changed files with 16 additions and 4 deletions

View file

@ -200,8 +200,7 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
do {
/* Check if AMSDU can accommodate this MSDU */
if ((skb_aggr->len + skb_src->len + LLC_SNAP_LEN) >
adapter->tx_buf_size)
if (skb_tailroom(skb_aggr) < (skb_src->len + LLC_SNAP_LEN))
break;
skb_src = skb_dequeue(&pra_list->skb_head);

View file

@ -416,6 +416,9 @@ mwifiex_cfg80211_set_power_mgmt(struct wiphy *wiphy,
ps_mode = enabled;
mwifiex_dbg(priv->adapter, ERROR, "overriding ps_mode to false\n");
ps_mode = 0;
return mwifiex_drv_set_power(priv, &ps_mode);
}

View file

@ -1729,6 +1729,16 @@ 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);

View file

@ -2313,7 +2313,7 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta, bool init)
if (ret)
return -1;
if (priv->bss_type != MWIFIEX_BSS_TYPE_UAP) {
if (0 && priv->bss_type != MWIFIEX_BSS_TYPE_UAP) {
/* Enable IEEE PS by default */
priv->adapter->ps_mode = MWIFIEX_802_11_POWER_MODE_PSP;
ret = mwifiex_send_cmd(priv,
@ -2369,7 +2369,7 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta, bool init)
if (ret)
return -1;
if (!disable_auto_ds && first_sta &&
if (0 && !disable_auto_ds && first_sta &&
priv->bss_type != MWIFIEX_BSS_TYPE_UAP) {
/* Enable auto deep sleep */
auto_ds.auto_ds = DEEP_SLEEP_ON;