diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index dc0359ce1ec0..9f5191a84a13 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -3595,7 +3595,7 @@ static int iwl3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
3595 | static ssize_t show_debug_level(struct device *d, | 3595 | static ssize_t show_debug_level(struct device *d, |
3596 | struct device_attribute *attr, char *buf) | 3596 | struct device_attribute *attr, char *buf) |
3597 | { | 3597 | { |
3598 | struct iwl_priv *priv = d->driver_data; | 3598 | struct iwl_priv *priv = dev_get_drvdata(d); |
3599 | 3599 | ||
3600 | return sprintf(buf, "0x%08X\n", priv->debug_level); | 3600 | return sprintf(buf, "0x%08X\n", priv->debug_level); |
3601 | } | 3601 | } |
@@ -3603,7 +3603,7 @@ static ssize_t store_debug_level(struct device *d, | |||
3603 | struct device_attribute *attr, | 3603 | struct device_attribute *attr, |
3604 | const char *buf, size_t count) | 3604 | const char *buf, size_t count) |
3605 | { | 3605 | { |
3606 | struct iwl_priv *priv = d->driver_data; | 3606 | struct iwl_priv *priv = dev_get_drvdata(d); |
3607 | unsigned long val; | 3607 | unsigned long val; |
3608 | int ret; | 3608 | int ret; |
3609 | 3609 | ||
@@ -3624,7 +3624,7 @@ static DEVICE_ATTR(debug_level, S_IWUSR | S_IRUGO, | |||
3624 | static ssize_t show_temperature(struct device *d, | 3624 | static ssize_t show_temperature(struct device *d, |
3625 | struct device_attribute *attr, char *buf) | 3625 | struct device_attribute *attr, char *buf) |
3626 | { | 3626 | { |
3627 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; | 3627 | struct iwl_priv *priv = dev_get_drvdata(d); |
3628 | 3628 | ||
3629 | if (!iwl_is_alive(priv)) | 3629 | if (!iwl_is_alive(priv)) |
3630 | return -EAGAIN; | 3630 | return -EAGAIN; |
@@ -3637,7 +3637,7 @@ static DEVICE_ATTR(temperature, S_IRUGO, show_temperature, NULL); | |||
3637 | static ssize_t show_tx_power(struct device *d, | 3637 | static ssize_t show_tx_power(struct device *d, |
3638 | struct device_attribute *attr, char *buf) | 3638 | struct device_attribute *attr, char *buf) |
3639 | { | 3639 | { |
3640 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; | 3640 | struct iwl_priv *priv = dev_get_drvdata(d); |
3641 | return sprintf(buf, "%d\n", priv->tx_power_user_lmt); | 3641 | return sprintf(buf, "%d\n", priv->tx_power_user_lmt); |
3642 | } | 3642 | } |
3643 | 3643 | ||
@@ -3645,7 +3645,7 @@ static ssize_t store_tx_power(struct device *d, | |||
3645 | struct device_attribute *attr, | 3645 | struct device_attribute *attr, |
3646 | const char *buf, size_t count) | 3646 | const char *buf, size_t count) |
3647 | { | 3647 | { |
3648 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; | 3648 | struct iwl_priv *priv = dev_get_drvdata(d); |
3649 | char *p = (char *)buf; | 3649 | char *p = (char *)buf; |
3650 | u32 val; | 3650 | u32 val; |
3651 | 3651 | ||
@@ -3663,7 +3663,7 @@ static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, show_tx_power, store_tx_power); | |||
3663 | static ssize_t show_flags(struct device *d, | 3663 | static ssize_t show_flags(struct device *d, |
3664 | struct device_attribute *attr, char *buf) | 3664 | struct device_attribute *attr, char *buf) |
3665 | { | 3665 | { |
3666 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; | 3666 | struct iwl_priv *priv = dev_get_drvdata(d); |
3667 | 3667 | ||
3668 | return sprintf(buf, "0x%04X\n", priv->active_rxon.flags); | 3668 | return sprintf(buf, "0x%04X\n", priv->active_rxon.flags); |
3669 | } | 3669 | } |
@@ -3672,7 +3672,7 @@ static ssize_t store_flags(struct device *d, | |||
3672 | struct device_attribute *attr, | 3672 | struct device_attribute *attr, |
3673 | const char *buf, size_t count) | 3673 | const char *buf, size_t count) |
3674 | { | 3674 | { |
3675 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; | 3675 | struct iwl_priv *priv = dev_get_drvdata(d); |
3676 | u32 flags = simple_strtoul(buf, NULL, 0); | 3676 | u32 flags = simple_strtoul(buf, NULL, 0); |
3677 | 3677 | ||
3678 | mutex_lock(&priv->mutex); | 3678 | mutex_lock(&priv->mutex); |
@@ -3697,7 +3697,7 @@ static DEVICE_ATTR(flags, S_IWUSR | S_IRUGO, show_flags, store_flags); | |||
3697 | static ssize_t show_filter_flags(struct device *d, | 3697 | static ssize_t show_filter_flags(struct device *d, |
3698 | struct device_attribute *attr, char *buf) | 3698 | struct device_attribute *attr, char *buf) |
3699 | { | 3699 | { |
3700 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; | 3700 | struct iwl_priv *priv = dev_get_drvdata(d); |
3701 | 3701 | ||
3702 | return sprintf(buf, "0x%04X\n", | 3702 | return sprintf(buf, "0x%04X\n", |
3703 | le32_to_cpu(priv->active_rxon.filter_flags)); | 3703 | le32_to_cpu(priv->active_rxon.filter_flags)); |
@@ -3707,7 +3707,7 @@ static ssize_t store_filter_flags(struct device *d, | |||
3707 | struct device_attribute *attr, | 3707 | struct device_attribute *attr, |
3708 | const char *buf, size_t count) | 3708 | const char *buf, size_t count) |
3709 | { | 3709 | { |
3710 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; | 3710 | struct iwl_priv *priv = dev_get_drvdata(d); |
3711 | u32 filter_flags = simple_strtoul(buf, NULL, 0); | 3711 | u32 filter_flags = simple_strtoul(buf, NULL, 0); |
3712 | 3712 | ||
3713 | mutex_lock(&priv->mutex); | 3713 | mutex_lock(&priv->mutex); |
@@ -3992,7 +3992,7 @@ static DEVICE_ATTR(antenna, S_IWUSR | S_IRUGO, show_antenna, store_antenna); | |||
3992 | static ssize_t show_status(struct device *d, | 3992 | static ssize_t show_status(struct device *d, |
3993 | struct device_attribute *attr, char *buf) | 3993 | struct device_attribute *attr, char *buf) |
3994 | { | 3994 | { |
3995 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; | 3995 | struct iwl_priv *priv = dev_get_drvdata(d); |
3996 | if (!iwl_is_alive(priv)) | 3996 | if (!iwl_is_alive(priv)) |
3997 | return -EAGAIN; | 3997 | return -EAGAIN; |
3998 | return sprintf(buf, "0x%08x\n", (int)priv->status); | 3998 | return sprintf(buf, "0x%08x\n", (int)priv->status); |
@@ -4004,10 +4004,11 @@ static ssize_t dump_error_log(struct device *d, | |||
4004 | struct device_attribute *attr, | 4004 | struct device_attribute *attr, |
4005 | const char *buf, size_t count) | 4005 | const char *buf, size_t count) |
4006 | { | 4006 | { |
4007 | struct iwl_priv *priv = dev_get_drvdata(d); | ||
4007 | char *p = (char *)buf; | 4008 | char *p = (char *)buf; |
4008 | 4009 | ||
4009 | if (p[0] == '1') | 4010 | if (p[0] == '1') |
4010 | iwl3945_dump_nic_error_log((struct iwl_priv *)d->driver_data); | 4011 | iwl3945_dump_nic_error_log(priv); |
4011 | 4012 | ||
4012 | return strnlen(buf, count); | 4013 | return strnlen(buf, count); |
4013 | } | 4014 | } |
@@ -4018,10 +4019,11 @@ static ssize_t dump_event_log(struct device *d, | |||
4018 | struct device_attribute *attr, | 4019 | struct device_attribute *attr, |
4019 | const char *buf, size_t count) | 4020 | const char *buf, size_t count) |
4020 | { | 4021 | { |
4022 | struct iwl_priv *priv = dev_get_drvdata(d); | ||
4021 | char *p = (char *)buf; | 4023 | char *p = (char *)buf; |
4022 | 4024 | ||
4023 | if (p[0] == '1') | 4025 | if (p[0] == '1') |
4024 | iwl3945_dump_nic_event_log((struct iwl_priv *)d->driver_data); | 4026 | iwl3945_dump_nic_event_log(priv); |
4025 | 4027 | ||
4026 | return strnlen(buf, count); | 4028 | return strnlen(buf, count); |
4027 | } | 4029 | } |