aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleksij Rempel <linux@rempel-privat.de>2014-11-06 02:53:20 -0500
committerJohn W. Linville <linville@tuxdriver.com>2014-11-11 16:31:13 -0500
commit21af25d00b8bdf03a899b316d41d31ac3eafaf78 (patch)
tree3395ed26b7035cce21520a8793e5cf4001c4a1e0
parent8391f60194bd0d9ab489105381df6455afe1f39a (diff)
ath9k: move spec_config to ath_spec_scan_priv
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/ath9k.h3
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c12
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c12
-rw-r--r--drivers/net/wireless/ath/ath9k/spectral.c16
-rw-r--r--drivers/net/wireless/ath/ath9k/spectral.h2
5 files changed, 23 insertions, 22 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 859f93e9900e..dee1f2a58538 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -1028,8 +1028,7 @@ struct ath_softc {
1028 struct dfs_pattern_detector *dfs_detector; 1028 struct dfs_pattern_detector *dfs_detector;
1029 u64 dfs_prev_pulse_ts; 1029 u64 dfs_prev_pulse_ts;
1030 u32 wow_enabled; 1030 u32 wow_enabled;
1031 /* relay(fs) channel for spectral scan */ 1031
1032 struct ath_spec_scan spec_config;
1033 struct ath_spec_scan_priv spec_priv; 1032 struct ath_spec_scan_priv spec_priv;
1034 1033
1035 struct ieee80211_vif *tx99_vif; 1034 struct ieee80211_vif *tx99_vif;
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 8d3c3364326a..aebafaa28dce 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -351,12 +351,12 @@ static void ath9k_init_misc(struct ath_softc *sc)
351 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB) 351 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB)
352 sc->ant_comb.count = ATH_ANT_DIV_COMB_INIT_COUNT; 352 sc->ant_comb.count = ATH_ANT_DIV_COMB_INIT_COUNT;
353 353
354 sc->spec_config.enabled = 0; 354 sc->spec_priv.spec_config.enabled = 0;
355 sc->spec_config.short_repeat = true; 355 sc->spec_priv.spec_config.short_repeat = true;
356 sc->spec_config.count = 8; 356 sc->spec_priv.spec_config.count = 8;
357 sc->spec_config.endless = false; 357 sc->spec_priv.spec_config.endless = false;
358 sc->spec_config.period = 0xFF; 358 sc->spec_priv.spec_config.period = 0xFF;
359 sc->spec_config.fft_period = 0xF; 359 sc->spec_priv.spec_config.fft_period = 0xF;
360} 360}
361 361
362static void ath9k_init_pcoem_platform(struct ath_softc *sc) 362static void ath9k_init_pcoem_platform(struct ath_softc *sc)
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index c074658dbf54..f9641ee6aeb6 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1382,26 +1382,26 @@ int ath9k_spectral_scan_config(struct ieee80211_hw *hw,
1382 1382
1383 switch (spectral_mode) { 1383 switch (spectral_mode) {
1384 case SPECTRAL_DISABLED: 1384 case SPECTRAL_DISABLED:
1385 sc->spec_config.enabled = 0; 1385 sc->spec_priv.spec_config.enabled = 0;
1386 break; 1386 break;
1387 case SPECTRAL_BACKGROUND: 1387 case SPECTRAL_BACKGROUND:
1388 /* send endless samples. 1388 /* send endless samples.
1389 * TODO: is this really useful for "background"? 1389 * TODO: is this really useful for "background"?
1390 */ 1390 */
1391 sc->spec_config.endless = 1; 1391 sc->spec_priv.spec_config.endless = 1;
1392 sc->spec_config.enabled = 1; 1392 sc->spec_priv.spec_config.enabled = 1;
1393 break; 1393 break;
1394 case SPECTRAL_CHANSCAN: 1394 case SPECTRAL_CHANSCAN:
1395 case SPECTRAL_MANUAL: 1395 case SPECTRAL_MANUAL:
1396 sc->spec_config.endless = 0; 1396 sc->spec_priv.spec_config.endless = 0;
1397 sc->spec_config.enabled = 1; 1397 sc->spec_priv.spec_config.enabled = 1;
1398 break; 1398 break;
1399 default: 1399 default:
1400 return -1; 1400 return -1;
1401 } 1401 }
1402 1402
1403 ath9k_ps_wakeup(sc); 1403 ath9k_ps_wakeup(sc);
1404 ath9k_hw_ops(ah)->spectral_scan_config(ah, &sc->spec_config); 1404 ath9k_hw_ops(ah)->spectral_scan_config(ah, &sc->spec_priv.spec_config);
1405 ath9k_ps_restore(sc); 1405 ath9k_ps_restore(sc);
1406 1406
1407 sc->spec_priv.spectral_mode = spectral_mode; 1407 sc->spec_priv.spectral_mode = spectral_mode;
diff --git a/drivers/net/wireless/ath/ath9k/spectral.c b/drivers/net/wireless/ath/ath9k/spectral.c
index 3a394e1fefdc..555fc2a6851e 100644
--- a/drivers/net/wireless/ath/ath9k/spectral.c
+++ b/drivers/net/wireless/ath/ath9k/spectral.c
@@ -292,7 +292,7 @@ static ssize_t read_file_spectral_short_repeat(struct file *file,
292 char buf[32]; 292 char buf[32];
293 unsigned int len; 293 unsigned int len;
294 294
295 len = sprintf(buf, "%d\n", sc->spec_config.short_repeat); 295 len = sprintf(buf, "%d\n", sc->spec_priv.spec_config.short_repeat);
296 return simple_read_from_buffer(user_buf, count, ppos, buf, len); 296 return simple_read_from_buffer(user_buf, count, ppos, buf, len);
297} 297}
298 298
@@ -316,7 +316,7 @@ static ssize_t write_file_spectral_short_repeat(struct file *file,
316 if (val > 1) 316 if (val > 1)
317 return -EINVAL; 317 return -EINVAL;
318 318
319 sc->spec_config.short_repeat = val; 319 sc->spec_priv.spec_config.short_repeat = val;
320 return count; 320 return count;
321} 321}
322 322
@@ -340,7 +340,7 @@ static ssize_t read_file_spectral_count(struct file *file,
340 char buf[32]; 340 char buf[32];
341 unsigned int len; 341 unsigned int len;
342 342
343 len = sprintf(buf, "%d\n", sc->spec_config.count); 343 len = sprintf(buf, "%d\n", sc->spec_priv.spec_config.count);
344 return simple_read_from_buffer(user_buf, count, ppos, buf, len); 344 return simple_read_from_buffer(user_buf, count, ppos, buf, len);
345} 345}
346 346
@@ -364,7 +364,7 @@ static ssize_t write_file_spectral_count(struct file *file,
364 if (val > 255) 364 if (val > 255)
365 return -EINVAL; 365 return -EINVAL;
366 366
367 sc->spec_config.count = val; 367 sc->spec_priv.spec_config.count = val;
368 return count; 368 return count;
369} 369}
370 370
@@ -388,7 +388,7 @@ static ssize_t read_file_spectral_period(struct file *file,
388 char buf[32]; 388 char buf[32];
389 unsigned int len; 389 unsigned int len;
390 390
391 len = sprintf(buf, "%d\n", sc->spec_config.period); 391 len = sprintf(buf, "%d\n", sc->spec_priv.spec_config.period);
392 return simple_read_from_buffer(user_buf, count, ppos, buf, len); 392 return simple_read_from_buffer(user_buf, count, ppos, buf, len);
393} 393}
394 394
@@ -412,7 +412,7 @@ static ssize_t write_file_spectral_period(struct file *file,
412 if (val > 255) 412 if (val > 255)
413 return -EINVAL; 413 return -EINVAL;
414 414
415 sc->spec_config.period = val; 415 sc->spec_priv.spec_config.period = val;
416 return count; 416 return count;
417} 417}
418 418
@@ -436,7 +436,7 @@ static ssize_t read_file_spectral_fft_period(struct file *file,
436 char buf[32]; 436 char buf[32];
437 unsigned int len; 437 unsigned int len;
438 438
439 len = sprintf(buf, "%d\n", sc->spec_config.fft_period); 439 len = sprintf(buf, "%d\n", sc->spec_priv.spec_config.fft_period);
440 return simple_read_from_buffer(user_buf, count, ppos, buf, len); 440 return simple_read_from_buffer(user_buf, count, ppos, buf, len);
441} 441}
442 442
@@ -460,7 +460,7 @@ static ssize_t write_file_spectral_fft_period(struct file *file,
460 if (val > 15) 460 if (val > 15)
461 return -EINVAL; 461 return -EINVAL;
462 462
463 sc->spec_config.fft_period = val; 463 sc->spec_priv.spec_config.fft_period = val;
464 return count; 464 return count;
465} 465}
466 466
diff --git a/drivers/net/wireless/ath/ath9k/spectral.h b/drivers/net/wireless/ath/ath9k/spectral.h
index 0acdc432c771..dfe6f68cf5a3 100644
--- a/drivers/net/wireless/ath/ath9k/spectral.h
+++ b/drivers/net/wireless/ath/ath9k/spectral.h
@@ -93,8 +93,10 @@ struct ath_ht20_40_fft_packet {
93} __packed; 93} __packed;
94 94
95struct ath_spec_scan_priv { 95struct ath_spec_scan_priv {
96 /* relay(fs) channel for spectral scan */
96 struct rchan *rfs_chan_spec_scan; 97 struct rchan *rfs_chan_spec_scan;
97 enum spectral_mode spectral_mode; 98 enum spectral_mode spectral_mode;
99 struct ath_spec_scan spec_config;
98}; 100};
99 101
100#define SPECTRAL_HT20_40_TOTAL_DATA_LEN (sizeof(struct ath_ht20_40_fft_packet)) 102#define SPECTRAL_HT20_40_TOTAL_DATA_LEN (sizeof(struct ath_ht20_40_fft_packet))