diff options
Diffstat (limited to 'drivers/net/wireless/mwifiex')
-rw-r--r-- | drivers/net/wireless/mwifiex/init.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/main.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/pcie.c | 20 |
3 files changed, 25 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c index 39f03ce5a5b1..e00b8060aff7 100644 --- a/drivers/net/wireless/mwifiex/init.c +++ b/drivers/net/wireless/mwifiex/init.c | |||
@@ -591,6 +591,12 @@ int mwifiex_init_fw(struct mwifiex_adapter *adapter) | |||
591 | return -1; | 591 | return -1; |
592 | } | 592 | } |
593 | } | 593 | } |
594 | |||
595 | if (adapter->if_ops.init_fw_port) { | ||
596 | if (adapter->if_ops.init_fw_port(adapter)) | ||
597 | return -1; | ||
598 | } | ||
599 | |||
594 | for (i = 0; i < adapter->priv_num; i++) { | 600 | for (i = 0; i < adapter->priv_num; i++) { |
595 | if (adapter->priv[i]) { | 601 | if (adapter->priv[i]) { |
596 | ret = mwifiex_sta_init_cmd(adapter->priv[i], first_sta); | 602 | ret = mwifiex_sta_init_cmd(adapter->priv[i], first_sta); |
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h index d717c9859fb9..ef02a5bf57b1 100644 --- a/drivers/net/wireless/mwifiex/main.h +++ b/drivers/net/wireless/mwifiex/main.h | |||
@@ -599,6 +599,7 @@ struct mwifiex_if_ops { | |||
599 | int (*cmdrsp_complete) (struct mwifiex_adapter *, struct sk_buff *); | 599 | int (*cmdrsp_complete) (struct mwifiex_adapter *, struct sk_buff *); |
600 | int (*event_complete) (struct mwifiex_adapter *, struct sk_buff *); | 600 | int (*event_complete) (struct mwifiex_adapter *, struct sk_buff *); |
601 | int (*data_complete) (struct mwifiex_adapter *, struct sk_buff *); | 601 | int (*data_complete) (struct mwifiex_adapter *, struct sk_buff *); |
602 | int (*init_fw_port) (struct mwifiex_adapter *); | ||
602 | int (*dnld_fw) (struct mwifiex_adapter *, struct mwifiex_fw_image *); | 603 | int (*dnld_fw) (struct mwifiex_adapter *, struct mwifiex_fw_image *); |
603 | void (*card_reset) (struct mwifiex_adapter *); | 604 | void (*card_reset) (struct mwifiex_adapter *); |
604 | }; | 605 | }; |
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c index e4c2cfdd049c..191c6825a6b6 100644 --- a/drivers/net/wireless/mwifiex/pcie.c +++ b/drivers/net/wireless/mwifiex/pcie.c | |||
@@ -966,8 +966,23 @@ mwifiex_pcie_send_boot_cmd(struct mwifiex_adapter *adapter, struct sk_buff *skb) | |||
966 | return 0; | 966 | return 0; |
967 | } | 967 | } |
968 | 968 | ||
969 | /* | 969 | /* This function init rx port in firmware which in turn enables to receive data |
970 | * This function downloads commands to the device | 970 | * from device before transmitting any packet. |
971 | */ | ||
972 | static int mwifiex_pcie_init_fw_port(struct mwifiex_adapter *adapter) | ||
973 | { | ||
974 | struct pcie_service_card *card = adapter->card; | ||
975 | |||
976 | /* Write the RX ring read pointer in to REG_RXBD_RDPTR */ | ||
977 | if (mwifiex_write_reg(adapter, REG_RXBD_RDPTR, card->rxbd_rdptr | 0)) { | ||
978 | dev_err(adapter->dev, | ||
979 | "RECV DATA: failed to write REG_RXBD_RDPTR\n"); | ||
980 | return -1; | ||
981 | } | ||
982 | return 0; | ||
983 | } | ||
984 | |||
985 | /* This function downloads commands to the device | ||
971 | */ | 986 | */ |
972 | static int | 987 | static int |
973 | mwifiex_pcie_send_cmd(struct mwifiex_adapter *adapter, struct sk_buff *skb) | 988 | mwifiex_pcie_send_cmd(struct mwifiex_adapter *adapter, struct sk_buff *skb) |
@@ -1899,6 +1914,7 @@ static struct mwifiex_if_ops pcie_ops = { | |||
1899 | .event_complete = mwifiex_pcie_event_complete, | 1914 | .event_complete = mwifiex_pcie_event_complete, |
1900 | .update_mp_end_port = NULL, | 1915 | .update_mp_end_port = NULL, |
1901 | .cleanup_mpa_buf = NULL, | 1916 | .cleanup_mpa_buf = NULL, |
1917 | .init_fw_port = mwifiex_pcie_init_fw_port, | ||
1902 | }; | 1918 | }; |
1903 | 1919 | ||
1904 | /* | 1920 | /* |