Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
mwifiex: don't drop carrier flag over suspend
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Drake authored and linvjw committed Feb 22, 2013
1 parent b53cf45 commit 1499d9f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
10 changes: 1 addition & 9 deletions drivers/net/wireless/mwifiex/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static int mwifiex_pcie_suspend(struct pci_dev *pdev, pm_message_t state)
{
struct mwifiex_adapter *adapter;
struct pcie_service_card *card;
int hs_actived, i;
int hs_actived;

if (pdev) {
card = (struct pcie_service_card *) pci_get_drvdata(pdev);
Expand All @@ -191,9 +191,6 @@ static int mwifiex_pcie_suspend(struct pci_dev *pdev, pm_message_t state)
/* Indicate device suspended */
adapter->is_suspended = true;

for (i = 0; i < adapter->priv_num; i++)
netif_carrier_off(adapter->priv[i]->netdev);

return 0;
}

Expand All @@ -209,7 +206,6 @@ static int mwifiex_pcie_resume(struct pci_dev *pdev)
{
struct mwifiex_adapter *adapter;
struct pcie_service_card *card;
int i;

if (pdev) {
card = (struct pcie_service_card *) pci_get_drvdata(pdev);
Expand All @@ -231,10 +227,6 @@ static int mwifiex_pcie_resume(struct pci_dev *pdev)

adapter->is_suspended = false;

for (i = 0; i < adapter->priv_num; i++)
if (adapter->priv[i]->media_connected)
netif_carrier_on(adapter->priv[i]->netdev);

mwifiex_cancel_hs(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA),
MWIFIEX_ASYNC_CMD);

Expand Down
9 changes: 0 additions & 9 deletions drivers/net/wireless/mwifiex/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ static int mwifiex_sdio_suspend(struct device *dev)
struct sdio_mmc_card *card;
struct mwifiex_adapter *adapter;
mmc_pm_flag_t pm_flag = 0;
int i;
int ret = 0;

if (func) {
Expand Down Expand Up @@ -198,9 +197,6 @@ static int mwifiex_sdio_suspend(struct device *dev)
/* Indicate device suspended */
adapter->is_suspended = true;

for (i = 0; i < adapter->priv_num; i++)
netif_carrier_off(adapter->priv[i]->netdev);

return ret;
}

Expand All @@ -220,7 +216,6 @@ static int mwifiex_sdio_resume(struct device *dev)
struct sdio_mmc_card *card;
struct mwifiex_adapter *adapter;
mmc_pm_flag_t pm_flag = 0;
int i;

if (func) {
pm_flag = sdio_get_host_pm_caps(func);
Expand All @@ -243,10 +238,6 @@ static int mwifiex_sdio_resume(struct device *dev)

adapter->is_suspended = false;

for (i = 0; i < adapter->priv_num; i++)
if (adapter->priv[i]->media_connected)
netif_carrier_on(adapter->priv[i]->netdev);

/* Disable Host Sleep */
mwifiex_cancel_hs(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA),
MWIFIEX_ASYNC_CMD);
Expand Down

0 comments on commit 1499d9f

Please sign in to comment.