aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2014-02-27 22:35:13 -0500
committerJohn W. Linville <linville@tuxdriver.com>2014-02-28 14:33:40 -0500
commit828cf2222f05a22e51cdde4fb959d256bf31613b (patch)
tree8f58a029ce9e8af2d4b3a650d61c0ec2ae6cae35 /drivers/net/wireless/mwifiex
parentfa0ecbb9905d985a77e76801ba1153394ba593e8 (diff)
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: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex')
-rw-r--r--drivers/net/wireless/mwifiex/init.c1
-rw-r--r--drivers/net/wireless/mwifiex/pcie.c2
-rw-r--r--drivers/net/wireless/mwifiex/pcie.h3
-rw-r--r--drivers/net/wireless/mwifiex/sdio.c2
-rw-r--r--drivers/net/wireless/mwifiex/sdio.h6
-rw-r--r--drivers/net/wireless/mwifiex/usb.c2
6 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c
index 759492817aeb..4ecd0b208ac6 100644
--- a/drivers/net/wireless/mwifiex/init.c
+++ b/drivers/net/wireless/mwifiex/init.c
@@ -234,7 +234,6 @@ static void mwifiex_init_adapter(struct mwifiex_adapter *adapter)
234 234
235 adapter->pm_wakeup_fw_try = false; 235 adapter->pm_wakeup_fw_try = false;
236 236
237 adapter->tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K;
238 adapter->curr_tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K; 237 adapter->curr_tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K;
239 238
240 adapter->is_hs_configured = false; 239 adapter->is_hs_configured = false;
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c
index d11d4acf0890..92c31b5c269c 100644
--- a/drivers/net/wireless/mwifiex/pcie.c
+++ b/drivers/net/wireless/mwifiex/pcie.c
@@ -190,6 +190,7 @@ static int mwifiex_pcie_probe(struct pci_dev *pdev,
190 card->pcie.firmware = data->firmware; 190 card->pcie.firmware = data->firmware;
191 card->pcie.reg = data->reg; 191 card->pcie.reg = data->reg;
192 card->pcie.blksz_fw_dl = data->blksz_fw_dl; 192 card->pcie.blksz_fw_dl = data->blksz_fw_dl;
193 card->pcie.tx_buf_size = data->tx_buf_size;
193 } 194 }
194 195
195 if (mwifiex_add_card(card, &add_remove_card_sem, &pcie_ops, 196 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 } 2321 }
2321 2322
2322 adapter->dev = &pdev->dev; 2323 adapter->dev = &pdev->dev;
2324 adapter->tx_buf_size = card->pcie.tx_buf_size;
2323 strcpy(adapter->fw_name, card->pcie.firmware); 2325 strcpy(adapter->fw_name, card->pcie.firmware);
2324 2326
2325 return 0; 2327 return 0;
diff --git a/drivers/net/wireless/mwifiex/pcie.h b/drivers/net/wireless/mwifiex/pcie.h
index d322ab8604ea..193af75bf582 100644
--- a/drivers/net/wireless/mwifiex/pcie.h
+++ b/drivers/net/wireless/mwifiex/pcie.h
@@ -195,18 +195,21 @@ struct mwifiex_pcie_device {
195 const char *firmware; 195 const char *firmware;
196 const struct mwifiex_pcie_card_reg *reg; 196 const struct mwifiex_pcie_card_reg *reg;
197 u16 blksz_fw_dl; 197 u16 blksz_fw_dl;
198 u16 tx_buf_size;
198}; 199};
199 200
200static const struct mwifiex_pcie_device mwifiex_pcie8766 = { 201static const struct mwifiex_pcie_device mwifiex_pcie8766 = {
201 .firmware = PCIE8766_DEFAULT_FW_NAME, 202 .firmware = PCIE8766_DEFAULT_FW_NAME,
202 .reg = &mwifiex_reg_8766, 203 .reg = &mwifiex_reg_8766,
203 .blksz_fw_dl = MWIFIEX_PCIE_BLOCK_SIZE_FW_DNLD, 204 .blksz_fw_dl = MWIFIEX_PCIE_BLOCK_SIZE_FW_DNLD,
205 .tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K,
204}; 206};
205 207
206static const struct mwifiex_pcie_device mwifiex_pcie8897 = { 208static const struct mwifiex_pcie_device mwifiex_pcie8897 = {
207 .firmware = PCIE8897_DEFAULT_FW_NAME, 209 .firmware = PCIE8897_DEFAULT_FW_NAME,
208 .reg = &mwifiex_reg_8897, 210 .reg = &mwifiex_reg_8897,
209 .blksz_fw_dl = MWIFIEX_PCIE_BLOCK_SIZE_FW_DNLD, 211 .blksz_fw_dl = MWIFIEX_PCIE_BLOCK_SIZE_FW_DNLD,
212 .tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_4K,
210}; 213};
211 214
212struct mwifiex_evt_buf_desc { 215struct mwifiex_evt_buf_desc {
diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
index b44a31523461..d5661a6209be 100644
--- a/drivers/net/wireless/mwifiex/sdio.c
+++ b/drivers/net/wireless/mwifiex/sdio.c
@@ -84,6 +84,7 @@ mwifiex_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id)
84 card->mp_agg_pkt_limit = data->mp_agg_pkt_limit; 84 card->mp_agg_pkt_limit = data->mp_agg_pkt_limit;
85 card->supports_sdio_new_mode = data->supports_sdio_new_mode; 85 card->supports_sdio_new_mode = data->supports_sdio_new_mode;
86 card->has_control_mask = data->has_control_mask; 86 card->has_control_mask = data->has_control_mask;
87 card->tx_buf_size = data->tx_buf_size;
87 } 88 }
88 89
89 sdio_claim_host(func); 90 sdio_claim_host(func);
@@ -1760,6 +1761,7 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter)
1760 1761
1761 /* save adapter pointer in card */ 1762 /* save adapter pointer in card */
1762 card->adapter = adapter; 1763 card->adapter = adapter;
1764 adapter->tx_buf_size = card->tx_buf_size;
1763 1765
1764 sdio_claim_host(func); 1766 sdio_claim_host(func);
1765 1767
diff --git a/drivers/net/wireless/mwifiex/sdio.h b/drivers/net/wireless/mwifiex/sdio.h
index 532ae0ac4dfb..c71201b2e2a3 100644
--- a/drivers/net/wireless/mwifiex/sdio.h
+++ b/drivers/net/wireless/mwifiex/sdio.h
@@ -233,6 +233,7 @@ struct sdio_mmc_card {
233 u8 mp_agg_pkt_limit; 233 u8 mp_agg_pkt_limit;
234 bool supports_sdio_new_mode; 234 bool supports_sdio_new_mode;
235 bool has_control_mask; 235 bool has_control_mask;
236 u16 tx_buf_size;
236 237
237 u32 mp_rd_bitmap; 238 u32 mp_rd_bitmap;
238 u32 mp_wr_bitmap; 239 u32 mp_wr_bitmap;
@@ -256,6 +257,7 @@ struct mwifiex_sdio_device {
256 u8 mp_agg_pkt_limit; 257 u8 mp_agg_pkt_limit;
257 bool supports_sdio_new_mode; 258 bool supports_sdio_new_mode;
258 bool has_control_mask; 259 bool has_control_mask;
260 u16 tx_buf_size;
259}; 261};
260 262
261static const struct mwifiex_sdio_card_reg mwifiex_reg_sd87xx = { 263static const struct mwifiex_sdio_card_reg mwifiex_reg_sd87xx = {
@@ -312,6 +314,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8786 = {
312 .mp_agg_pkt_limit = 8, 314 .mp_agg_pkt_limit = 8,
313 .supports_sdio_new_mode = false, 315 .supports_sdio_new_mode = false,
314 .has_control_mask = true, 316 .has_control_mask = true,
317 .tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K,
315}; 318};
316 319
317static const struct mwifiex_sdio_device mwifiex_sdio_sd8787 = { 320static const struct mwifiex_sdio_device mwifiex_sdio_sd8787 = {
@@ -321,6 +324,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8787 = {
321 .mp_agg_pkt_limit = 8, 324 .mp_agg_pkt_limit = 8,
322 .supports_sdio_new_mode = false, 325 .supports_sdio_new_mode = false,
323 .has_control_mask = true, 326 .has_control_mask = true,
327 .tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K,
324}; 328};
325 329
326static const struct mwifiex_sdio_device mwifiex_sdio_sd8797 = { 330static const struct mwifiex_sdio_device mwifiex_sdio_sd8797 = {
@@ -330,6 +334,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8797 = {
330 .mp_agg_pkt_limit = 8, 334 .mp_agg_pkt_limit = 8,
331 .supports_sdio_new_mode = false, 335 .supports_sdio_new_mode = false,
332 .has_control_mask = true, 336 .has_control_mask = true,
337 .tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K,
333}; 338};
334 339
335static const struct mwifiex_sdio_device mwifiex_sdio_sd8897 = { 340static const struct mwifiex_sdio_device mwifiex_sdio_sd8897 = {
@@ -339,6 +344,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8897 = {
339 .mp_agg_pkt_limit = 16, 344 .mp_agg_pkt_limit = 16,
340 .supports_sdio_new_mode = true, 345 .supports_sdio_new_mode = true,
341 .has_control_mask = false, 346 .has_control_mask = false,
347 .tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_4K,
342}; 348};
343 349
344/* 350/*
diff --git a/drivers/net/wireless/mwifiex/usb.c b/drivers/net/wireless/mwifiex/usb.c
index e8ebbd4bc3cd..21d1316adaa0 100644
--- a/drivers/net/wireless/mwifiex/usb.c
+++ b/drivers/net/wireless/mwifiex/usb.c
@@ -776,11 +776,13 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter)
776 switch (le16_to_cpu(card->udev->descriptor.idProduct)) { 776 switch (le16_to_cpu(card->udev->descriptor.idProduct)) {
777 case USB8897_PID_1: 777 case USB8897_PID_1:
778 case USB8897_PID_2: 778 case USB8897_PID_2:
779 adapter->tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_4K;
779 strcpy(adapter->fw_name, USB8897_DEFAULT_FW_NAME); 780 strcpy(adapter->fw_name, USB8897_DEFAULT_FW_NAME);
780 break; 781 break;
781 case USB8797_PID_1: 782 case USB8797_PID_1:
782 case USB8797_PID_2: 783 case USB8797_PID_2:
783 default: 784 default:
785 adapter->tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K;
784 strcpy(adapter->fw_name, USB8797_DEFAULT_FW_NAME); 786 strcpy(adapter->fw_name, USB8797_DEFAULT_FW_NAME);
785 break; 787 break;
786 } 788 }