Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d930faee authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by John W. Linville
Browse files

mwifiex: add support for Marvell pcie8766 chipset



This patch supports 88W8766P chipset with a PCIe interface.

The corresponding firmware image file is located at:
"mrvl/pcie8766_uapsta.bin"

Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarRamesh Radhakrishnan <rramesh@marvell.com>
Signed-off-by: default avatarYogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: default avatarKiran Divekar <dkiran@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarFrank Huang <frankh@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ec205999
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -246,8 +246,7 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
	tx_param.next_pkt_len = 0;
	tx_param.next_pkt_len = 0;


	ret = adapter->if_ops.host_to_card(adapter, MWIFIEX_TYPE_DATA,
	ret = adapter->if_ops.host_to_card(adapter, MWIFIEX_TYPE_DATA,
					     skb_aggr->data,
					   skb_aggr, &tx_param);
					     skb_aggr->len, &tx_param);
	switch (ret) {
	switch (ret) {
	case -EBUSY:
	case -EBUSY:
		spin_lock_irqsave(&priv->wmm.ra_list_spinlock, ra_list_flags);
		spin_lock_irqsave(&priv->wmm.ra_list_spinlock, ra_list_flags);
+11 −0
Original line number Original line Diff line number Diff line
@@ -19,3 +19,14 @@ config MWIFIEX_SDIO


	  If you choose to build it as a module, it will be called
	  If you choose to build it as a module, it will be called
	  mwifiex_sdio.
	  mwifiex_sdio.

config MWIFIEX_PCIE
	tristate "Marvell WiFi-Ex Driver for PCIE 8766"
	depends on MWIFIEX && PCI
	select FW_LOADER
	---help---
	  This adds support for wireless adapters based on Marvell
	  8766 chipset with PCIe interface.

	  If you choose to build it as a module, it will be called
	  mwifiex_pcie.
+3 −0
Original line number Original line Diff line number Diff line
@@ -39,3 +39,6 @@ obj-$(CONFIG_MWIFIEX) += mwifiex.o


mwifiex_sdio-y += sdio.o
mwifiex_sdio-y += sdio.o
obj-$(CONFIG_MWIFIEX_SDIO) += mwifiex_sdio.o
obj-$(CONFIG_MWIFIEX_SDIO) += mwifiex_sdio.o

mwifiex_pcie-y += pcie.o
obj-$(CONFIG_MWIFIEX_PCIE) += mwifiex_pcie.o
+4 −7
Original line number Original line Diff line number Diff line
@@ -94,7 +94,7 @@ mwifiex_clean_cmd_node(struct mwifiex_adapter *adapter,
		skb_trim(cmd_node->cmd_skb, 0);
		skb_trim(cmd_node->cmd_skb, 0);


	if (cmd_node->resp_skb) {
	if (cmd_node->resp_skb) {
		dev_kfree_skb_any(cmd_node->resp_skb);
		adapter->if_ops.cmdrsp_complete(adapter, cmd_node->resp_skb);
		cmd_node->resp_skb = NULL;
		cmd_node->resp_skb = NULL;
	}
	}
}
}
@@ -176,8 +176,7 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv,
	skb_push(cmd_node->cmd_skb, INTF_HEADER_LEN);
	skb_push(cmd_node->cmd_skb, INTF_HEADER_LEN);


	ret = adapter->if_ops.host_to_card(adapter, MWIFIEX_TYPE_CMD,
	ret = adapter->if_ops.host_to_card(adapter, MWIFIEX_TYPE_CMD,
					     cmd_node->cmd_skb->data,
					   cmd_node->cmd_skb, NULL);
					     cmd_node->cmd_skb->len, NULL);


	skb_pull(cmd_node->cmd_skb, INTF_HEADER_LEN);
	skb_pull(cmd_node->cmd_skb, INTF_HEADER_LEN);


@@ -238,8 +237,7 @@ static int mwifiex_dnld_sleep_confirm_cmd(struct mwifiex_adapter *adapter)


	skb_push(adapter->sleep_cfm, INTF_HEADER_LEN);
	skb_push(adapter->sleep_cfm, INTF_HEADER_LEN);
	ret = adapter->if_ops.host_to_card(adapter, MWIFIEX_TYPE_CMD,
	ret = adapter->if_ops.host_to_card(adapter, MWIFIEX_TYPE_CMD,
					     adapter->sleep_cfm->data,
					   adapter->sleep_cfm, NULL);
					     adapter->sleep_cfm->len, NULL);
	skb_pull(adapter->sleep_cfm, INTF_HEADER_LEN);
	skb_pull(adapter->sleep_cfm, INTF_HEADER_LEN);


	if (ret == -1) {
	if (ret == -1) {
@@ -402,8 +400,7 @@ int mwifiex_process_event(struct mwifiex_adapter *adapter)


	adapter->event_cause = 0;
	adapter->event_cause = 0;
	adapter->event_skb = NULL;
	adapter->event_skb = NULL;

	adapter->if_ops.event_complete(adapter, skb);
	dev_kfree_skb_any(skb);


	return ret;
	return ret;
}
}
+28 −2
Original line number Original line Diff line number Diff line
@@ -84,7 +84,8 @@ enum KEY_TYPE_ID {


#define MAX_FIRMWARE_POLL_TRIES			100
#define MAX_FIRMWARE_POLL_TRIES			100


#define FIRMWARE_READY				0xfedc
#define FIRMWARE_READY_SDIO				0xfedc
#define FIRMWARE_READY_PCIE				0xfedcba00


enum MWIFIEX_802_11_PRIVACY_FILTER {
enum MWIFIEX_802_11_PRIVACY_FILTER {
	MWIFIEX_802_11_PRIV_FILTER_ACCEPT_ALL,
	MWIFIEX_802_11_PRIV_FILTER_ACCEPT_ALL,
@@ -221,7 +222,7 @@ enum MWIFIEX_802_11_WEP_STATUS {
#define HostCmd_CMD_802_11_HS_CFG_ENH                 0x00e5
#define HostCmd_CMD_802_11_HS_CFG_ENH                 0x00e5
#define HostCmd_CMD_CAU_REG_ACCESS                    0x00ed
#define HostCmd_CMD_CAU_REG_ACCESS                    0x00ed
#define HostCmd_CMD_SET_BSS_MODE                      0x00f7
#define HostCmd_CMD_SET_BSS_MODE                      0x00f7

#define HostCmd_CMD_PCIE_DESC_DETAILS                 0x00fa


enum ENH_PS_MODES {
enum ENH_PS_MODES {
	EN_PS = 1,
	EN_PS = 1,
@@ -1137,6 +1138,30 @@ struct host_cmd_ds_set_bss_mode {
	u8 con_type;
	u8 con_type;
} __packed;
} __packed;


struct host_cmd_ds_pcie_details {
	/* TX buffer descriptor ring address */
	u32 txbd_addr_lo;
	u32 txbd_addr_hi;
	/* TX buffer descriptor ring count */
	u32 txbd_count;

	/* RX buffer descriptor ring address */
	u32 rxbd_addr_lo;
	u32 rxbd_addr_hi;
	/* RX buffer descriptor ring count */
	u32 rxbd_count;

	/* Event buffer descriptor ring address */
	u32 evtbd_addr_lo;
	u32 evtbd_addr_hi;
	/* Event buffer descriptor ring count */
	u32 evtbd_count;

	/* Sleep cookie buffer physical address */
	u32 sleep_cookie_addr_lo;
	u32 sleep_cookie_addr_hi;
} __packed;

struct host_cmd_ds_command {
struct host_cmd_ds_command {
	__le16 command;
	__le16 command;
	__le16 size;
	__le16 size;
@@ -1184,6 +1209,7 @@ struct host_cmd_ds_command {
		struct host_cmd_ds_rf_reg_access rf_reg;
		struct host_cmd_ds_rf_reg_access rf_reg;
		struct host_cmd_ds_pmic_reg_access pmic_reg;
		struct host_cmd_ds_pmic_reg_access pmic_reg;
		struct host_cmd_ds_set_bss_mode bss_mode;
		struct host_cmd_ds_set_bss_mode bss_mode;
		struct host_cmd_ds_pcie_details pcie_host_spec;
		struct host_cmd_ds_802_11_eeprom_access eeprom;
		struct host_cmd_ds_802_11_eeprom_access eeprom;
	} params;
	} params;
} __packed;
} __packed;
Loading