aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-02-25 14:50:31 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-02-25 14:50:31 -0500
commit6d6436fbcbc43febe2481d3488f3bb5271ec2eb0 (patch)
tree33d0526e5632b137a3d3d9134acb40cc06facaf6 /drivers
parentea5cdccc46d392b73d941c723630d37094e8e8ea (diff)
parentdc4a787c8f52f9d6e46156953f8014a3353bcbc7 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c4
-rw-r--r--drivers/net/wireless/mwifiex/pcie.c21
-rw-r--r--drivers/net/wireless/mwifiex/sdio.c9
3 files changed, 5 insertions, 29 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index cecc3eff72e9..2af9c0f0798d 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -4615,8 +4615,10 @@ static s32 brcmf_notify_vif_event(struct brcmf_if *ifp,
4615 switch (ifevent->action) { 4615 switch (ifevent->action) {
4616 case BRCMF_E_IF_ADD: 4616 case BRCMF_E_IF_ADD:
4617 /* waiting process may have timed out */ 4617 /* waiting process may have timed out */
4618 if (!cfg->vif_event.vif) 4618 if (!cfg->vif_event.vif) {
4619 mutex_unlock(&event->vif_event_lock);
4619 return -EBADF; 4620 return -EBADF;
4621 }
4620 4622
4621 ifp->vif = vif; 4623 ifp->vif = vif;
4622 vif->ifp = ifp; 4624 vif->ifp = ifp;
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)
916static int mwifiex_clean_pcie_ring_buf(struct mwifiex_adapter *adapter) 908static 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.
diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
index e63f646a260e..363ba31b58bf 100644
--- a/drivers/net/wireless/mwifiex/sdio.c
+++ b/drivers/net/wireless/mwifiex/sdio.c
@@ -161,7 +161,6 @@ static int mwifiex_sdio_suspend(struct device *dev)
161 struct sdio_mmc_card *card; 161 struct sdio_mmc_card *card;
162 struct mwifiex_adapter *adapter; 162 struct mwifiex_adapter *adapter;
163 mmc_pm_flag_t pm_flag = 0; 163 mmc_pm_flag_t pm_flag = 0;
164 int i;
165 int ret = 0; 164 int ret = 0;
166 165
167 if (func) { 166 if (func) {
@@ -198,9 +197,6 @@ static int mwifiex_sdio_suspend(struct device *dev)
198 /* Indicate device suspended */ 197 /* Indicate device suspended */
199 adapter->is_suspended = true; 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 return ret; 200 return ret;
205} 201}
206 202
@@ -220,7 +216,6 @@ static int mwifiex_sdio_resume(struct device *dev)
220 struct sdio_mmc_card *card; 216 struct sdio_mmc_card *card;
221 struct mwifiex_adapter *adapter; 217 struct mwifiex_adapter *adapter;
222 mmc_pm_flag_t pm_flag = 0; 218 mmc_pm_flag_t pm_flag = 0;
223 int i;
224 219
225 if (func) { 220 if (func) {
226 pm_flag = sdio_get_host_pm_caps(func); 221 pm_flag = sdio_get_host_pm_caps(func);
@@ -243,10 +238,6 @@ static int mwifiex_sdio_resume(struct device *dev)
243 238
244 adapter->is_suspended = false; 239 adapter->is_suspended = false;
245 240
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
250 /* Disable Host Sleep */ 241 /* Disable Host Sleep */
251 mwifiex_cancel_hs(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA), 242 mwifiex_cancel_hs(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA),
252 MWIFIEX_ASYNC_CMD); 243 MWIFIEX_ASYNC_CMD);