summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lin <dlin@marvell.com>2015-05-12 17:18:48 +0800
committerDavid Lin <dlin@marvell.com>2015-05-12 17:18:48 +0800
commitf10bb27be0a696378db1fe76fb1577b3fee62414 (patch)
treeacde2b3580f044052984eaf933a62092b160d455
parent85cdc98457c31d27a62f3ded31f508a75a95c810 (diff)
Add code to support 88W8897.
Signed-off-by: David Lin <dlin@marvell.com>
-rwxr-xr-xbin/firmware/88W8897.binbin0 -> 133024 bytes
-rw-r--r--mwl_dev.h12
-rw-r--r--mwl_fwcmd.c6
-rw-r--r--mwl_main.c26
-rw-r--r--mwl_sysadpt.h4
5 files changed, 39 insertions, 9 deletions
diff --git a/bin/firmware/88W8897.bin b/bin/firmware/88W8897.bin
new file mode 100755
index 0000000..11fb777
--- /dev/null
+++ b/bin/firmware/88W8897.bin
Binary files differ
diff --git a/mwl_dev.h b/mwl_dev.h
index c6867f5..9157845 100644
--- a/mwl_dev.h
+++ b/mwl_dev.h
@@ -172,6 +172,12 @@
*/
enum {
+ MWL8864 = 0,
+ MWL8897,
+ MWLUNKNOWN,
+};
+
+enum {
AP_MODE_11AC = 0x10, /* generic 11ac indication mode */
AP_MODE_2_4GHZ_11AC_MIXED = 0x17,
};
@@ -189,6 +195,11 @@ enum {
IEEE_TYPE_DATA
};
+struct mwl_chip_info {
+ char *part_name;
+ char *fw_image;
+};
+
struct mwl_tx_pwr_tbl {
u8 channel;
u8 setcap;
@@ -322,6 +333,7 @@ struct mwl_ampdu_stream {
struct mwl_priv {
struct ieee80211_hw *hw;
const struct firmware *fw_ucode;
+ int chip_type;
struct device_node *dt_node;
struct device_node *pwr_node;
bool disable_2g;
diff --git a/mwl_fwcmd.c b/mwl_fwcmd.c
index 6270177..58edac1 100644
--- a/mwl_fwcmd.c
+++ b/mwl_fwcmd.c
@@ -3326,6 +3326,12 @@ static int mwl_fwcmd_set_ies(struct mwl_priv *priv, struct mwl_vif *mwl_vif)
memcpy(pcmd->ie_list_vht, mwl_vif->beacon_info.ie_vht_ptr,
pcmd->ie_list_len_vht);
+ if (priv->chip_type == MWL8897) {
+ pcmd->ie_list_len_proprietary = mwl_vif->beacon_info.ie_wmm_len;
+ memcpy(pcmd->ie_list_proprietary, mwl_vif->beacon_info.ie_wmm_ptr,
+ pcmd->ie_list_len_proprietary);
+ }
+
WLDBG_DUMP_DATA(DBG_LEVEL_2, (void *)pcmd, sizeof(*pcmd));
if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_IES)) {
diff --git a/mwl_main.c b/mwl_main.c
index 722d1c0..d856515 100644
--- a/mwl_main.c
+++ b/mwl_main.c
@@ -71,11 +71,10 @@ static irqreturn_t mwl_interrupt(int irq, void *dev_id);
/* PRIVATE VARIABLES
*/
-static char fw_image_path[FILE_PATH_LEN] = "mwlwifi/88W8864.bin";
-
-static struct pci_device_id mwl_pci_id_tbl[SYSADPT_MAX_CARDS_SUPPORT + 1] = {
- { 0x11ab, 0x2a55, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long)MWL_DEV_NAME },
- { 0, 0, 0, 0, 0, 0, 0 }
+static struct pci_device_id mwl_pci_id_tbl[] = {
+ { PCI_VDEVICE(MARVELL, 0x2a55), .driver_data = MWL8864, },
+ { PCI_VDEVICE(MARVELL, 0x2b38), .driver_data = MWL8897, },
+ { },
};
static struct pci_driver mwl_pci_driver = {
@@ -85,6 +84,17 @@ static struct pci_driver mwl_pci_driver = {
.remove = mwl_remove
};
+static struct mwl_chip_info mwl_chip_tbl[] = {
+ [MWL8864] = {
+ .part_name = "88W8864",
+ .fw_image = "mwlwifi/88W8864.bin",
+ },
+ [MWL8897] = {
+ .part_name = "88W8897",
+ .fw_image = "mwlwifi/88W8897.bin",
+ },
+};
+
static const struct ieee80211_channel mwl_channels_24[] = {
{ .band = IEEE80211_BAND_2GHZ, .center_freq = 2412, .hw_value = 1, },
{ .band = IEEE80211_BAND_2GHZ, .center_freq = 2417, .hw_value = 2, },
@@ -181,6 +191,9 @@ static int mwl_probe(struct pci_dev *pdev, const struct pci_device_id *id)
WLDBG_ENTER(DBG_LEVEL_0);
+ if (id->driver_data >= MWLUNKNOWN)
+ return -ENODEV;
+
if (!printed_version) {
WLDBG_PRINT("<<%s version %s>>", MWL_DESC, MWL_DRV_VERSION);
printed_version = true;
@@ -225,12 +238,13 @@ static int mwl_probe(struct pci_dev *pdev, const struct pci_device_id *id)
priv = hw->priv;
priv->hw = hw;
priv->pdev = pdev;
+ priv->chip_type = id->driver_data;
rc = mwl_alloc_pci_resource(priv);
if (rc)
goto err_alloc_pci_resource;
- rc = mwl_init_firmware(priv, fw_image_path);
+ rc = mwl_init_firmware(priv, mwl_chip_tbl[priv->chip_type].fw_image);
if (rc) {
WLDBG_PRINT("%s: fail to initialize firmware",
MWL_DRV_NAME);
diff --git a/mwl_sysadpt.h b/mwl_sysadpt.h
index 1d7ac67..a066931 100644
--- a/mwl_sysadpt.h
+++ b/mwl_sysadpt.h
@@ -26,8 +26,6 @@
/* CONSTANTS AND MACROS
*/
-#define SYSADPT_MAX_CARDS_SUPPORT 1
-
#define SYSADPT_MAX_NUM_CHANNELS 64
#define SYSADPT_MAX_DATA_RATES_G 14
@@ -48,7 +46,7 @@
#define SYSADPT_MAX_NUM_TX_DESC 256
-#define SYSADPT_TX_QUEUE_LIMIT 1024
+#define SYSADPT_TX_QUEUE_LIMIT 1024
#define SYSADPT_DELAY_FREE_Q_LIMIT SYSADPT_MAX_NUM_TX_DESC