Commit 4a7f5db1 authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by John W. Linville

mwifiex: remove support for old chipsets W0/W1

For SD8787 A0/A1 chipsets we use the default firmware image
file 'mrvl/sd8787_uapsta.bin'. So the chip rev id variable
is removed.

The global variable fw_name is moved to adapter structure
so that we can support a different interface, such as PCIe,
in future.
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 0541ac4c
...@@ -35,8 +35,6 @@ static struct mwifiex_bss_attr mwifiex_bss_sta[] = { ...@@ -35,8 +35,6 @@ static struct mwifiex_bss_attr mwifiex_bss_sta[] = {
static int drv_mode = DRV_MODE_STA; static int drv_mode = DRV_MODE_STA;
static char fw_name[32] = DEFAULT_FW_NAME;
/* Supported drv_mode table */ /* Supported drv_mode table */
static struct mwifiex_drv_mode mwifiex_drv_mode_tbl[] = { static struct mwifiex_drv_mode mwifiex_drv_mode_tbl[] = {
{ {
...@@ -384,20 +382,8 @@ static int mwifiex_init_hw_fw(struct mwifiex_adapter *adapter) ...@@ -384,20 +382,8 @@ static int mwifiex_init_hw_fw(struct mwifiex_adapter *adapter)
memset(&fw, 0, sizeof(struct mwifiex_fw_image)); memset(&fw, 0, sizeof(struct mwifiex_fw_image));
switch (adapter->revision_id) { err = request_firmware(&adapter->firmware, adapter->fw_name,
case SD8787_W0: adapter->dev);
case SD8787_W1:
strcpy(fw_name, SD8787_W1_FW_NAME);
break;
case SD8787_A0:
case SD8787_A1:
strcpy(fw_name, SD8787_AX_FW_NAME);
break;
default:
break;
}
err = request_firmware(&adapter->firmware, fw_name, adapter->dev);
if (err < 0) { if (err < 0) {
dev_err(adapter->dev, "request_firmware() returned" dev_err(adapter->dev, "request_firmware() returned"
" error code %#x\n", err); " error code %#x\n", err);
......
...@@ -48,15 +48,6 @@ enum { ...@@ -48,15 +48,6 @@ enum {
#define DRV_MODE_STA 0x1 #define DRV_MODE_STA 0x1
#define SD8787_W0 0x30
#define SD8787_W1 0x31
#define SD8787_A0 0x40
#define SD8787_A1 0x41
#define DEFAULT_FW_NAME "mrvl/sd8787_uapsta.bin"
#define SD8787_W1_FW_NAME "mrvl/sd8787_uapsta_w1.bin"
#define SD8787_AX_FW_NAME "mrvl/sd8787_uapsta.bin"
struct mwifiex_drv_mode { struct mwifiex_drv_mode {
u16 drv_mode; u16 drv_mode;
u16 intf_num; u16 intf_num;
...@@ -576,10 +567,10 @@ struct mwifiex_adapter { ...@@ -576,10 +567,10 @@ struct mwifiex_adapter {
u8 priv_num; u8 priv_num;
struct mwifiex_drv_mode *drv_mode; struct mwifiex_drv_mode *drv_mode;
const struct firmware *firmware; const struct firmware *firmware;
char fw_name[32];
struct device *dev; struct device *dev;
bool surprise_removed; bool surprise_removed;
u32 fw_release_number; u32 fw_release_number;
u32 revision_id;
u16 init_wait_q_woken; u16 init_wait_q_woken;
wait_queue_head_t init_wait_q; wait_queue_head_t init_wait_q;
void *card; void *card;
......
...@@ -1531,6 +1531,7 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter) ...@@ -1531,6 +1531,7 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter)
sdio_set_drvdata(func, card); sdio_set_drvdata(func, card);
adapter->dev = &func->dev; adapter->dev = &func->dev;
strcpy(adapter->fw_name, SD8787_DEFAULT_FW_NAME);
return 0; return 0;
...@@ -1552,7 +1553,6 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter) ...@@ -1552,7 +1553,6 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter)
* the first interrupt got from bootloader * the first interrupt got from bootloader
* - Disable host interrupt mask register * - Disable host interrupt mask register
* - Get SDIO port * - Get SDIO port
* - Get revision ID
* - Initialize SDIO variables in card * - Initialize SDIO variables in card
* - Allocate MP registers * - Allocate MP registers
* - Allocate MPA Tx and Rx buffers * - Allocate MPA Tx and Rx buffers
...@@ -1576,10 +1576,6 @@ static int mwifiex_init_sdio(struct mwifiex_adapter *adapter) ...@@ -1576,10 +1576,6 @@ static int mwifiex_init_sdio(struct mwifiex_adapter *adapter)
/* Get SDIO ioport */ /* Get SDIO ioport */
mwifiex_init_sdio_ioport(adapter); mwifiex_init_sdio_ioport(adapter);
/* Get revision ID */
#define REV_ID_REG 0x5c
mwifiex_read_reg(adapter, REV_ID_REG, &adapter->revision_id);
/* Initialize SDIO variables in card */ /* Initialize SDIO variables in card */
card->mp_rd_bitmap = 0; card->mp_rd_bitmap = 0;
card->mp_wr_bitmap = 0; card->mp_wr_bitmap = 0;
...@@ -1751,4 +1747,4 @@ MODULE_AUTHOR("Marvell International Ltd."); ...@@ -1751,4 +1747,4 @@ MODULE_AUTHOR("Marvell International Ltd.");
MODULE_DESCRIPTION("Marvell WiFi-Ex SDIO Driver version " SDIO_VERSION); MODULE_DESCRIPTION("Marvell WiFi-Ex SDIO Driver version " SDIO_VERSION);
MODULE_VERSION(SDIO_VERSION); MODULE_VERSION(SDIO_VERSION);
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
MODULE_FIRMWARE("sd8787.bin"); MODULE_FIRMWARE("mrvl/sd8787_uapsta.bin");
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include "main.h" #include "main.h"
#define SD8787_DEFAULT_FW_NAME "mrvl/sd8787_uapsta.bin"
#define BLOCK_MODE 1 #define BLOCK_MODE 1
#define BYTE_MODE 0 #define BYTE_MODE 0
......
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