Commit 828cf222 authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by John W. Linville

mwifiex: change transmit buffer size for 8897

Currently default Tx buffer size configured to firmware is 2K
for all chipsets. This patch changes it to 4K for SD/PCIe/USB
8897 chipsets as per firmware requirements.
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent fa0ecbb9
...@@ -234,7 +234,6 @@ static void mwifiex_init_adapter(struct mwifiex_adapter *adapter) ...@@ -234,7 +234,6 @@ static void mwifiex_init_adapter(struct mwifiex_adapter *adapter)
adapter->pm_wakeup_fw_try = false; adapter->pm_wakeup_fw_try = false;
adapter->tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K;
adapter->curr_tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K; adapter->curr_tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K;
adapter->is_hs_configured = false; adapter->is_hs_configured = false;
......
...@@ -190,6 +190,7 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev, ...@@ -190,6 +190,7 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev,
card->pcie.firmware = data->firmware; card->pcie.firmware = data->firmware;
card->pcie.reg = data->reg; card->pcie.reg = data->reg;
card->pcie.blksz_fw_dl = data->blksz_fw_dl; card->pcie.blksz_fw_dl = data->blksz_fw_dl;
card->pcie.tx_buf_size = data->tx_buf_size;
} }
if (mwifiex_add_card(card, &add_remove_card_sem, &pcie_ops, if (mwifiex_add_card(card, &add_remove_card_sem, &pcie_ops,
...@@ -2320,6 +2321,7 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter) ...@@ -2320,6 +2321,7 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter)
} }
adapter->dev = &pdev->dev; adapter->dev = &pdev->dev;
adapter->tx_buf_size = card->pcie.tx_buf_size;
strcpy(adapter->fw_name, card->pcie.firmware); strcpy(adapter->fw_name, card->pcie.firmware);
return 0; return 0;
......
...@@ -195,18 +195,21 @@ struct mwifiex_pcie_device { ...@@ -195,18 +195,21 @@ struct mwifiex_pcie_device {
const char *firmware; const char *firmware;
const struct mwifiex_pcie_card_reg *reg; const struct mwifiex_pcie_card_reg *reg;
u16 blksz_fw_dl; u16 blksz_fw_dl;
u16 tx_buf_size;
}; };
static const struct mwifiex_pcie_device mwifiex_pcie8766 = { static const struct mwifiex_pcie_device mwifiex_pcie8766 = {
.firmware = PCIE8766_DEFAULT_FW_NAME, .firmware = PCIE8766_DEFAULT_FW_NAME,
.reg = &mwifiex_reg_8766, .reg = &mwifiex_reg_8766,
.blksz_fw_dl = MWIFIEX_PCIE_BLOCK_SIZE_FW_DNLD, .blksz_fw_dl = MWIFIEX_PCIE_BLOCK_SIZE_FW_DNLD,
.tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K,
}; };
static const struct mwifiex_pcie_device mwifiex_pcie8897 = { static const struct mwifiex_pcie_device mwifiex_pcie8897 = {
.firmware = PCIE8897_DEFAULT_FW_NAME, .firmware = PCIE8897_DEFAULT_FW_NAME,
.reg = &mwifiex_reg_8897, .reg = &mwifiex_reg_8897,
.blksz_fw_dl = MWIFIEX_PCIE_BLOCK_SIZE_FW_DNLD, .blksz_fw_dl = MWIFIEX_PCIE_BLOCK_SIZE_FW_DNLD,
.tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_4K,
}; };
struct mwifiex_evt_buf_desc { struct mwifiex_evt_buf_desc {
......
...@@ -84,6 +84,7 @@ mwifiex_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id) ...@@ -84,6 +84,7 @@ mwifiex_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id)
card->mp_agg_pkt_limit = data->mp_agg_pkt_limit; card->mp_agg_pkt_limit = data->mp_agg_pkt_limit;
card->supports_sdio_new_mode = data->supports_sdio_new_mode; card->supports_sdio_new_mode = data->supports_sdio_new_mode;
card->has_control_mask = data->has_control_mask; card->has_control_mask = data->has_control_mask;
card->tx_buf_size = data->tx_buf_size;
} }
sdio_claim_host(func); sdio_claim_host(func);
...@@ -1760,6 +1761,7 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter) ...@@ -1760,6 +1761,7 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter)
/* save adapter pointer in card */ /* save adapter pointer in card */
card->adapter = adapter; card->adapter = adapter;
adapter->tx_buf_size = card->tx_buf_size;
sdio_claim_host(func); sdio_claim_host(func);
......
...@@ -233,6 +233,7 @@ struct sdio_mmc_card { ...@@ -233,6 +233,7 @@ struct sdio_mmc_card {
u8 mp_agg_pkt_limit; u8 mp_agg_pkt_limit;
bool supports_sdio_new_mode; bool supports_sdio_new_mode;
bool has_control_mask; bool has_control_mask;
u16 tx_buf_size;
u32 mp_rd_bitmap; u32 mp_rd_bitmap;
u32 mp_wr_bitmap; u32 mp_wr_bitmap;
...@@ -256,6 +257,7 @@ struct mwifiex_sdio_device { ...@@ -256,6 +257,7 @@ struct mwifiex_sdio_device {
u8 mp_agg_pkt_limit; u8 mp_agg_pkt_limit;
bool supports_sdio_new_mode; bool supports_sdio_new_mode;
bool has_control_mask; bool has_control_mask;
u16 tx_buf_size;
}; };
static const struct mwifiex_sdio_card_reg mwifiex_reg_sd87xx = { static const struct mwifiex_sdio_card_reg mwifiex_reg_sd87xx = {
...@@ -312,6 +314,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8786 = { ...@@ -312,6 +314,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8786 = {
.mp_agg_pkt_limit = 8, .mp_agg_pkt_limit = 8,
.supports_sdio_new_mode = false, .supports_sdio_new_mode = false,
.has_control_mask = true, .has_control_mask = true,
.tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K,
}; };
static const struct mwifiex_sdio_device mwifiex_sdio_sd8787 = { static const struct mwifiex_sdio_device mwifiex_sdio_sd8787 = {
...@@ -321,6 +324,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8787 = { ...@@ -321,6 +324,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8787 = {
.mp_agg_pkt_limit = 8, .mp_agg_pkt_limit = 8,
.supports_sdio_new_mode = false, .supports_sdio_new_mode = false,
.has_control_mask = true, .has_control_mask = true,
.tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K,
}; };
static const struct mwifiex_sdio_device mwifiex_sdio_sd8797 = { static const struct mwifiex_sdio_device mwifiex_sdio_sd8797 = {
...@@ -330,6 +334,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8797 = { ...@@ -330,6 +334,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8797 = {
.mp_agg_pkt_limit = 8, .mp_agg_pkt_limit = 8,
.supports_sdio_new_mode = false, .supports_sdio_new_mode = false,
.has_control_mask = true, .has_control_mask = true,
.tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K,
}; };
static const struct mwifiex_sdio_device mwifiex_sdio_sd8897 = { static const struct mwifiex_sdio_device mwifiex_sdio_sd8897 = {
...@@ -339,6 +344,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8897 = { ...@@ -339,6 +344,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8897 = {
.mp_agg_pkt_limit = 16, .mp_agg_pkt_limit = 16,
.supports_sdio_new_mode = true, .supports_sdio_new_mode = true,
.has_control_mask = false, .has_control_mask = false,
.tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_4K,
}; };
/* /*
......
...@@ -776,11 +776,13 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter) ...@@ -776,11 +776,13 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter)
switch (le16_to_cpu(card->udev->descriptor.idProduct)) { switch (le16_to_cpu(card->udev->descriptor.idProduct)) {
case USB8897_PID_1: case USB8897_PID_1:
case USB8897_PID_2: case USB8897_PID_2:
adapter->tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_4K;
strcpy(adapter->fw_name, USB8897_DEFAULT_FW_NAME); strcpy(adapter->fw_name, USB8897_DEFAULT_FW_NAME);
break; break;
case USB8797_PID_1: case USB8797_PID_1:
case USB8797_PID_2: case USB8797_PID_2:
default: default:
adapter->tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K;
strcpy(adapter->fw_name, USB8797_DEFAULT_FW_NAME); strcpy(adapter->fw_name, USB8797_DEFAULT_FW_NAME);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment