main.c (c7dd40c92af1f28b84995a07aa88ccd3068ee4de) | main.c (499afaccf6f3d5d3180f4155e85becf15d09ff71) |
---|---|
1/* 2 * Copyright (c) 2008-2011 Atheros Communications 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 --- 254 unchanged lines hidden (view full) --- 263 ath_txq_schedule_all(sc); 264 } 265 266 sc->gtt_cnt = 0; 267 268 ath9k_hw_set_interrupts(ah); 269 ath9k_hw_enable_interrupts(ah); 270 | 1/* 2 * Copyright (c) 2008-2011 Atheros Communications 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 --- 254 unchanged lines hidden (view full) --- 263 ath_txq_schedule_all(sc); 264 } 265 266 sc->gtt_cnt = 0; 267 268 ath9k_hw_set_interrupts(ah); 269 ath9k_hw_enable_interrupts(ah); 270 |
271 if (!ath9k_use_chanctx) | 271 if (!ath9k_is_chanctx_enabled()) |
272 ieee80211_wake_queues(sc->hw); 273 else { 274 if (sc->cur_chan == &sc->offchannel.chan) 275 ieee80211_wake_queue(sc->hw, 276 sc->hw->offchannel_tx_hw_queue); 277 else { 278 for (i = 0; i < IEEE80211_NUM_ACS; i++) 279 ieee80211_wake_queue(sc->hw, --- 854 unchanged lines hidden (view full) --- 1134 1135 ath_dbg(common, CONFIG, "Attach a VIF of type: %d\n", vif->type); 1136 sc->nvifs++; 1137 1138 if (ath9k_uses_beacons(vif->type)) 1139 ath9k_beacon_assign_slot(sc, vif); 1140 1141 avp->vif = vif; | 272 ieee80211_wake_queues(sc->hw); 273 else { 274 if (sc->cur_chan == &sc->offchannel.chan) 275 ieee80211_wake_queue(sc->hw, 276 sc->hw->offchannel_tx_hw_queue); 277 else { 278 for (i = 0; i < IEEE80211_NUM_ACS; i++) 279 ieee80211_wake_queue(sc->hw, --- 854 unchanged lines hidden (view full) --- 1134 1135 ath_dbg(common, CONFIG, "Attach a VIF of type: %d\n", vif->type); 1136 sc->nvifs++; 1137 1138 if (ath9k_uses_beacons(vif->type)) 1139 ath9k_beacon_assign_slot(sc, vif); 1140 1141 avp->vif = vif; |
1142 if (!ath9k_use_chanctx) { | 1142 if (!ath9k_is_chanctx_enabled()) { |
1143 avp->chanctx = sc->cur_chan; 1144 list_add_tail(&avp->list, &avp->chanctx->vifs); 1145 } 1146 for (i = 0; i < IEEE80211_NUM_ACS; i++) 1147 vif->hw_queue[i] = i; 1148 if (vif->type == NL80211_IFTYPE_AP) 1149 vif->cab_queue = hw->queues - 2; 1150 else --- 61 unchanged lines hidden (view full) --- 1212 ath_dbg(common, CONFIG, "Detach Interface\n"); 1213 1214 mutex_lock(&sc->mutex); 1215 1216 ath9k_p2p_remove_vif(sc, vif); 1217 1218 sc->nvifs--; 1219 sc->tx99_vif = NULL; | 1143 avp->chanctx = sc->cur_chan; 1144 list_add_tail(&avp->list, &avp->chanctx->vifs); 1145 } 1146 for (i = 0; i < IEEE80211_NUM_ACS; i++) 1147 vif->hw_queue[i] = i; 1148 if (vif->type == NL80211_IFTYPE_AP) 1149 vif->cab_queue = hw->queues - 2; 1150 else --- 61 unchanged lines hidden (view full) --- 1212 ath_dbg(common, CONFIG, "Detach Interface\n"); 1213 1214 mutex_lock(&sc->mutex); 1215 1216 ath9k_p2p_remove_vif(sc, vif); 1217 1218 sc->nvifs--; 1219 sc->tx99_vif = NULL; |
1220 if (!ath9k_use_chanctx) | 1220 if (!ath9k_is_chanctx_enabled()) |
1221 list_del(&avp->list); 1222 1223 if (ath9k_uses_beacons(vif->type)) 1224 ath9k_beacon_remove_slot(sc, vif); 1225 1226 ath_tx_node_cleanup(sc, &avp->mcast_node); 1227 1228 mutex_unlock(&sc->mutex); --- 161 unchanged lines hidden (view full) --- 1390 ath_dbg(common, CONFIG, "Monitor mode is enabled\n"); 1391 sc->sc_ah->is_monitoring = true; 1392 } else { 1393 ath_dbg(common, CONFIG, "Monitor mode is disabled\n"); 1394 sc->sc_ah->is_monitoring = false; 1395 } 1396 } 1397 | 1221 list_del(&avp->list); 1222 1223 if (ath9k_uses_beacons(vif->type)) 1224 ath9k_beacon_remove_slot(sc, vif); 1225 1226 ath_tx_node_cleanup(sc, &avp->mcast_node); 1227 1228 mutex_unlock(&sc->mutex); --- 161 unchanged lines hidden (view full) --- 1390 ath_dbg(common, CONFIG, "Monitor mode is enabled\n"); 1391 sc->sc_ah->is_monitoring = true; 1392 } else { 1393 ath_dbg(common, CONFIG, "Monitor mode is disabled\n"); 1394 sc->sc_ah->is_monitoring = false; 1395 } 1396 } 1397 |
1398 if (!ath9k_use_chanctx && (changed & IEEE80211_CONF_CHANGE_CHANNEL)) { | 1398 if (!ath9k_is_chanctx_enabled() && (changed & IEEE80211_CONF_CHANGE_CHANNEL)) { |
1399 ctx->offchannel = !!(conf->flags & IEEE80211_CONF_OFFCHANNEL); 1400 ath_chanctx_set_channel(sc, ctx, &hw->conf.chandef); 1401 } 1402 1403 if (changed & IEEE80211_CONF_CHANGE_POWER) { 1404 ath_dbg(common, CONFIG, "Set power: %d\n", conf->power_level); 1405 sc->cur_chan->txpower = 2 * conf->power_level; 1406 ath9k_cmn_update_txpow(ah, sc->curtxpow, --- 696 unchanged lines hidden (view full) --- 2103 2104static void ath9k_sw_scan_complete(struct ieee80211_hw *hw) 2105{ 2106 struct ath_softc *sc = hw->priv; 2107 struct ath_common *common = ath9k_hw_common(sc->sc_ah); 2108 clear_bit(ATH_OP_SCANNING, &common->op_flags); 2109} 2110 | 1399 ctx->offchannel = !!(conf->flags & IEEE80211_CONF_OFFCHANNEL); 1400 ath_chanctx_set_channel(sc, ctx, &hw->conf.chandef); 1401 } 1402 1403 if (changed & IEEE80211_CONF_CHANGE_POWER) { 1404 ath_dbg(common, CONFIG, "Set power: %d\n", conf->power_level); 1405 sc->cur_chan->txpower = 2 * conf->power_level; 1406 ath9k_cmn_update_txpow(ah, sc->curtxpow, --- 696 unchanged lines hidden (view full) --- 2103 2104static void ath9k_sw_scan_complete(struct ieee80211_hw *hw) 2105{ 2106 struct ath_softc *sc = hw->priv; 2107 struct ath_common *common = ath9k_hw_common(sc->sc_ah); 2108 clear_bit(ATH_OP_SCANNING, &common->op_flags); 2109} 2110 |
2111#ifdef CONFIG_ATH9K_CHANNEL_CONTEXT 2112 |
|
2111static int ath9k_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 2112 struct ieee80211_scan_request *hw_req) 2113{ 2114 struct cfg80211_scan_request *req = &hw_req->req; 2115 struct ath_softc *sc = hw->priv; 2116 struct ath_common *common = ath9k_hw_common(sc->sc_ah); 2117 int ret = 0; 2118 --- 215 unchanged lines hidden (view full) --- 2334 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) 2335 vif->hw_queue[ac] = IEEE80211_INVAL_HW_QUEUE; 2336 2337 mutex_unlock(&sc->mutex); 2338} 2339 2340void ath9k_fill_chanctx_ops(void) 2341{ | 2113static int ath9k_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 2114 struct ieee80211_scan_request *hw_req) 2115{ 2116 struct cfg80211_scan_request *req = &hw_req->req; 2117 struct ath_softc *sc = hw->priv; 2118 struct ath_common *common = ath9k_hw_common(sc->sc_ah); 2119 int ret = 0; 2120 --- 215 unchanged lines hidden (view full) --- 2336 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) 2337 vif->hw_queue[ac] = IEEE80211_INVAL_HW_QUEUE; 2338 2339 mutex_unlock(&sc->mutex); 2340} 2341 2342void ath9k_fill_chanctx_ops(void) 2343{ |
2342 if (!ath9k_use_chanctx) | 2344 if (!ath9k_is_chanctx_enabled()) |
2343 return; 2344 2345 ath9k_ops.hw_scan = ath9k_hw_scan; 2346 ath9k_ops.cancel_hw_scan = ath9k_cancel_hw_scan; 2347 ath9k_ops.remain_on_channel = ath9k_remain_on_channel; 2348 ath9k_ops.cancel_remain_on_channel = ath9k_cancel_remain_on_channel; 2349 ath9k_ops.add_chanctx = ath9k_add_chanctx; 2350 ath9k_ops.remove_chanctx = ath9k_remove_chanctx; 2351 ath9k_ops.change_chanctx = ath9k_change_chanctx; 2352 ath9k_ops.assign_vif_chanctx = ath9k_assign_vif_chanctx; 2353 ath9k_ops.unassign_vif_chanctx = ath9k_unassign_vif_chanctx; 2354 ath9k_ops.mgd_prepare_tx = ath9k_chanctx_force_active; 2355} 2356 | 2345 return; 2346 2347 ath9k_ops.hw_scan = ath9k_hw_scan; 2348 ath9k_ops.cancel_hw_scan = ath9k_cancel_hw_scan; 2349 ath9k_ops.remain_on_channel = ath9k_remain_on_channel; 2350 ath9k_ops.cancel_remain_on_channel = ath9k_cancel_remain_on_channel; 2351 ath9k_ops.add_chanctx = ath9k_add_chanctx; 2352 ath9k_ops.remove_chanctx = ath9k_remove_chanctx; 2353 ath9k_ops.change_chanctx = ath9k_change_chanctx; 2354 ath9k_ops.assign_vif_chanctx = ath9k_assign_vif_chanctx; 2355 ath9k_ops.unassign_vif_chanctx = ath9k_unassign_vif_chanctx; 2356 ath9k_ops.mgd_prepare_tx = ath9k_chanctx_force_active; 2357} 2358 |
2359#endif 2360 |
|
2357struct ieee80211_ops ath9k_ops = { 2358 .tx = ath9k_tx, 2359 .start = ath9k_start, 2360 .stop = ath9k_stop, 2361 .add_interface = ath9k_add_interface, 2362 .change_interface = ath9k_change_interface, 2363 .remove_interface = ath9k_remove_interface, 2364 .config = ath9k_config, --- 40 unchanged lines hidden --- | 2361struct ieee80211_ops ath9k_ops = { 2362 .tx = ath9k_tx, 2363 .start = ath9k_start, 2364 .stop = ath9k_stop, 2365 .add_interface = ath9k_add_interface, 2366 .change_interface = ath9k_change_interface, 2367 .remove_interface = ath9k_remove_interface, 2368 .config = ath9k_config, --- 40 unchanged lines hidden --- |