diff options
author | Don Fry <donald.h.fry@intel.com> | 2011-12-16 10:07:36 -0500 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-12-16 10:22:16 -0500 |
commit | 3862241945026a8fa165ab73c57739df77b8e1fb (patch) | |
tree | 2a093cfd34c285e2510bc91e02a9fa4793fd9b6f /drivers/net/wireless/iwlwifi/iwl-debugfs.c | |
parent | 5bd5e9a6ae5137a61d0b5c277eac61892d89fc4f (diff) |
iwlwifi: move iwl_cfg from iwl_priv to iwl_shared
Move the configuration pointer from the upper level iwl_priv to the
lower level iwl_shared structure, with associated code fixes.
Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-debugfs.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index 6bf6845e1a51..074068e78320 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -408,7 +408,7 @@ static ssize_t iwl_dbgfs_nvm_read(struct file *file, | |||
408 | const u8 *ptr; | 408 | const u8 *ptr; |
409 | char *buf; | 409 | char *buf; |
410 | u16 eeprom_ver; | 410 | u16 eeprom_ver; |
411 | size_t eeprom_len = priv->cfg->base_params->eeprom_size; | 411 | size_t eeprom_len = cfg(priv)->base_params->eeprom_size; |
412 | buf_size = 4 * eeprom_len + 256; | 412 | buf_size = 4 * eeprom_len + 256; |
413 | 413 | ||
414 | if (eeprom_len % 16) { | 414 | if (eeprom_len % 16) { |
@@ -1542,15 +1542,15 @@ static ssize_t iwl_dbgfs_ucode_tx_stats_read(struct file *file, | |||
1542 | if (tx->tx_power.ant_a || tx->tx_power.ant_b || tx->tx_power.ant_c) { | 1542 | if (tx->tx_power.ant_a || tx->tx_power.ant_b || tx->tx_power.ant_c) { |
1543 | pos += scnprintf(buf + pos, bufsz - pos, | 1543 | pos += scnprintf(buf + pos, bufsz - pos, |
1544 | "tx power: (1/2 dB step)\n"); | 1544 | "tx power: (1/2 dB step)\n"); |
1545 | if ((priv->cfg->valid_tx_ant & ANT_A) && tx->tx_power.ant_a) | 1545 | if ((cfg(priv)->valid_tx_ant & ANT_A) && tx->tx_power.ant_a) |
1546 | pos += scnprintf(buf + pos, bufsz - pos, | 1546 | pos += scnprintf(buf + pos, bufsz - pos, |
1547 | fmt_hex, "antenna A:", | 1547 | fmt_hex, "antenna A:", |
1548 | tx->tx_power.ant_a); | 1548 | tx->tx_power.ant_a); |
1549 | if ((priv->cfg->valid_tx_ant & ANT_B) && tx->tx_power.ant_b) | 1549 | if ((cfg(priv)->valid_tx_ant & ANT_B) && tx->tx_power.ant_b) |
1550 | pos += scnprintf(buf + pos, bufsz - pos, | 1550 | pos += scnprintf(buf + pos, bufsz - pos, |
1551 | fmt_hex, "antenna B:", | 1551 | fmt_hex, "antenna B:", |
1552 | tx->tx_power.ant_b); | 1552 | tx->tx_power.ant_b); |
1553 | if ((priv->cfg->valid_tx_ant & ANT_C) && tx->tx_power.ant_c) | 1553 | if ((cfg(priv)->valid_tx_ant & ANT_C) && tx->tx_power.ant_c) |
1554 | pos += scnprintf(buf + pos, bufsz - pos, | 1554 | pos += scnprintf(buf + pos, bufsz - pos, |
1555 | fmt_hex, "antenna C:", | 1555 | fmt_hex, "antenna C:", |
1556 | tx->tx_power.ant_c); | 1556 | tx->tx_power.ant_c); |
@@ -2221,7 +2221,7 @@ static ssize_t iwl_dbgfs_plcp_delta_read(struct file *file, | |||
2221 | const size_t bufsz = sizeof(buf); | 2221 | const size_t bufsz = sizeof(buf); |
2222 | 2222 | ||
2223 | pos += scnprintf(buf + pos, bufsz - pos, "%u\n", | 2223 | pos += scnprintf(buf + pos, bufsz - pos, "%u\n", |
2224 | priv->cfg->base_params->plcp_delta_threshold); | 2224 | cfg(priv)->base_params->plcp_delta_threshold); |
2225 | 2225 | ||
2226 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); | 2226 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); |
2227 | } | 2227 | } |
@@ -2243,10 +2243,10 @@ static ssize_t iwl_dbgfs_plcp_delta_write(struct file *file, | |||
2243 | return -EINVAL; | 2243 | return -EINVAL; |
2244 | if ((plcp < IWL_MAX_PLCP_ERR_THRESHOLD_MIN) || | 2244 | if ((plcp < IWL_MAX_PLCP_ERR_THRESHOLD_MIN) || |
2245 | (plcp > IWL_MAX_PLCP_ERR_THRESHOLD_MAX)) | 2245 | (plcp > IWL_MAX_PLCP_ERR_THRESHOLD_MAX)) |
2246 | priv->cfg->base_params->plcp_delta_threshold = | 2246 | cfg(priv)->base_params->plcp_delta_threshold = |
2247 | IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE; | 2247 | IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE; |
2248 | else | 2248 | else |
2249 | priv->cfg->base_params->plcp_delta_threshold = plcp; | 2249 | cfg(priv)->base_params->plcp_delta_threshold = plcp; |
2250 | return count; | 2250 | return count; |
2251 | } | 2251 | } |
2252 | 2252 | ||
@@ -2348,7 +2348,7 @@ static ssize_t iwl_dbgfs_wd_timeout_write(struct file *file, | |||
2348 | if (timeout < 0 || timeout > IWL_MAX_WD_TIMEOUT) | 2348 | if (timeout < 0 || timeout > IWL_MAX_WD_TIMEOUT) |
2349 | timeout = IWL_DEF_WD_TIMEOUT; | 2349 | timeout = IWL_DEF_WD_TIMEOUT; |
2350 | 2350 | ||
2351 | priv->cfg->base_params->wd_timeout = timeout; | 2351 | cfg(priv)->base_params->wd_timeout = timeout; |
2352 | iwl_setup_watchdog(priv); | 2352 | iwl_setup_watchdog(priv); |
2353 | return count; | 2353 | return count; |
2354 | } | 2354 | } |
@@ -2408,10 +2408,10 @@ static ssize_t iwl_dbgfs_protection_mode_read(struct file *file, | |||
2408 | char buf[40]; | 2408 | char buf[40]; |
2409 | const size_t bufsz = sizeof(buf); | 2409 | const size_t bufsz = sizeof(buf); |
2410 | 2410 | ||
2411 | if (priv->cfg->ht_params) | 2411 | if (cfg(priv)->ht_params) |
2412 | pos += scnprintf(buf + pos, bufsz - pos, | 2412 | pos += scnprintf(buf + pos, bufsz - pos, |
2413 | "use %s for aggregation\n", | 2413 | "use %s for aggregation\n", |
2414 | (priv->cfg->ht_params->use_rts_for_aggregation) ? | 2414 | (cfg(priv)->ht_params->use_rts_for_aggregation) ? |
2415 | "rts/cts" : "cts-to-self"); | 2415 | "rts/cts" : "cts-to-self"); |
2416 | else | 2416 | else |
2417 | pos += scnprintf(buf + pos, bufsz - pos, "N/A"); | 2417 | pos += scnprintf(buf + pos, bufsz - pos, "N/A"); |
@@ -2428,7 +2428,7 @@ static ssize_t iwl_dbgfs_protection_mode_write(struct file *file, | |||
2428 | int buf_size; | 2428 | int buf_size; |
2429 | int rts; | 2429 | int rts; |
2430 | 2430 | ||
2431 | if (!priv->cfg->ht_params) | 2431 | if (!cfg(priv)->ht_params) |
2432 | return -EINVAL; | 2432 | return -EINVAL; |
2433 | 2433 | ||
2434 | memset(buf, 0, sizeof(buf)); | 2434 | memset(buf, 0, sizeof(buf)); |
@@ -2438,9 +2438,9 @@ static ssize_t iwl_dbgfs_protection_mode_write(struct file *file, | |||
2438 | if (sscanf(buf, "%d", &rts) != 1) | 2438 | if (sscanf(buf, "%d", &rts) != 1) |
2439 | return -EINVAL; | 2439 | return -EINVAL; |
2440 | if (rts) | 2440 | if (rts) |
2441 | priv->cfg->ht_params->use_rts_for_aggregation = true; | 2441 | cfg(priv)->ht_params->use_rts_for_aggregation = true; |
2442 | else | 2442 | else |
2443 | priv->cfg->ht_params->use_rts_for_aggregation = false; | 2443 | cfg(priv)->ht_params->use_rts_for_aggregation = false; |
2444 | return count; | 2444 | return count; |
2445 | } | 2445 | } |
2446 | 2446 | ||