diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 567fb5170d1b..54e3e41a591c 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1337,10 +1337,10 @@ static void ath9k_disable_ps(struct ath_softc *sc) | |||
1337 | ath_dbg(common, PS, "PowerSave disabled\n"); | 1337 | ath_dbg(common, PS, "PowerSave disabled\n"); |
1338 | } | 1338 | } |
1339 | 1339 | ||
1340 | void ath9k_spectral_scan_trigger(struct ath_common *common) | 1340 | void ath9k_spectral_scan_trigger(struct ath_common *common, |
1341 | struct ath_spec_scan_priv *spec_priv) | ||
1341 | { | 1342 | { |
1342 | struct ath_softc *sc = common->priv; | 1343 | struct ath_hw *ah = spec_priv->ah; |
1343 | struct ath_hw *ah = sc->sc_ah; | ||
1344 | u32 rxfilter; | 1344 | u32 rxfilter; |
1345 | 1345 | ||
1346 | if (config_enabled(CONFIG_ATH9K_TX99)) | 1346 | if (config_enabled(CONFIG_ATH9K_TX99)) |
@@ -1362,16 +1362,16 @@ void ath9k_spectral_scan_trigger(struct ath_common *common) | |||
1362 | * configuration, otherwise the register will have its values reset | 1362 | * configuration, otherwise the register will have its values reset |
1363 | * (on my ar9220 to value 0x01002310) | 1363 | * (on my ar9220 to value 0x01002310) |
1364 | */ | 1364 | */ |
1365 | ath9k_spectral_scan_config(common, sc->spec_priv.spectral_mode); | 1365 | ath9k_spectral_scan_config(common, spec_priv, spec_priv->spectral_mode); |
1366 | ath9k_hw_ops(ah)->spectral_scan_trigger(ah); | 1366 | ath9k_hw_ops(ah)->spectral_scan_trigger(ah); |
1367 | ath_ps_ops(common)->restore(common); | 1367 | ath_ps_ops(common)->restore(common); |
1368 | } | 1368 | } |
1369 | 1369 | ||
1370 | int ath9k_spectral_scan_config(struct ath_common *common, | 1370 | int ath9k_spectral_scan_config(struct ath_common *common, |
1371 | struct ath_spec_scan_priv *spec_priv, | ||
1371 | enum spectral_mode spectral_mode) | 1372 | enum spectral_mode spectral_mode) |
1372 | { | 1373 | { |
1373 | struct ath_softc *sc = common->priv; | 1374 | struct ath_hw *ah = spec_priv->ah; |
1374 | struct ath_hw *ah = sc->sc_ah; | ||
1375 | 1375 | ||
1376 | if (!ath9k_hw_ops(ah)->spectral_scan_trigger) { | 1376 | if (!ath9k_hw_ops(ah)->spectral_scan_trigger) { |
1377 | ath_err(common, "spectrum analyzer not implemented on this hardware\n"); | 1377 | ath_err(common, "spectrum analyzer not implemented on this hardware\n"); |
@@ -1380,29 +1380,29 @@ int ath9k_spectral_scan_config(struct ath_common *common, | |||
1380 | 1380 | ||
1381 | switch (spectral_mode) { | 1381 | switch (spectral_mode) { |
1382 | case SPECTRAL_DISABLED: | 1382 | case SPECTRAL_DISABLED: |
1383 | sc->spec_priv.spec_config.enabled = 0; | 1383 | spec_priv->spec_config.enabled = 0; |
1384 | break; | 1384 | break; |
1385 | case SPECTRAL_BACKGROUND: | 1385 | case SPECTRAL_BACKGROUND: |
1386 | /* send endless samples. | 1386 | /* send endless samples. |
1387 | * TODO: is this really useful for "background"? | 1387 | * TODO: is this really useful for "background"? |
1388 | */ | 1388 | */ |
1389 | sc->spec_priv.spec_config.endless = 1; | 1389 | spec_priv->spec_config.endless = 1; |
1390 | sc->spec_priv.spec_config.enabled = 1; | 1390 | spec_priv->spec_config.enabled = 1; |
1391 | break; | 1391 | break; |
1392 | case SPECTRAL_CHANSCAN: | 1392 | case SPECTRAL_CHANSCAN: |
1393 | case SPECTRAL_MANUAL: | 1393 | case SPECTRAL_MANUAL: |
1394 | sc->spec_priv.spec_config.endless = 0; | 1394 | spec_priv->spec_config.endless = 0; |
1395 | sc->spec_priv.spec_config.enabled = 1; | 1395 | spec_priv->spec_config.enabled = 1; |
1396 | break; | 1396 | break; |
1397 | default: | 1397 | default: |
1398 | return -1; | 1398 | return -1; |
1399 | } | 1399 | } |
1400 | 1400 | ||
1401 | ath_ps_ops(common)->wakeup(common); | 1401 | ath_ps_ops(common)->wakeup(common); |
1402 | ath9k_hw_ops(ah)->spectral_scan_config(ah, &sc->spec_priv.spec_config); | 1402 | ath9k_hw_ops(ah)->spectral_scan_config(ah, &spec_priv->spec_config); |
1403 | ath_ps_ops(common)->restore(common); | 1403 | ath_ps_ops(common)->restore(common); |
1404 | 1404 | ||
1405 | sc->spec_priv.spectral_mode = spectral_mode; | 1405 | spec_priv->spectral_mode = spectral_mode; |
1406 | 1406 | ||
1407 | return 0; | 1407 | return 0; |
1408 | } | 1408 | } |