diff options
Diffstat (limited to 'drivers/net/wireless/cw1200')
-rw-r--r-- | drivers/net/wireless/cw1200/cw1200_sdio.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/cw1200/fwio.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/cw1200/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/cw1200/pm.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/cw1200/scan.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/cw1200/sta.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/cw1200/txrx.c | 3 |
7 files changed, 20 insertions, 21 deletions
diff --git a/drivers/net/wireless/cw1200/cw1200_sdio.c b/drivers/net/wireless/cw1200/cw1200_sdio.c index ebdcdf44f155..d3acc85932a5 100644 --- a/drivers/net/wireless/cw1200/cw1200_sdio.c +++ b/drivers/net/wireless/cw1200/cw1200_sdio.c @@ -108,9 +108,9 @@ static irqreturn_t cw1200_gpio_irq(int irq, void *dev_id) struct hwbus_priv *self = dev_id; if (self->core) { - sdio_claim_host(self->func); + cw1200_sdio_lock(self); cw1200_irq_handler(self->core); - sdio_release_host(self->func); + cw1200_sdio_unlock(self); return IRQ_HANDLED; } else { return IRQ_NONE; diff --git a/drivers/net/wireless/cw1200/fwio.c b/drivers/net/wireless/cw1200/fwio.c index acdff0f7f952..5a9ffd3a6a6c 100644 --- a/drivers/net/wireless/cw1200/fwio.c +++ b/drivers/net/wireless/cw1200/fwio.c @@ -14,7 +14,6 @@ * published by the Free Software Foundation. */ -#include <linux/init.h> #include <linux/vmalloc.h> #include <linux/sched.h> #include <linux/firmware.h> diff --git a/drivers/net/wireless/cw1200/main.c b/drivers/net/wireless/cw1200/main.c index 090f01577dd2..3e78cc3ccb78 100644 --- a/drivers/net/wireless/cw1200/main.c +++ b/drivers/net/wireless/cw1200/main.c @@ -21,7 +21,6 @@ */ #include <linux/module.h> -#include <linux/init.h> #include <linux/firmware.h> #include <linux/etherdevice.h> #include <linux/vmalloc.h> @@ -302,7 +301,6 @@ static struct ieee80211_hw *cw1200_init_common(const u8 *macaddr, hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD; - hw->channel_change_time = 1000; /* TODO: find actual value */ hw->queues = 4; priv->rts_threshold = -1; diff --git a/drivers/net/wireless/cw1200/pm.c b/drivers/net/wireless/cw1200/pm.c index b37abb9f0453..6907c8fd4578 100644 --- a/drivers/net/wireless/cw1200/pm.c +++ b/drivers/net/wireless/cw1200/pm.c @@ -225,7 +225,7 @@ int cw1200_wow_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) cw1200_set_pm(priv, &priv->powersave_mode); if (wait_event_interruptible_timeout(priv->ps_mode_switch_done, !priv->ps_mode_switch_in_progress, 1*HZ) <= 0) { - goto revert3; + goto revert4; } } @@ -254,11 +254,11 @@ int cw1200_wow_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) /* Stop serving thread */ if (cw1200_bh_suspend(priv)) - goto revert4; + goto revert5; ret = timer_pending(&priv->mcast_timeout); if (ret) - goto revert5; + goto revert6; /* Store suspend state */ pm_state->suspend_state = state; @@ -280,9 +280,9 @@ int cw1200_wow_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) return 0; -revert5: +revert6: WARN_ON(cw1200_bh_resume(priv)); -revert4: +revert5: cw1200_resume_work(priv, &priv->bss_loss_work, state->bss_loss_tmo); cw1200_resume_work(priv, &priv->join_timeout, @@ -291,6 +291,7 @@ revert4: state->direct_probe); cw1200_resume_work(priv, &priv->link_id_gc_work, state->link_id_gc); +revert4: kfree(state); revert3: wsm_set_udp_port_filter(priv, &cw1200_udp_port_filter_off); diff --git a/drivers/net/wireless/cw1200/scan.c b/drivers/net/wireless/cw1200/scan.c index ee3c19037aac..9afcd4ce3368 100644 --- a/drivers/net/wireless/cw1200/scan.c +++ b/drivers/net/wireless/cw1200/scan.c @@ -173,8 +173,9 @@ void cw1200_scan_work(struct work_struct *work) cw1200_set_pm(priv, &priv->powersave_mode); if (priv->scan.status < 0) - wiphy_dbg(priv->hw->wiphy, "[SCAN] Scan failed (%d).\n", - priv->scan.status); + wiphy_warn(priv->hw->wiphy, + "[SCAN] Scan failed (%d).\n", + priv->scan.status); else if (priv->scan.req) wiphy_dbg(priv->hw->wiphy, "[SCAN] Scan completed.\n"); @@ -197,9 +198,9 @@ void cw1200_scan_work(struct work_struct *work) if ((*it)->band != first->band) break; if (((*it)->flags ^ first->flags) & - IEEE80211_CHAN_PASSIVE_SCAN) + IEEE80211_CHAN_NO_IR) break; - if (!(first->flags & IEEE80211_CHAN_PASSIVE_SCAN) && + if (!(first->flags & IEEE80211_CHAN_NO_IR) && (*it)->max_power != first->max_power) break; } @@ -210,7 +211,7 @@ void cw1200_scan_work(struct work_struct *work) else scan.max_tx_rate = WSM_TRANSMIT_RATE_1; scan.num_probes = - (first->flags & IEEE80211_CHAN_PASSIVE_SCAN) ? 0 : 2; + (first->flags & IEEE80211_CHAN_NO_IR) ? 0 : 2; scan.num_ssids = priv->scan.n_ssids; scan.ssids = &priv->scan.ssids[0]; scan.num_channels = it - priv->scan.curr; @@ -233,7 +234,7 @@ void cw1200_scan_work(struct work_struct *work) } for (i = 0; i < scan.num_channels; ++i) { scan.ch[i].number = priv->scan.curr[i]->hw_value; - if (priv->scan.curr[i]->flags & IEEE80211_CHAN_PASSIVE_SCAN) { + if (priv->scan.curr[i]->flags & IEEE80211_CHAN_NO_IR) { scan.ch[i].min_chan_time = 50; scan.ch[i].max_chan_time = 100; } else { @@ -241,7 +242,7 @@ void cw1200_scan_work(struct work_struct *work) scan.ch[i].max_chan_time = 25; } } - if (!(first->flags & IEEE80211_CHAN_PASSIVE_SCAN) && + if (!(first->flags & IEEE80211_CHAN_NO_IR) && priv->scan.output_power != first->max_power) { priv->scan.output_power = first->max_power; wsm_set_output_power(priv, diff --git a/drivers/net/wireless/cw1200/sta.c b/drivers/net/wireless/cw1200/sta.c index 010b252be584..103f7bce8932 100644 --- a/drivers/net/wireless/cw1200/sta.c +++ b/drivers/net/wireless/cw1200/sta.c @@ -13,6 +13,7 @@ #include <linux/sched.h> #include <linux/firmware.h> #include <linux/module.h> +#include <linux/etherdevice.h> #include "cw1200.h" #include "sta.h" @@ -555,8 +556,8 @@ u64 cw1200_prepare_multicast(struct ieee80211_hw *hw, pr_debug("[STA] multicast: %pM\n", ha->addr); memcpy(&priv->multicast_filter.macaddrs[count], ha->addr, ETH_ALEN); - if (memcmp(ha->addr, broadcast_ipv4, ETH_ALEN) && - memcmp(ha->addr, broadcast_ipv6, ETH_ALEN)) + if (!ether_addr_equal(ha->addr, broadcast_ipv4) && + !ether_addr_equal(ha->addr, broadcast_ipv6)) priv->has_multicast_subscription = true; count++; } diff --git a/drivers/net/wireless/cw1200/txrx.c b/drivers/net/wireless/cw1200/txrx.c index e824d4d4a18d..0bd541175ecd 100644 --- a/drivers/net/wireless/cw1200/txrx.c +++ b/drivers/net/wireless/cw1200/txrx.c @@ -1166,8 +1166,7 @@ void cw1200_rx_cb(struct cw1200_common *priv, return; } else if (ieee80211_is_beacon(frame->frame_control) && !arg->status && priv->vif && - !memcmp(ieee80211_get_SA(frame), priv->vif->bss_conf.bssid, - ETH_ALEN)) { + ether_addr_equal(ieee80211_get_SA(frame), priv->vif->bss_conf.bssid)) { const u8 *tim_ie; u8 *ies = ((struct ieee80211_mgmt *) (skb->data))->u.beacon.variable; |