static int brcms_ops_start(struct ieee80211_hw *hw) { struct brcms_info *wl = hw->priv; bool blocked; int err; ieee80211_wake_queues(hw); spin_lock_bh(&wl->lock); blocked = brcms_rfkill_set_hw_state(wl); spin_unlock_bh(&wl->lock); if (!blocked) wiphy_rfkill_stop_polling(wl->pub->ieee_hw->wiphy); spin_lock_bh(&wl->lock); /* avoid acknowledging frames before a non-monitor device is added */ wl->mute_tx = true; if (!wl->pub->up) err = brcms_up(wl); else err = -ENODEV; spin_unlock_bh(&wl->lock); if (err != 0) wiphy_err(hw->wiphy, "%s: brcms_up() returned %d\n", __func__, err); return err; }
static int brcms_ops_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) { struct brcms_info *wl; int err; /* Just STA for now */ if (vif->type != NL80211_IFTYPE_AP && vif->type != NL80211_IFTYPE_MESH_POINT && vif->type != NL80211_IFTYPE_STATION && vif->type != NL80211_IFTYPE_WDS && vif->type != NL80211_IFTYPE_ADHOC) { wiphy_err(hw->wiphy, "%s: Attempt to add type %d, only" " STA for now\n", __func__, vif->type); return -EOPNOTSUPP; } wl = HW_TO_WL(hw); LOCK(wl); err = brcms_up(wl); UNLOCK(wl); if (err != 0) { wiphy_err(hw->wiphy, "%s: brcms_up() returned %d\n", __func__, err); } return err; }
static int brcms_ops_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) { struct brcms_info *wl; int err; /* Just STA for now */ if (vif->type != NL80211_IFTYPE_AP && vif->type != NL80211_IFTYPE_MESH_POINT && vif->type != NL80211_IFTYPE_STATION && vif->type != NL80211_IFTYPE_WDS && vif->type != NL80211_IFTYPE_ADHOC) { wiphy_err(hw->wiphy, "%s: Attempt to add type %d, only" " STA for now\n", __func__, vif->type); return -EOPNOTSUPP; } wl = hw->priv; spin_lock_bh(&wl->lock); if (!wl->pub->up) err = brcms_up(wl); else err = -ENODEV; spin_unlock_bh(&wl->lock); if (err != 0) wiphy_err(hw->wiphy, "%s: brcms_up() returned %d\n", __func__, err); return err; }
static int brcms_ops_start(struct ieee80211_hw *hw) { struct brcms_info *wl = hw->priv; bool blocked; int err; ieee80211_wake_queues(hw); spin_lock_bh(&wl->lock); blocked = brcms_rfkill_set_hw_state(wl); spin_unlock_bh(&wl->lock); if (!blocked) wiphy_rfkill_stop_polling(wl->pub->ieee_hw->wiphy); if (!wl->ucode.bcm43xx_bomminor) { err = brcms_request_fw(wl, wl->wlc->hw->d11core); if (err) { brcms_remove(wl->wlc->hw->d11core); return -ENOENT; } } spin_lock_bh(&wl->lock); /* avoid acknowledging frames before a non-monitor device is added */ wl->mute_tx = true; if (!wl->pub->up) if (!blocked) err = brcms_up(wl); else err = -ERFKILL; else err = -ENODEV; spin_unlock_bh(&wl->lock); if (err != 0) brcms_err(wl->wlc->hw->d11core, "%s: brcms_up() returned %d\n", __func__, err); bcma_core_pci_power_save(wl->wlc->hw->d11core->bus, true); return err; }