aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-02-18 03:36:07 -0500
committerReinette Chatre <reinette.chatre@intel.com>2010-03-09 19:10:38 -0500
commit60987206cba0dbb547bce2d23c3a3338c5aaf5ac (patch)
tree6c6d49750ff992db7cce443a430d074a699c498c /drivers/net/wireless/iwlwifi/iwl-agn.c
parentb55e75ed926ded110293b0d1e24eb6a878883115 (diff)
iwlagn: move sysfs flags and filter_flags files to debugfs
These files are incompatible with some changes I'm making, and don't really belong into sysfs anyway as they can only be used for debugging. Since writing them will probably crash the firmware, keep only the reading part and move them into debugfs. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c83
1 files changed, 0 insertions, 83 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 6c816d9b524..bc84fd4a8d2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3109,87 +3109,6 @@ static ssize_t store_tx_power(struct device *d,
3109 3109
3110static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, show_tx_power, store_tx_power); 3110static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, show_tx_power, store_tx_power);
3111 3111
3112static ssize_t show_flags(struct device *d,
3113 struct device_attribute *attr, char *buf)
3114{
3115 struct iwl_priv *priv = dev_get_drvdata(d);
3116
3117 return sprintf(buf, "0x%04X\n", priv->active_rxon.flags);
3118}
3119
3120static ssize_t store_flags(struct device *d,
3121 struct device_attribute *attr,
3122 const char *buf, size_t count)
3123{
3124 struct iwl_priv *priv = dev_get_drvdata(d);
3125 unsigned long val;
3126 u32 flags;
3127 int ret = strict_strtoul(buf, 0, &val);
3128 if (ret)
3129 return ret;
3130 flags = (u32)val;
3131
3132 mutex_lock(&priv->mutex);
3133 if (le32_to_cpu(priv->staging_rxon.flags) != flags) {
3134 /* Cancel any currently running scans... */
3135 if (iwl_scan_cancel_timeout(priv, 100))
3136 IWL_WARN(priv, "Could not cancel scan.\n");
3137 else {
3138 IWL_DEBUG_INFO(priv, "Commit rxon.flags = 0x%04X\n", flags);
3139 priv->staging_rxon.flags = cpu_to_le32(flags);
3140 iwlcore_commit_rxon(priv);
3141 }
3142 }
3143 mutex_unlock(&priv->mutex);
3144
3145 return count;
3146}
3147
3148static DEVICE_ATTR(flags, S_IWUSR | S_IRUGO, show_flags, store_flags);
3149
3150static ssize_t show_filter_flags(struct device *d,
3151 struct device_attribute *attr, char *buf)
3152{
3153 struct iwl_priv *priv = dev_get_drvdata(d);
3154
3155 return sprintf(buf, "0x%04X\n",
3156 le32_to_cpu(priv->active_rxon.filter_flags));
3157}
3158
3159static ssize_t store_filter_flags(struct device *d,
3160 struct device_attribute *attr,
3161 const char *buf, size_t count)
3162{
3163 struct iwl_priv *priv = dev_get_drvdata(d);
3164 unsigned long val;
3165 u32 filter_flags;
3166 int ret = strict_strtoul(buf, 0, &val);
3167 if (ret)
3168 return ret;
3169 filter_flags = (u32)val;
3170
3171 mutex_lock(&priv->mutex);
3172 if (le32_to_cpu(priv->staging_rxon.filter_flags) != filter_flags) {
3173 /* Cancel any currently running scans... */
3174 if (iwl_scan_cancel_timeout(priv, 100))
3175 IWL_WARN(priv, "Could not cancel scan.\n");
3176 else {
3177 IWL_DEBUG_INFO(priv, "Committing rxon.filter_flags = "
3178 "0x%04X\n", filter_flags);
3179 priv->staging_rxon.filter_flags =
3180 cpu_to_le32(filter_flags);
3181 iwlcore_commit_rxon(priv);
3182 }
3183 }
3184 mutex_unlock(&priv->mutex);
3185
3186 return count;
3187}
3188
3189static DEVICE_ATTR(filter_flags, S_IWUSR | S_IRUGO, show_filter_flags,
3190 store_filter_flags);
3191
3192
3193static ssize_t show_statistics(struct device *d, 3112static ssize_t show_statistics(struct device *d,
3194 struct device_attribute *attr, char *buf) 3113 struct device_attribute *attr, char *buf)
3195{ 3114{
@@ -3414,8 +3333,6 @@ static void iwl_uninit_drv(struct iwl_priv *priv)
3414} 3333}
3415 3334
3416static struct attribute *iwl_sysfs_entries[] = { 3335static struct attribute *iwl_sysfs_entries[] = {
3417 &dev_attr_flags.attr,
3418 &dev_attr_filter_flags.attr,
3419 &dev_attr_statistics.attr, 3336 &dev_attr_statistics.attr,
3420 &dev_attr_temperature.attr, 3337 &dev_attr_temperature.attr,
3421 &dev_attr_tx_power.attr, 3338 &dev_attr_tx_power.attr,