Skip to content

Commit

Permalink
Merge tag 'mac80211-next-for-davem-2016-07-06' of git://git.kernel.or…
Browse files Browse the repository at this point in the history
…g/pub/scm/linux/kernel/git/jberg/mac80211-next

Johannes Berg says:

====================
One more set of new features:
 * beacon report (for radio measurement) support in cfg80211/mac80211
 * hwsim: allow wmediumd in namespaces
 * mac80211: extend 160MHz workaround to CSA IEs
 * mesh: properly encrypt group-addressed privacy action frames
 * mesh: allow setting peer AID
 * first steps for MU-MIMO monitor mode
 * along with various other cleanups and improvements
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jul 7, 2016
2 parents fcf752a + 7d27a0b commit a90a6e5
Show file tree
Hide file tree
Showing 46 changed files with 744 additions and 205 deletions.
14 changes: 9 additions & 5 deletions drivers/net/wireless/ath/ath10k/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -3858,12 +3858,16 @@ void __ath10k_scan_finish(struct ath10k *ar)
break;
case ATH10K_SCAN_RUNNING:
case ATH10K_SCAN_ABORTING:
if (!ar->scan.is_roc)
ieee80211_scan_completed(ar->hw,
(ar->scan.state ==
ATH10K_SCAN_ABORTING));
else if (ar->scan.roc_notify)
if (!ar->scan.is_roc) {
struct cfg80211_scan_info info = {
.aborted = (ar->scan.state ==
ATH10K_SCAN_ABORTING),
};

ieee80211_scan_completed(ar->hw, &info);
} else if (ar->scan.roc_notify) {
ieee80211_remain_on_channel_expired(ar->hw);
}
/* fall through */
case ATH10K_SCAN_STARTING:
ar->scan.state = ATH10K_SCAN_IDLE;
Expand Down
17 changes: 14 additions & 3 deletions drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,11 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl_vif *vif, u8 reason,
struct ath6kl *ar = vif->ar;

if (vif->scan_req) {
cfg80211_scan_done(vif->scan_req, true);
struct cfg80211_scan_info info = {
.aborted = true,
};

cfg80211_scan_done(vif->scan_req, &info);
vif->scan_req = NULL;
}

Expand Down Expand Up @@ -1069,6 +1073,9 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy,
void ath6kl_cfg80211_scan_complete_event(struct ath6kl_vif *vif, bool aborted)
{
struct ath6kl *ar = vif->ar;
struct cfg80211_scan_info info = {
.aborted = aborted,
};
int i;

ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: status%s\n", __func__,
Expand All @@ -1089,7 +1096,7 @@ void ath6kl_cfg80211_scan_complete_event(struct ath6kl_vif *vif, bool aborted)
}

out:
cfg80211_scan_done(vif->scan_req, aborted);
cfg80211_scan_done(vif->scan_req, &info);
vif->scan_req = NULL;
}

Expand Down Expand Up @@ -3614,7 +3621,11 @@ void ath6kl_cfg80211_vif_stop(struct ath6kl_vif *vif, bool wmi_ready)
}

if (vif->scan_req) {
cfg80211_scan_done(vif->scan_req, true);
struct cfg80211_scan_info info = {
.aborted = true,
};

cfg80211_scan_done(vif->scan_req, &info);
vif->scan_req = NULL;
}

