channel.c (6ea24cf79e055f0a62a64baa8587e2254a493c7b) | channel.c (7947d3e075cde1a18e538f2dafbc850aa356ff79) |
---|---|
1/* 2 * Copyright (c) 2014 Qualcomm Atheros, Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 93 unchanged lines hidden (view full) --- 102void ath_chanctx_init(struct ath_softc *sc) 103{ 104 struct ath_chanctx *ctx; 105 struct ath_common *common = ath9k_hw_common(sc->sc_ah); 106 struct ieee80211_supported_band *sband; 107 struct ieee80211_channel *chan; 108 int i, j; 109 | 1/* 2 * Copyright (c) 2014 Qualcomm Atheros, Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 93 unchanged lines hidden (view full) --- 102void ath_chanctx_init(struct ath_softc *sc) 103{ 104 struct ath_chanctx *ctx; 105 struct ath_common *common = ath9k_hw_common(sc->sc_ah); 106 struct ieee80211_supported_band *sband; 107 struct ieee80211_channel *chan; 108 int i, j; 109 |
110 sband = &common->sbands[IEEE80211_BAND_2GHZ]; | 110 sband = &common->sbands[NL80211_BAND_2GHZ]; |
111 if (!sband->n_channels) | 111 if (!sband->n_channels) |
112 sband = &common->sbands[IEEE80211_BAND_5GHZ]; | 112 sband = &common->sbands[NL80211_BAND_5GHZ]; |
113 114 chan = &sband->channels[0]; 115 for (i = 0; i < ATH9K_NUM_CHANCTX; i++) { 116 ctx = &sc->chanctx[i]; 117 cfg80211_chandef_create(&ctx->chandef, chan, NL80211_CHAN_HT20); 118 INIT_LIST_HEAD(&ctx->vifs); 119 ctx->txpower = ATH_TXPOWER_MAX; 120 ctx->flush_timeout = HZ / 5; /* 200ms */ --- 834 unchanged lines hidden (view full) --- 955 956 ath_offchannel_next(sc); 957 ath9k_ps_restore(sc); 958} 959 960void ath_scan_complete(struct ath_softc *sc, bool abort) 961{ 962 struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 113 114 chan = &sband->channels[0]; 115 for (i = 0; i < ATH9K_NUM_CHANCTX; i++) { 116 ctx = &sc->chanctx[i]; 117 cfg80211_chandef_create(&ctx->chandef, chan, NL80211_CHAN_HT20); 118 INIT_LIST_HEAD(&ctx->vifs); 119 ctx->txpower = ATH_TXPOWER_MAX; 120 ctx->flush_timeout = HZ / 5; /* 200ms */ --- 834 unchanged lines hidden (view full) --- 955 956 ath_offchannel_next(sc); 957 ath9k_ps_restore(sc); 958} 959 960void ath_scan_complete(struct ath_softc *sc, bool abort) 961{ 962 struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
963 struct cfg80211_scan_info info = { 964 .aborted = abort, 965 }; |
|
963 964 if (abort) 965 ath_dbg(common, CHAN_CTX, "HW scan aborted\n"); 966 else 967 ath_dbg(common, CHAN_CTX, "HW scan complete\n"); 968 969 sc->offchannel.scan_req = NULL; 970 sc->offchannel.scan_vif = NULL; 971 sc->offchannel.state = ATH_OFFCHANNEL_IDLE; | 966 967 if (abort) 968 ath_dbg(common, CHAN_CTX, "HW scan aborted\n"); 969 else 970 ath_dbg(common, CHAN_CTX, "HW scan complete\n"); 971 972 sc->offchannel.scan_req = NULL; 973 sc->offchannel.scan_vif = NULL; 974 sc->offchannel.state = ATH_OFFCHANNEL_IDLE; |
972 ieee80211_scan_completed(sc->hw, abort); | 975 ieee80211_scan_completed(sc->hw, &info); |
973 clear_bit(ATH_OP_SCANNING, &common->op_flags); 974 spin_lock_bh(&sc->chan_lock); 975 if (test_bit(ATH_OP_MULTI_CHANNEL, &common->op_flags)) 976 sc->sched.force_noa_update = true; 977 spin_unlock_bh(&sc->chan_lock); 978 ath_offchannel_next(sc); 979 ath9k_ps_restore(sc); 980} --- 347 unchanged lines hidden (view full) --- 1328void ath9k_offchannel_init(struct ath_softc *sc) 1329{ 1330 struct ath_chanctx *ctx; 1331 struct ath_common *common = ath9k_hw_common(sc->sc_ah); 1332 struct ieee80211_supported_band *sband; 1333 struct ieee80211_channel *chan; 1334 int i; 1335 | 976 clear_bit(ATH_OP_SCANNING, &common->op_flags); 977 spin_lock_bh(&sc->chan_lock); 978 if (test_bit(ATH_OP_MULTI_CHANNEL, &common->op_flags)) 979 sc->sched.force_noa_update = true; 980 spin_unlock_bh(&sc->chan_lock); 981 ath_offchannel_next(sc); 982 ath9k_ps_restore(sc); 983} --- 347 unchanged lines hidden (view full) --- 1331void ath9k_offchannel_init(struct ath_softc *sc) 1332{ 1333 struct ath_chanctx *ctx; 1334 struct ath_common *common = ath9k_hw_common(sc->sc_ah); 1335 struct ieee80211_supported_band *sband; 1336 struct ieee80211_channel *chan; 1337 int i; 1338 |
1336 sband = &common->sbands[IEEE80211_BAND_2GHZ]; | 1339 sband = &common->sbands[NL80211_BAND_2GHZ]; |
1337 if (!sband->n_channels) | 1340 if (!sband->n_channels) |
1338 sband = &common->sbands[IEEE80211_BAND_5GHZ]; | 1341 sband = &common->sbands[NL80211_BAND_5GHZ]; |
1339 1340 chan = &sband->channels[0]; 1341 1342 ctx = &sc->offchannel.chan; 1343 INIT_LIST_HEAD(&ctx->vifs); 1344 ctx->txpower = ATH_TXPOWER_MAX; 1345 cfg80211_chandef_create(&ctx->chandef, chan, NL80211_CHAN_HT20); 1346 --- 301 unchanged lines hidden --- | 1342 1343 chan = &sband->channels[0]; 1344 1345 ctx = &sc->offchannel.chan; 1346 INIT_LIST_HEAD(&ctx->vifs); 1347 ctx->txpower = ATH_TXPOWER_MAX; 1348 cfg80211_chandef_create(&ctx->chandef, chan, NL80211_CHAN_HT20); 1349 --- 301 unchanged lines hidden --- |