diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-03-06 16:30:53 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-07 13:55:44 -0500 |
commit | ab5c0f1f2d525ed17f1abf727d213cf220ed26a8 (patch) | |
tree | 8e07f690aaed41e565f19baa9e0bc9e07ae561d8 /drivers/net/wireless/iwlwifi/iwl-debugfs.c | |
parent | 3cc241ad713dcc4e193aec40307e9070bf817908 (diff) |
iwlwifi: keep plcp_delta_threshold in priv
The base_params shouldn't be writable, so keep
a copy of this in priv that can be modified.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-debugfs.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index b9b6d628f59a..ade4134fc1ec 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -2241,7 +2241,7 @@ static ssize_t iwl_dbgfs_plcp_delta_read(struct file *file, | |||
2241 | const size_t bufsz = sizeof(buf); | 2241 | const size_t bufsz = sizeof(buf); |
2242 | 2242 | ||
2243 | pos += scnprintf(buf + pos, bufsz - pos, "%u\n", | 2243 | pos += scnprintf(buf + pos, bufsz - pos, "%u\n", |
2244 | cfg(priv)->base_params->plcp_delta_threshold); | 2244 | priv->plcp_delta_threshold); |
2245 | 2245 | ||
2246 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); | 2246 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); |
2247 | } | 2247 | } |
@@ -2263,10 +2263,10 @@ static ssize_t iwl_dbgfs_plcp_delta_write(struct file *file, | |||
2263 | return -EINVAL; | 2263 | return -EINVAL; |
2264 | if ((plcp < IWL_MAX_PLCP_ERR_THRESHOLD_MIN) || | 2264 | if ((plcp < IWL_MAX_PLCP_ERR_THRESHOLD_MIN) || |
2265 | (plcp > IWL_MAX_PLCP_ERR_THRESHOLD_MAX)) | 2265 | (plcp > IWL_MAX_PLCP_ERR_THRESHOLD_MAX)) |
2266 | cfg(priv)->base_params->plcp_delta_threshold = | 2266 | priv->plcp_delta_threshold = |
2267 | IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE; | 2267 | IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE; |
2268 | else | 2268 | else |
2269 | cfg(priv)->base_params->plcp_delta_threshold = plcp; | 2269 | priv->plcp_delta_threshold = plcp; |
2270 | return count; | 2270 | return count; |
2271 | } | 2271 | } |
2272 | 2272 | ||