Commit 1499d9fa54a41942973bfc2c4ab12ccc5f1e15de
Committed by
John W. Linville
1 parent
b53cf458ea
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
mwifiex: don't drop carrier flag over suspend
If the system suspends with mwifiex wifi powered on, and is then woken by an ICMP ping packet, the ping response is discarded by the kernel because the kernel incorrectly thinks there is no carrier. I can't see any valid reason to want to report loss of carrier here, so remove the offending code. Fixes http://dev.laptop.org/ticket/12554 Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Showing 2 changed files with 1 additions and 18 deletions Side-by-side Diff
drivers/net/wireless/mwifiex/pcie.c
... | ... | @@ -171,7 +171,7 @@ |
171 | 171 | { |
172 | 172 | struct mwifiex_adapter *adapter; |
173 | 173 | struct pcie_service_card *card; |
174 | - int hs_actived, i; | |
174 | + int hs_actived; | |
175 | 175 | |
176 | 176 | if (pdev) { |
177 | 177 | card = (struct pcie_service_card *) pci_get_drvdata(pdev); |
... | ... | @@ -191,9 +191,6 @@ |
191 | 191 | /* Indicate device suspended */ |
192 | 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 | 194 | return 0; |
198 | 195 | } |
199 | 196 | |
... | ... | @@ -209,7 +206,6 @@ |
209 | 206 | { |
210 | 207 | struct mwifiex_adapter *adapter; |
211 | 208 | struct pcie_service_card *card; |
212 | - int i; | |
213 | 209 | |
214 | 210 | if (pdev) { |
215 | 211 | card = (struct pcie_service_card *) pci_get_drvdata(pdev); |
... | ... | @@ -230,10 +226,6 @@ |
230 | 226 | } |
231 | 227 | |
232 | 228 | adapter->is_suspended = false; |
233 | - | |
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 | 229 | |
238 | 230 | mwifiex_cancel_hs(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA), |
239 | 231 | MWIFIEX_ASYNC_CMD); |
drivers/net/wireless/mwifiex/sdio.c
... | ... | @@ -161,7 +161,6 @@ |
161 | 161 | struct sdio_mmc_card *card; |
162 | 162 | struct mwifiex_adapter *adapter; |
163 | 163 | mmc_pm_flag_t pm_flag = 0; |
164 | - int i; | |
165 | 164 | int ret = 0; |
166 | 165 | |
167 | 166 | if (func) { |
... | ... | @@ -198,9 +197,6 @@ |
198 | 197 | /* Indicate device suspended */ |
199 | 198 | adapter->is_suspended = true; |
200 | 199 | |
201 | - for (i = 0; i < adapter->priv_num; i++) | |
202 | - netif_carrier_off(adapter->priv[i]->netdev); | |
203 | - | |
204 | 200 | return ret; |
205 | 201 | } |
206 | 202 | |
... | ... | @@ -220,7 +216,6 @@ |
220 | 216 | struct sdio_mmc_card *card; |
221 | 217 | struct mwifiex_adapter *adapter; |
222 | 218 | mmc_pm_flag_t pm_flag = 0; |
223 | - int i; | |
224 | 219 | |
225 | 220 | if (func) { |
226 | 221 | pm_flag = sdio_get_host_pm_caps(func); |
... | ... | @@ -242,10 +237,6 @@ |
242 | 237 | } |
243 | 238 | |
244 | 239 | adapter->is_suspended = false; |
245 | - | |
246 | - for (i = 0; i < adapter->priv_num; i++) | |
247 | - if (adapter->priv[i]->media_connected) | |
248 | - netif_carrier_on(adapter->priv[i]->netdev); | |
249 | 240 | |
250 | 241 | /* Disable Host Sleep */ |
251 | 242 | mwifiex_cancel_hs(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA), |