diff options
author | David S. Miller <davem@davemloft.net> | 2010-03-22 21:15:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-22 21:15:15 -0400 |
commit | 33e2bf6aa16061bae1253514e7c32af27d2b4b31 (patch) | |
tree | 652d13b4feea9a8f562186e7badae72d2e22fe1f /drivers/net/wireless/iwlwifi/iwl-agn.c | |
parent | e880eb6c5c9d98e389ffc0d8947f75d70785361a (diff) | |
parent | 819bfecc4fc6b6e5a793f719a45b7146ce423b79 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/net/wireless/ath/ath5k/phy.c
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 110 |
1 files changed, 7 insertions, 103 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 818367b57bab..efee4e39d282 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -54,6 +54,7 @@ | |||
54 | #include "iwl-helpers.h" | 54 | #include "iwl-helpers.h" |
55 | #include "iwl-sta.h" | 55 | #include "iwl-sta.h" |
56 | #include "iwl-calib.h" | 56 | #include "iwl-calib.h" |
57 | #include "iwl-agn.h" | ||
57 | 58 | ||
58 | 59 | ||
59 | /****************************************************************************** | 60 | /****************************************************************************** |
@@ -1258,9 +1259,9 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) | |||
1258 | /* Ack/clear/reset pending uCode interrupts. | 1259 | /* Ack/clear/reset pending uCode interrupts. |
1259 | * Note: Some bits in CSR_INT are "OR" of bits in CSR_FH_INT_STATUS, | 1260 | * Note: Some bits in CSR_INT are "OR" of bits in CSR_FH_INT_STATUS, |
1260 | */ | 1261 | */ |
1261 | iwl_write32(priv, CSR_INT, priv->inta); | 1262 | iwl_write32(priv, CSR_INT, priv->_agn.inta); |
1262 | 1263 | ||
1263 | inta = priv->inta; | 1264 | inta = priv->_agn.inta; |
1264 | 1265 | ||
1265 | #ifdef CONFIG_IWLWIFI_DEBUG | 1266 | #ifdef CONFIG_IWLWIFI_DEBUG |
1266 | if (iwl_get_debug_level(priv) & IWL_DL_ISR) { | 1267 | if (iwl_get_debug_level(priv) & IWL_DL_ISR) { |
@@ -1273,8 +1274,8 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) | |||
1273 | 1274 | ||
1274 | spin_unlock_irqrestore(&priv->lock, flags); | 1275 | spin_unlock_irqrestore(&priv->lock, flags); |
1275 | 1276 | ||
1276 | /* saved interrupt in inta variable now we can reset priv->inta */ | 1277 | /* saved interrupt in inta variable now we can reset priv->_agn.inta */ |
1277 | priv->inta = 0; | 1278 | priv->_agn.inta = 0; |
1278 | 1279 | ||
1279 | /* Now service all interrupt bits discovered above. */ | 1280 | /* Now service all interrupt bits discovered above. */ |
1280 | if (inta & CSR_INT_BIT_HW_ERR) { | 1281 | if (inta & CSR_INT_BIT_HW_ERR) { |
@@ -2102,8 +2103,7 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
2102 | 2103 | ||
2103 | ieee80211_wake_queues(priv->hw); | 2104 | ieee80211_wake_queues(priv->hw); |
2104 | 2105 | ||
2105 | priv->active_rate = priv->rates_mask; | 2106 | priv->active_rate = IWL_RATES_MASK; |
2106 | priv->active_rate_basic = priv->rates_mask & IWL_BASIC_RATES_MASK; | ||
2107 | 2107 | ||
2108 | /* Configure Tx antenna selection based on H/W config */ | 2108 | /* Configure Tx antenna selection based on H/W config */ |
2109 | if (priv->cfg->ops->hcmd->set_tx_ant) | 2109 | if (priv->cfg->ops->hcmd->set_tx_ant) |
@@ -2144,18 +2144,6 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
2144 | 2144 | ||
2145 | iwl_power_update_mode(priv, true); | 2145 | iwl_power_update_mode(priv, true); |
2146 | 2146 | ||
2147 | /* reassociate for ADHOC mode */ | ||
2148 | if (priv->vif && (priv->iw_mode == NL80211_IFTYPE_ADHOC)) { | ||
2149 | struct sk_buff *beacon = ieee80211_beacon_get(priv->hw, | ||
2150 | priv->vif); | ||
2151 | if (beacon) | ||
2152 | iwl_mac_beacon_update(priv->hw, beacon); | ||
2153 | } | ||
2154 | |||
2155 | |||
2156 | if (test_and_clear_bit(STATUS_MODE_PENDING, &priv->status)) | ||
2157 | iwl_set_mode(priv, priv->iw_mode); | ||
2158 | |||
2159 | return; | 2147 | return; |
2160 | 2148 | ||
2161 | restart: | 2149 | restart: |
@@ -2881,7 +2869,6 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
2881 | 2869 | ||
2882 | mutex_lock(&priv->mutex); | 2870 | mutex_lock(&priv->mutex); |
2883 | iwl_scan_cancel_timeout(priv, 100); | 2871 | iwl_scan_cancel_timeout(priv, 100); |
2884 | mutex_unlock(&priv->mutex); | ||
2885 | 2872 | ||
2886 | /* If we are getting WEP group key and we didn't receive any key mapping | 2873 | /* If we are getting WEP group key and we didn't receive any key mapping |
2887 | * so far, we are in legacy wep mode (group key only), otherwise we are | 2874 | * so far, we are in legacy wep mode (group key only), otherwise we are |
@@ -2917,6 +2904,7 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
2917 | ret = -EINVAL; | 2904 | ret = -EINVAL; |
2918 | } | 2905 | } |
2919 | 2906 | ||
2907 | mutex_unlock(&priv->mutex); | ||
2920 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 2908 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
2921 | 2909 | ||
2922 | return ret; | 2910 | return ret; |
@@ -3121,87 +3109,6 @@ static ssize_t store_tx_power(struct device *d, | |||
3121 | 3109 | ||
3122 | static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, show_tx_power, store_tx_power); | 3110 | static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, show_tx_power, store_tx_power); |
3123 | 3111 | ||
3124 | static ssize_t show_flags(struct device *d, | ||
3125 | struct device_attribute *attr, char *buf) | ||
3126 | { | ||
3127 | struct iwl_priv *priv = dev_get_drvdata(d); | ||
3128 | |||
3129 | return sprintf(buf, "0x%04X\n", priv->active_rxon.flags); | ||
3130 | } | ||
3131 | |||
3132 | static ssize_t store_flags(struct device *d, | ||
3133 | struct device_attribute *attr, | ||
3134 | const char *buf, size_t count) | ||
3135 | { | ||
3136 | struct iwl_priv *priv = dev_get_drvdata(d); | ||
3137 | unsigned long val; | ||
3138 | u32 flags; | ||
3139 | int ret = strict_strtoul(buf, 0, &val); | ||
3140 | if (ret) | ||
3141 | return ret; | ||
3142 | flags = (u32)val; | ||
3143 | |||
3144 | mutex_lock(&priv->mutex); | ||
3145 | if (le32_to_cpu(priv->staging_rxon.flags) != flags) { | ||
3146 | /* Cancel any currently running scans... */ | ||
3147 | if (iwl_scan_cancel_timeout(priv, 100)) | ||
3148 | IWL_WARN(priv, "Could not cancel scan.\n"); | ||
3149 | else { | ||
3150 | IWL_DEBUG_INFO(priv, "Commit rxon.flags = 0x%04X\n", flags); | ||
3151 | priv->staging_rxon.flags = cpu_to_le32(flags); | ||
3152 | iwlcore_commit_rxon(priv); | ||
3153 | } | ||
3154 | } | ||
3155 | mutex_unlock(&priv->mutex); | ||
3156 | |||
3157 | return count; | ||
3158 | } | ||
3159 | |||
3160 | static DEVICE_ATTR(flags, S_IWUSR | S_IRUGO, show_flags, store_flags); | ||
3161 | |||
3162 | static ssize_t show_filter_flags(struct device *d, | ||
3163 | struct device_attribute *attr, char *buf) | ||
3164 | { | ||
3165 | struct iwl_priv *priv = dev_get_drvdata(d); | ||
3166 | |||
3167 | return sprintf(buf, "0x%04X\n", | ||
3168 | le32_to_cpu(priv->active_rxon.filter_flags)); | ||
3169 | } | ||
3170 | |||
3171 | static ssize_t store_filter_flags(struct device *d, | ||
3172 | struct device_attribute *attr, | ||
3173 | const char *buf, size_t count) | ||
3174 | { | ||
3175 | struct iwl_priv *priv = dev_get_drvdata(d); | ||
3176 | unsigned long val; | ||
3177 | u32 filter_flags; | ||
3178 | int ret = strict_strtoul(buf, 0, &val); | ||
3179 | if (ret) | ||
3180 | return ret; | ||
3181 | filter_flags = (u32)val; | ||
3182 | |||
3183 | mutex_lock(&priv->mutex); | ||
3184 | if (le32_to_cpu(priv->staging_rxon.filter_flags) != filter_flags) { | ||
3185 | /* Cancel any currently running scans... */ | ||
3186 | if (iwl_scan_cancel_timeout(priv, 100)) | ||
3187 | IWL_WARN(priv, "Could not cancel scan.\n"); | ||
3188 | else { | ||
3189 | IWL_DEBUG_INFO(priv, "Committing rxon.filter_flags = " | ||
3190 | "0x%04X\n", filter_flags); | ||
3191 | priv->staging_rxon.filter_flags = | ||
3192 | cpu_to_le32(filter_flags); | ||
3193 | iwlcore_commit_rxon(priv); | ||
3194 | } | ||
3195 | } | ||
3196 | mutex_unlock(&priv->mutex); | ||
3197 | |||
3198 | return count; | ||
3199 | } | ||
3200 | |||
3201 | static DEVICE_ATTR(filter_flags, S_IWUSR | S_IRUGO, show_filter_flags, | ||
3202 | store_filter_flags); | ||
3203 | |||
3204 | |||
3205 | static ssize_t show_statistics(struct device *d, | 3112 | static ssize_t show_statistics(struct device *d, |
3206 | struct device_attribute *attr, char *buf) | 3113 | struct device_attribute *attr, char *buf) |
3207 | { | 3114 | { |
@@ -3391,7 +3298,6 @@ static int iwl_init_drv(struct iwl_priv *priv) | |||
3391 | priv->qos_data.qos_active = 0; | 3298 | priv->qos_data.qos_active = 0; |
3392 | priv->qos_data.qos_cap.val = 0; | 3299 | priv->qos_data.qos_cap.val = 0; |
3393 | 3300 | ||
3394 | priv->rates_mask = IWL_RATES_MASK; | ||
3395 | /* Set the tx_power_user_lmt to the lowest power level | 3301 | /* Set the tx_power_user_lmt to the lowest power level |
3396 | * this value will get overwritten by channel max power avg | 3302 | * this value will get overwritten by channel max power avg |
3397 | * from eeprom */ | 3303 | * from eeprom */ |
@@ -3427,8 +3333,6 @@ static void iwl_uninit_drv(struct iwl_priv *priv) | |||
3427 | } | 3333 | } |
3428 | 3334 | ||
3429 | static struct attribute *iwl_sysfs_entries[] = { | 3335 | static struct attribute *iwl_sysfs_entries[] = { |
3430 | &dev_attr_flags.attr, | ||
3431 | &dev_attr_filter_flags.attr, | ||
3432 | &dev_attr_statistics.attr, | 3336 | &dev_attr_statistics.attr, |
3433 | &dev_attr_temperature.attr, | 3337 | &dev_attr_temperature.attr, |
3434 | &dev_attr_tx_power.attr, | 3338 | &dev_attr_tx_power.attr, |