Expand Down
5 changes: 4 additions & 1 deletion drivers/net/wireless/ath/ath9k/channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,9 @@ void ath_roc_complete(struct ath_softc *sc, enum ath_roc_complete_reason reason)
void ath_scan_complete(struct ath_softc *sc, bool abort)
{
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
struct cfg80211_scan_info info = {
.aborted = abort,
};

if (abort)
ath_dbg(common, CHAN_CTX, "HW scan aborted\n");
Expand All @@ -969,7 +972,7 @@ void ath_scan_complete(struct ath_softc *sc, bool abort)
sc->offchannel.scan_req = NULL;
sc->offchannel.scan_vif = NULL;
sc->offchannel.state = ATH_OFFCHANNEL_IDLE;
ieee80211_scan_completed(sc->hw, abort);
ieee80211_scan_completed(sc->hw, &info);
clear_bit(ATH_OP_SCANNING, &common->op_flags);
spin_lock_bh(&sc->chan_lock);
if (test_bit(ATH_OP_MULTI_CHANNEL, &common->op_flags))
Expand Down
6 changes: 5 additions & 1 deletion drivers/net/wireless/ath/wil6210/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,11 @@ static void wil_cfg80211_stop_p2p_device(struct wiphy *wiphy,
mutex_lock(&wil->mutex);
started = wil_p2p_stop_discovery(wil);
if (started && wil->scan_request) {
cfg80211_scan_done(wil->scan_request, 1);
struct cfg80211_scan_info info = {
.aborted = true,
};

cfg80211_scan_done(wil->scan_request, &info);
wil->scan_request = NULL;
wil->radio_wdev = wil->wdev;
}
Expand Down
12 changes: 10 additions & 2 deletions drivers/net/wireless/ath/wil6210/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,10 +850,14 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw)
mutex_unlock(&wil->wmi_mutex);

if (wil->scan_request) {
struct cfg80211_scan_info info = {
.aborted = true,
};

wil_dbg_misc(wil, "Abort scan_request 0x%p\n",
wil->scan_request);
del_timer_sync(&wil->scan_timer);
cfg80211_scan_done(wil->scan_request, true);
cfg80211_scan_done(wil->scan_request, &info);
wil->scan_request = NULL;
}

Expand Down Expand Up @@ -1049,10 +1053,14 @@ int __wil_down(struct wil6210_priv *wil)
(void)wil_p2p_stop_discovery(wil);

if (wil->scan_request) {
struct cfg80211_scan_info info = {
.aborted = true,
};

wil_dbg_misc(wil, "Abort scan_request 0x%p\n",
wil->scan_request);
del_timer_sync(&wil->scan_timer);
cfg80211_scan_done(wil->scan_request, true);
cfg80211_scan_done(wil->scan_request, &info);
wil->scan_request = NULL;
}

Expand Down
6 changes: 5 additions & 1 deletion drivers/net/wireless/ath/wil6210/p2p.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,12 @@ void wil_p2p_search_expired(struct work_struct *work)
mutex_unlock(&wil->mutex);

if (started) {
struct cfg80211_scan_info info = {
.aborted = false,
};

mutex_lock(&wil->p2p_wdev_mutex);
cfg80211_scan_done(wil->scan_request, 0);
cfg80211_scan_done(wil->scan_request, &info);
wil->scan_request = NULL;
wil->radio_wdev = wil->wdev;
mutex_unlock(&wil->p2p_wdev_mutex);
Expand Down
8 changes: 5 additions & 3 deletions drivers/net/wireless/ath/wil6210/wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,15 +426,17 @@ static void wmi_evt_scan_complete(struct wil6210_priv *wil, int id,
{
if (wil->scan_request) {
struct wmi_scan_complete_event *data = d;
bool aborted = (data->status != WMI_SCAN_SUCCESS);
struct cfg80211_scan_info info = {
.aborted = (data->status != WMI_SCAN_SUCCESS),
};

wil_dbg_wmi(wil, "SCAN_COMPLETE(0x%08x)\n", data->status);
wil_dbg_misc(wil, "Complete scan_request 0x%p aborted %d\n",
wil->scan_request, aborted);
wil->scan_request, info.aborted);

del_timer_sync(&wil->scan_timer);
mutex_lock(&wil->p2p_wdev_mutex);
cfg80211_scan_done(wil->scan_request, aborted);
cfg80211_scan_done(wil->scan_request, &info);
wil->radio_wdev = wil->wdev;
mutex_unlock(&wil->p2p_wdev_mutex);
wil->scan_request = NULL;
Expand Down
5 changes: 4 additions & 1 deletion drivers/net/wireless/atmel/at76c50x-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1922,6 +1922,9 @@ static void at76_dwork_hw_scan(struct work_struct *work)
{
struct at76_priv *priv = container_of(work, struct at76_priv,
dwork_hw_scan.work);
struct cfg80211_scan_info info = {
.aborted = false,
};
int ret;

if (priv->device_unplugged)
Expand All @@ -1948,7 +1951,7 @@ static void at76_dwork_hw_scan(struct work_struct *work)

mutex_unlock(&priv->mtx);

ieee80211_scan_completed(priv->hw, false);
ieee80211_scan_completed(priv->hw, &info);

ieee80211_wake_queues(priv->hw);
}
Expand Down
6 changes: 5 additions & 1 deletion drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -775,9 +775,13 @@ s32 brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg,
if (!aborted)
cfg80211_sched_scan_results(cfg_to_wiphy(cfg));
} else if (scan_request) {
struct cfg80211_scan_info info = {
.aborted = aborted,
};

brcmf_dbg(SCAN, "ESCAN Completed scan: %s\n",
aborted ? "Aborted" : "Done");
cfg80211_scan_done(scan_request, aborted);
cfg80211_scan_done(scan_request, &info);
}
if (!test_and_clear_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status))
brcmf_dbg(SCAN, "Scan complete, probably P2P scan\n");
Expand Down
6 changes: 5 additions & 1 deletion drivers/net/wireless/intel/iwlegacy/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1305,10 +1305,14 @@ il_send_scan_abort(struct il_priv *il)
static void
il_complete_scan(struct il_priv *il, bool aborted)
{
struct cfg80211_scan_info info = {
.aborted = aborted,
};

/* check if scan was requested from mac80211 */
if (il->scan_request) {
D_SCAN("Complete scan in mac80211\n");
ieee80211_scan_completed(il->hw, aborted);
ieee80211_scan_completed(il->hw, &info);
}

il->scan_vif = NULL;
Expand Down
6 changes: 5 additions & 1 deletion drivers/net/wireless/intel/iwlwifi/dvm/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,14 @@ static int iwl_send_scan_abort(struct iwl_priv *priv)

static void iwl_complete_scan(struct iwl_priv *priv, bool aborted)
{
struct cfg80211_scan_info info = {
.aborted = aborted,
};

/* check if scan was requested from mac80211 */
if (priv->scan_request) {
IWL_DEBUG_SCAN(priv, "Complete scan in mac80211\n");
ieee80211_scan_completed(priv->hw, aborted);
ieee80211_scan_completed(priv->hw, &info);
}

priv->scan_type = IWL_SCAN_NORMAL;
Expand Down
37 changes: 29 additions & 8 deletions drivers/net/wireless/intel/iwlwifi/mvm/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,13 +391,16 @@ void iwl_mvm_rx_lmac_scan_complete_notif(struct iwl_mvm *mvm,
ieee80211_sched_scan_stopped(mvm->hw);
mvm->sched_scan_pass_all = SCHED_SCAN_PASS_ALL_DISABLED;
} else if (mvm->scan_status & IWL_MVM_SCAN_REGULAR) {
struct cfg80211_scan_info info = {
.aborted = aborted,
};

IWL_DEBUG_SCAN(mvm, "Regular scan %s, EBS status %s (FW)\n",
aborted ? "aborted" : "completed",
iwl_mvm_ebs_status_str(scan_notif->ebs_status));

mvm->scan_status &= ~IWL_MVM_SCAN_REGULAR;
ieee80211_scan_completed(mvm->hw,
scan_notif->status == IWL_SCAN_OFFLOAD_ABORTED);
ieee80211_scan_completed(mvm->hw, &info);
iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN);
del_timer(&mvm->scan_timer);
} else {
Expand Down Expand Up @@ -1430,7 +1433,11 @@ void iwl_mvm_rx_umac_scan_complete_notif(struct iwl_mvm *mvm,

/* if the scan is already stopping, we don't need to notify mac80211 */
if (mvm->scan_uid_status[uid] == IWL_MVM_SCAN_REGULAR) {
ieee80211_scan_completed(mvm->hw, aborted);
struct cfg80211_scan_info info = {
.aborted = aborted,
};

ieee80211_scan_completed(mvm->hw, &info);
iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN);
del_timer(&mvm->scan_timer);
} else if (mvm->scan_uid_status[uid] == IWL_MVM_SCAN_SCHED) {
Expand Down Expand Up @@ -1564,7 +1571,11 @@ void iwl_mvm_report_scan_aborted(struct iwl_mvm *mvm)

uid = iwl_mvm_scan_uid_by_status(mvm, IWL_MVM_SCAN_REGULAR);
if (uid >= 0) {
ieee80211_scan_completed(mvm->hw, true);
struct cfg80211_scan_info info = {
.aborted = true,
};

ieee80211_scan_completed(mvm->hw, &info);
mvm->scan_uid_status[uid] = 0;
}
uid = iwl_mvm_scan_uid_by_status(mvm, IWL_MVM_SCAN_SCHED);
Expand All @@ -1585,8 +1596,13 @@ void iwl_mvm_report_scan_aborted(struct iwl_mvm *mvm)
mvm->scan_uid_status[i] = 0;
}
} else {
if (mvm->scan_status & IWL_MVM_SCAN_REGULAR)
ieee80211_scan_completed(mvm->hw, true);
if (mvm->scan_status & IWL_MVM_SCAN_REGULAR) {
struct cfg80211_scan_info info = {
.aborted = true,
};

ieee80211_scan_completed(mvm->hw, &info);
}

/* Sched scan will be restarted by mac80211 in
* restart_hw, so do not report if FW is about to be
Expand Down Expand Up @@ -1629,8 +1645,13 @@ int iwl_mvm_scan_stop(struct iwl_mvm *mvm, int type, bool notify)
*/
iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN);
del_timer(&mvm->scan_timer);
if (notify)
ieee80211_scan_completed(mvm->hw, true);
if (notify) {
struct cfg80211_scan_info info = {
.aborted = true,
};

ieee80211_scan_completed(mvm->hw, &info);
}
} else if (notify) {
ieee80211_sched_scan_stopped(mvm->hw);
mvm->sched_scan_pass_all = SCHED_SCAN_PASS_ALL_DISABLED;
Expand Down
12 changes: 10 additions & 2 deletions drivers/net/wireless/intersil/orinoco/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,23 @@ void orinoco_add_hostscan_results(struct orinoco_private *priv,

scan_abort:
if (priv->scan_request) {
cfg80211_scan_done(priv->scan_request, abort);
struct cfg80211_scan_info info = {
.aborted = abort,
};

cfg80211_scan_done(priv->scan_request, &info);
priv->scan_request = NULL;
}
}

void orinoco_scan_done(struct orinoco_private *priv, bool abort)
{
if (priv->scan_request) {
cfg80211_scan_done(priv->scan_request, abort);
struct cfg80211_scan_info info = {
.aborted = abort,
};

cfg80211_scan_done(priv->scan_request, &info);
priv->scan_request = NULL;
}
}
Loading

0 comments on commit a90a6e5

Please sign in to comment.