diff options
Diffstat (limited to 'drivers/net/wireless/mwifiex/pcie.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/pcie.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c index 4b54bcf382f3..35c79722c361 100644 --- a/drivers/net/wireless/mwifiex/pcie.c +++ b/drivers/net/wireless/mwifiex/pcie.c | |||
@@ -171,7 +171,7 @@ static int mwifiex_pcie_suspend(struct pci_dev *pdev, pm_message_t state) | |||
171 | { | 171 | { |
172 | struct mwifiex_adapter *adapter; | 172 | struct mwifiex_adapter *adapter; |
173 | struct pcie_service_card *card; | 173 | struct pcie_service_card *card; |
174 | int hs_actived, i; | 174 | int hs_actived; |
175 | 175 | ||
176 | if (pdev) { | 176 | if (pdev) { |
177 | card = (struct pcie_service_card *) pci_get_drvdata(pdev); | 177 | card = (struct pcie_service_card *) pci_get_drvdata(pdev); |
@@ -191,9 +191,6 @@ static int mwifiex_pcie_suspend(struct pci_dev *pdev, pm_message_t state) | |||
191 | /* Indicate device suspended */ | 191 | /* Indicate device suspended */ |
192 | adapter->is_suspended = true; | 192 | adapter->is_suspended = true; |
193 | 193 | ||
194 | for (i = 0; i < adapter->priv_num; i++) | ||
195 | netif_carrier_off(adapter->priv[i]->netdev); | ||
196 | |||
197 | return 0; | 194 | return 0; |
198 | } | 195 | } |
199 | 196 | ||
@@ -209,7 +206,6 @@ static int mwifiex_pcie_resume(struct pci_dev *pdev) | |||
209 | { | 206 | { |
210 | struct mwifiex_adapter *adapter; | 207 | struct mwifiex_adapter *adapter; |
211 | struct pcie_service_card *card; | 208 | struct pcie_service_card *card; |
212 | int i; | ||
213 | 209 | ||
214 | if (pdev) { | 210 | if (pdev) { |
215 | card = (struct pcie_service_card *) pci_get_drvdata(pdev); | 211 | card = (struct pcie_service_card *) pci_get_drvdata(pdev); |
@@ -231,10 +227,6 @@ static int mwifiex_pcie_resume(struct pci_dev *pdev) | |||
231 | 227 | ||
232 | adapter->is_suspended = false; | 228 | adapter->is_suspended = false; |
233 | 229 | ||
234 | for (i = 0; i < adapter->priv_num; i++) | ||
235 | if (adapter->priv[i]->media_connected) | ||
236 | netif_carrier_on(adapter->priv[i]->netdev); | ||
237 | |||
238 | mwifiex_cancel_hs(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA), | 230 | mwifiex_cancel_hs(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA), |
239 | MWIFIEX_ASYNC_CMD); | 231 | MWIFIEX_ASYNC_CMD); |
240 | 232 | ||
@@ -916,17 +908,8 @@ static int mwifiex_pcie_delete_sleep_cookie_buf(struct mwifiex_adapter *adapter) | |||
916 | static int mwifiex_clean_pcie_ring_buf(struct mwifiex_adapter *adapter) | 908 | static int mwifiex_clean_pcie_ring_buf(struct mwifiex_adapter *adapter) |
917 | { | 909 | { |
918 | struct pcie_service_card *card = adapter->card; | 910 | struct pcie_service_card *card = adapter->card; |
919 | const struct mwifiex_pcie_card_reg *reg = card->pcie.reg; | ||
920 | u32 rdptr; | ||
921 | |||
922 | /* Read the TX ring read pointer set by firmware */ | ||
923 | if (mwifiex_read_reg(adapter, reg->tx_rdptr, &rdptr)) { | ||
924 | dev_err(adapter->dev, | ||
925 | "Flush TXBD: failed to read reg->tx_rdptr\n"); | ||
926 | return -1; | ||
927 | } | ||
928 | 911 | ||
929 | if (!mwifiex_pcie_txbd_empty(card, rdptr)) { | 912 | if (!mwifiex_pcie_txbd_empty(card, card->txbd_rdptr)) { |
930 | card->txbd_flush = 1; | 913 | card->txbd_flush = 1; |
931 | /* write pointer already set at last send | 914 | /* write pointer already set at last send |
932 | * send dnld-rdy intr again, wait for completion. | 915 | * send dnld-rdy intr again, wait for completion. |