diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-07-20 19:40:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-04 15:09:11 -0400 |
commit | 3ac7f14694dd38273d9d96f1c873233d71190c15 (patch) | |
tree | 4ea3479c3bdba35bc49866356b44454910f9071e /drivers | |
parent | 25bc2deda9e8a430ed49f507a1120fb2c86abf33 (diff) |
iwlwifi: fix checkpatch.pl errors
This patch fixes errors reported by checkpatch in iwlwifi drivers
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debug.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-eeprom.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 52 |
11 files changed, 55 insertions, 60 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 56a9361a847f..b3931f6135a4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -795,8 +795,7 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv, | |||
795 | struct ieee80211_mgmt *mgmt = | 795 | struct ieee80211_mgmt *mgmt = |
796 | (struct ieee80211_mgmt *)header; | 796 | (struct ieee80211_mgmt *)header; |
797 | __le32 *pos; | 797 | __le32 *pos; |
798 | pos = | 798 | pos = (__le32 *)&mgmt->u.beacon. |
799 | (__le32 *) & mgmt->u.beacon. | ||
800 | timestamp; | 799 | timestamp; |
801 | priv->timestamp0 = le32_to_cpu(pos[0]); | 800 | priv->timestamp0 = le32_to_cpu(pos[0]); |
802 | priv->timestamp1 = le32_to_cpu(pos[1]); | 801 | priv->timestamp1 = le32_to_cpu(pos[1]); |
@@ -1509,7 +1508,7 @@ static int iwl3945_hw_reg_adjust_power_by_temp(int new_reading, int old_reading) | |||
1509 | */ | 1508 | */ |
1510 | static inline int iwl3945_hw_reg_temp_out_of_range(int temperature) | 1509 | static inline int iwl3945_hw_reg_temp_out_of_range(int temperature) |
1511 | { | 1510 | { |
1512 | return (((temperature < -260) || (temperature > 25)) ? 1 : 0); | 1511 | return ((temperature < -260) || (temperature > 25)) ? 1 : 0; |
1513 | } | 1512 | } |
1514 | 1513 | ||
1515 | int iwl3945_hw_get_temperature(struct iwl3945_priv *priv) | 1514 | int iwl3945_hw_get_temperature(struct iwl3945_priv *priv) |
@@ -2630,7 +2629,7 @@ unsigned int iwl3945_hw_get_beacon_cmd(struct iwl3945_priv *priv, | |||
2630 | tx_beacon_cmd->tx.supp_rates[1] = | 2629 | tx_beacon_cmd->tx.supp_rates[1] = |
2631 | (IWL_CCK_BASIC_RATES_MASK & 0xF); | 2630 | (IWL_CCK_BASIC_RATES_MASK & 0xF); |
2632 | 2631 | ||
2633 | return (sizeof(struct iwl3945_tx_beacon_cmd) + frame_size); | 2632 | return sizeof(struct iwl3945_tx_beacon_cmd) + frame_size; |
2634 | } | 2633 | } |
2635 | 2634 | ||
2636 | void iwl3945_hw_rx_handler_setup(struct iwl3945_priv *priv) | 2635 | void iwl3945_hw_rx_handler_setup(struct iwl3945_priv *priv) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index f356f4f0944b..718f9d9e4947 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -1515,11 +1515,11 @@ static int iwl4965_fill_txpower_tbl(struct iwl_priv *priv, u8 band, u16 channel, | |||
1515 | c, atten_value, power_index, | 1515 | c, atten_value, power_index, |
1516 | tx_power.s.radio_tx_gain[c], | 1516 | tx_power.s.radio_tx_gain[c], |
1517 | tx_power.s.dsp_predis_atten[c]); | 1517 | tx_power.s.dsp_predis_atten[c]); |
1518 | }/* for each chain */ | 1518 | } /* for each chain */ |
1519 | 1519 | ||
1520 | tx_power_tbl->power_tbl[i].dw = cpu_to_le32(tx_power.dw); | 1520 | tx_power_tbl->power_tbl[i].dw = cpu_to_le32(tx_power.dw); |
1521 | 1521 | ||
1522 | }/* for each rate */ | 1522 | } /* for each rate */ |
1523 | 1523 | ||
1524 | return 0; | 1524 | return 0; |
1525 | } | 1525 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 076d3560302b..f7bbd12193f9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -1131,7 +1131,7 @@ static void iwl5000_txq_set_sched(struct iwl_priv *priv, u32 mask) | |||
1131 | 1131 | ||
1132 | static inline u32 iwl5000_get_scd_ssn(struct iwl5000_tx_resp *tx_resp) | 1132 | static inline u32 iwl5000_get_scd_ssn(struct iwl5000_tx_resp *tx_resp) |
1133 | { | 1133 | { |
1134 | return le32_to_cpup((__le32*)&tx_resp->status + | 1134 | return le32_to_cpup((__le32 *)&tx_resp->status + |
1135 | tx_resp->frame_count) & MAX_SN; | 1135 | tx_resp->frame_count) & MAX_SN; |
1136 | } | 1136 | } |
1137 | 1137 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index b498b58d81fa..754fef5b592f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |||
@@ -245,7 +245,7 @@ static void rs_rate_scale_clear_window(struct iwl_rate_scale_data *window) | |||
245 | 245 | ||
246 | static inline u8 rs_is_valid_ant(u8 valid_antenna, u8 ant_type) | 246 | static inline u8 rs_is_valid_ant(u8 valid_antenna, u8 ant_type) |
247 | { | 247 | { |
248 | return ((ant_type & valid_antenna) == ant_type); | 248 | return (ant_type & valid_antenna) == ant_type; |
249 | } | 249 | } |
250 | 250 | ||
251 | /* | 251 | /* |
@@ -384,9 +384,9 @@ static void rs_tl_turn_on_agg(struct iwl_priv *priv, u8 tid, | |||
384 | 384 | ||
385 | static inline int get_num_of_ant_from_rate(u32 rate_n_flags) | 385 | static inline int get_num_of_ant_from_rate(u32 rate_n_flags) |
386 | { | 386 | { |
387 | return (!!(rate_n_flags & RATE_MCS_ANT_A_MSK) + | 387 | return !!(rate_n_flags & RATE_MCS_ANT_A_MSK) + |
388 | !!(rate_n_flags & RATE_MCS_ANT_B_MSK) + | 388 | !!(rate_n_flags & RATE_MCS_ANT_B_MSK) + |
389 | !!(rate_n_flags & RATE_MCS_ANT_C_MSK)); | 389 | !!(rate_n_flags & RATE_MCS_ANT_C_MSK); |
390 | } | 390 | } |
391 | 391 | ||
392 | /** | 392 | /** |
@@ -620,9 +620,9 @@ static int rs_toggle_antenna(u32 valid_ant, u32 *rate_n_flags, | |||
620 | #if 0 | 620 | #if 0 |
621 | static inline u8 rs_use_green(struct iwl_priv *priv, struct ieee80211_conf *conf) | 621 | static inline u8 rs_use_green(struct iwl_priv *priv, struct ieee80211_conf *conf) |
622 | { | 622 | { |
623 | return ((conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) && | 623 | return (conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) && |
624 | priv->current_ht_config.is_green_field && | 624 | priv->current_ht_config.is_green_field && |
625 | !priv->current_ht_config.non_GF_STA_present); | 625 | !priv->current_ht_config.non_GF_STA_present; |
626 | } | 626 | } |
627 | #endif | 627 | #endif |
628 | static inline u8 rs_use_green(struct iwl_priv *priv, struct ieee80211_conf *conf) | 628 | static inline u8 rs_use_green(struct iwl_priv *priv, struct ieee80211_conf *conf) |
@@ -2157,7 +2157,7 @@ static void *rs_alloc_sta(void *priv_rate, gfp_t gfp) | |||
2157 | 2157 | ||
2158 | for (j = 0; j < LQ_SIZE; j++) | 2158 | for (j = 0; j < LQ_SIZE; j++) |
2159 | for (i = 0; i < IWL_RATE_COUNT; i++) | 2159 | for (i = 0; i < IWL_RATE_COUNT; i++) |
2160 | rs_rate_scale_clear_window(&(lq_sta->lq_info[j].win[i])); | 2160 | rs_rate_scale_clear_window(&lq_sta->lq_info[j].win[i]); |
2161 | 2161 | ||
2162 | return lq_sta; | 2162 | return lq_sta; |
2163 | } | 2163 | } |
@@ -2179,7 +2179,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta, | |||
2179 | sta->txrate_idx = 3; | 2179 | sta->txrate_idx = 3; |
2180 | for (j = 0; j < LQ_SIZE; j++) | 2180 | for (j = 0; j < LQ_SIZE; j++) |
2181 | for (i = 0; i < IWL_RATE_COUNT; i++) | 2181 | for (i = 0; i < IWL_RATE_COUNT; i++) |
2182 | rs_rate_scale_clear_window(&(lq_sta->lq_info[j].win[i])); | 2182 | rs_rate_scale_clear_window(&lq_sta->lq_info[j].win[i]); |
2183 | 2183 | ||
2184 | IWL_DEBUG_RATE("LQ: *** rate scale global init ***\n"); | 2184 | IWL_DEBUG_RATE("LQ: *** rate scale global init ***\n"); |
2185 | /* TODO: what is a good starting rate for STA? About middle? Maybe not | 2185 | /* TODO: what is a good starting rate for STA? About middle? Maybe not |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index f71b3f3f81ba..4ff0636dbddc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -2476,7 +2476,7 @@ static void iwl4965_post_associate(struct iwl_priv *priv) | |||
2476 | unsigned long flags; | 2476 | unsigned long flags; |
2477 | 2477 | ||
2478 | if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { | 2478 | if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { |
2479 | IWL_ERROR("%s Should not be called in AP mode\n", __FUNCTION__); | 2479 | IWL_ERROR("%s Should not be called in AP mode\n", __func__); |
2480 | return; | 2480 | return; |
2481 | } | 2481 | } |
2482 | 2482 | ||
@@ -2552,7 +2552,7 @@ static void iwl4965_post_associate(struct iwl_priv *priv) | |||
2552 | 2552 | ||
2553 | default: | 2553 | default: |
2554 | IWL_ERROR("%s Should not be called in %d mode\n", | 2554 | IWL_ERROR("%s Should not be called in %d mode\n", |
2555 | __FUNCTION__, priv->iw_mode); | 2555 | __func__, priv->iw_mode); |
2556 | break; | 2556 | break; |
2557 | } | 2557 | } |
2558 | 2558 | ||
@@ -3794,7 +3794,7 @@ static ssize_t show_measurement(struct device *d, | |||
3794 | struct iwl_priv *priv = dev_get_drvdata(d); | 3794 | struct iwl_priv *priv = dev_get_drvdata(d); |
3795 | struct iwl4965_spectrum_notification measure_report; | 3795 | struct iwl4965_spectrum_notification measure_report; |
3796 | u32 size = sizeof(measure_report), len = 0, ofs = 0; | 3796 | u32 size = sizeof(measure_report), len = 0, ofs = 0; |
3797 | u8 *data = (u8 *) & measure_report; | 3797 | u8 *data = (u8 *)&measure_report; |
3798 | unsigned long flags; | 3798 | unsigned long flags; |
3799 | 3799 | ||
3800 | spin_lock_irqsave(&priv->lock, flags); | 3800 | spin_lock_irqsave(&priv->lock, flags); |
@@ -3934,7 +3934,7 @@ static ssize_t show_power_level(struct device *d, | |||
3934 | p += sprintf(p, "\tMODE:%s", (mode < IWL_POWER_AUTO)?"fixed":"auto"); | 3934 | p += sprintf(p, "\tMODE:%s", (mode < IWL_POWER_AUTO)?"fixed":"auto"); |
3935 | p += sprintf(p, "\tINDEX:%d", level); | 3935 | p += sprintf(p, "\tINDEX:%d", level); |
3936 | p += sprintf(p, "\n"); | 3936 | p += sprintf(p, "\n"); |
3937 | return (p - buf + 1); | 3937 | return p - buf + 1; |
3938 | } | 3938 | } |
3939 | 3939 | ||
3940 | static DEVICE_ATTR(power_level, S_IWUSR | S_IRUSR, show_power_level, | 3940 | static DEVICE_ATTR(power_level, S_IWUSR | S_IRUSR, show_power_level, |
@@ -4009,7 +4009,7 @@ static ssize_t show_statistics(struct device *d, | |||
4009 | struct iwl_priv *priv = dev_get_drvdata(d); | 4009 | struct iwl_priv *priv = dev_get_drvdata(d); |
4010 | u32 size = sizeof(struct iwl_notif_statistics); | 4010 | u32 size = sizeof(struct iwl_notif_statistics); |
4011 | u32 len = 0, ofs = 0; | 4011 | u32 len = 0, ofs = 0; |
4012 | u8 *data = (u8 *) & priv->statistics; | 4012 | u8 *data = (u8 *)&priv->statistics; |
4013 | int rc = 0; | 4013 | int rc = 0; |
4014 | 4014 | ||
4015 | if (!iwl_is_alive(priv)) | 4015 | if (!iwl_is_alive(priv)) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 96beacf703a6..9bd61809129f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -383,8 +383,8 @@ void iwl_reset_qos(struct iwl_priv *priv) | |||
383 | } | 383 | } |
384 | EXPORT_SYMBOL(iwl_reset_qos); | 384 | EXPORT_SYMBOL(iwl_reset_qos); |
385 | 385 | ||
386 | #define MAX_BIT_RATE_40_MHZ 0x96; /* 150 Mbps */ | 386 | #define MAX_BIT_RATE_40_MHZ 0x96 /* 150 Mbps */ |
387 | #define MAX_BIT_RATE_20_MHZ 0x48; /* 72 Mbps */ | 387 | #define MAX_BIT_RATE_20_MHZ 0x48 /* 72 Mbps */ |
388 | static void iwlcore_init_ht_hw_capab(const struct iwl_priv *priv, | 388 | static void iwlcore_init_ht_hw_capab(const struct iwl_priv *priv, |
389 | struct ieee80211_ht_info *ht_info, | 389 | struct ieee80211_ht_info *ht_info, |
390 | enum ieee80211_band band) | 390 | enum ieee80211_band band) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h index d6d729e86bdb..b4ffd33ef98c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debug.h +++ b/drivers/net/wireless/iwlwifi/iwl-debug.h | |||
@@ -33,12 +33,12 @@ | |||
33 | #define IWL_DEBUG(level, fmt, args...) \ | 33 | #define IWL_DEBUG(level, fmt, args...) \ |
34 | do { if (priv->debug_level & (level)) \ | 34 | do { if (priv->debug_level & (level)) \ |
35 | dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \ | 35 | dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \ |
36 | in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) | 36 | in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0) |
37 | 37 | ||
38 | #define IWL_DEBUG_LIMIT(level, fmt, args...) \ | 38 | #define IWL_DEBUG_LIMIT(level, fmt, args...) \ |
39 | do { if ((priv->debug_level & (level)) && net_ratelimit()) \ | 39 | do { if ((priv->debug_level & (level)) && net_ratelimit()) \ |
40 | dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \ | 40 | dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \ |
41 | in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) | 41 | in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0) |
42 | 42 | ||
43 | #ifdef CONFIG_IWLWIFI_DEBUGFS | 43 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
44 | struct iwl_debugfs { | 44 | struct iwl_debugfs { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index ed948dc59b3d..20db0eb636a8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -231,7 +231,7 @@ static ssize_t iwl_dbgfs_stations_read(struct file *file, char __user *user_buf, | |||
231 | DECLARE_MAC_BUF(mac); | 231 | DECLARE_MAC_BUF(mac); |
232 | 232 | ||
233 | buf = kmalloc(bufsz, GFP_KERNEL); | 233 | buf = kmalloc(bufsz, GFP_KERNEL); |
234 | if(!buf) | 234 | if (!buf) |
235 | return -ENOMEM; | 235 | return -ENOMEM; |
236 | 236 | ||
237 | pos += scnprintf(buf + pos, bufsz - pos, "num of stations: %d\n\n", | 237 | pos += scnprintf(buf + pos, bufsz - pos, "num of stations: %d\n\n", |
@@ -364,16 +364,19 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) | |||
364 | { | 364 | { |
365 | struct iwl_debugfs *dbgfs; | 365 | struct iwl_debugfs *dbgfs; |
366 | struct dentry *phyd = priv->hw->wiphy->debugfsdir; | 366 | struct dentry *phyd = priv->hw->wiphy->debugfsdir; |
367 | int ret = 0; | ||
367 | 368 | ||
368 | dbgfs = kzalloc(sizeof(struct iwl_debugfs), GFP_KERNEL); | 369 | dbgfs = kzalloc(sizeof(struct iwl_debugfs), GFP_KERNEL); |
369 | if (!dbgfs) { | 370 | if (!dbgfs) { |
371 | ret = -ENOMEM; | ||
370 | goto err; | 372 | goto err; |
371 | } | 373 | } |
372 | 374 | ||
373 | priv->dbgfs = dbgfs; | 375 | priv->dbgfs = dbgfs; |
374 | dbgfs->name = name; | 376 | dbgfs->name = name; |
375 | dbgfs->dir_drv = debugfs_create_dir(name, phyd); | 377 | dbgfs->dir_drv = debugfs_create_dir(name, phyd); |
376 | if (!dbgfs->dir_drv || IS_ERR(dbgfs->dir_drv)){ | 378 | if (!dbgfs->dir_drv || IS_ERR(dbgfs->dir_drv)) { |
379 | ret = -ENOENT; | ||
377 | goto err; | 380 | goto err; |
378 | } | 381 | } |
379 | 382 | ||
@@ -394,7 +397,7 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) | |||
394 | err: | 397 | err: |
395 | IWL_ERROR("Can't open the debugfs directory\n"); | 398 | IWL_ERROR("Can't open the debugfs directory\n"); |
396 | iwl_dbgfs_unregister(priv); | 399 | iwl_dbgfs_unregister(priv); |
397 | return -ENOENT; | 400 | return ret; |
398 | } | 401 | } |
399 | EXPORT_SYMBOL(iwl_dbgfs_register); | 402 | EXPORT_SYMBOL(iwl_dbgfs_register); |
400 | 403 | ||
@@ -404,7 +407,7 @@ EXPORT_SYMBOL(iwl_dbgfs_register); | |||
404 | */ | 407 | */ |
405 | void iwl_dbgfs_unregister(struct iwl_priv *priv) | 408 | void iwl_dbgfs_unregister(struct iwl_priv *priv) |
406 | { | 409 | { |
407 | if (!(priv->dbgfs)) | 410 | if (!priv->dbgfs) |
408 | return; | 411 | return; |
409 | 412 | ||
410 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_eeprom); | 413 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_eeprom); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index 4a08a1b50979..bce53830b301 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c | |||
@@ -273,8 +273,7 @@ EXPORT_SYMBOL(iwl_eeprom_init); | |||
273 | 273 | ||
274 | void iwl_eeprom_free(struct iwl_priv *priv) | 274 | void iwl_eeprom_free(struct iwl_priv *priv) |
275 | { | 275 | { |
276 | if(priv->eeprom) | 276 | kfree(priv->eeprom); |
277 | kfree(priv->eeprom); | ||
278 | priv->eeprom = NULL; | 277 | priv->eeprom = NULL; |
279 | } | 278 | } |
280 | EXPORT_SYMBOL(iwl_eeprom_free); | 279 | EXPORT_SYMBOL(iwl_eeprom_free); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 10af82170f6b..60a6e0106036 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -823,7 +823,7 @@ int iwl_send_lq_cmd(struct iwl_priv *priv, | |||
823 | if (lq->sta_id == 0xFF) | 823 | if (lq->sta_id == 0xFF) |
824 | lq->sta_id = IWL_AP_ID; | 824 | lq->sta_id = IWL_AP_ID; |
825 | 825 | ||
826 | iwl_dump_lq_cmd(priv,lq); | 826 | iwl_dump_lq_cmd(priv, lq); |
827 | 827 | ||
828 | if (iwl_is_associated(priv) && priv->assoc_station_added) | 828 | if (iwl_is_associated(priv) && priv->assoc_station_added) |
829 | return iwl_send_cmd(priv, &cmd); | 829 | return iwl_send_cmd(priv, &cmd); |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 7c82ecfa30a4..eb41b02b506d 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -275,10 +275,8 @@ static int iwl3945_tx_queue_alloc(struct iwl3945_priv *priv, | |||
275 | return 0; | 275 | return 0; |
276 | 276 | ||
277 | error: | 277 | error: |
278 | if (txq->txb) { | 278 | kfree(txq->txb); |
279 | kfree(txq->txb); | 279 | txq->txb = NULL; |
280 | txq->txb = NULL; | ||
281 | } | ||
282 | 280 | ||
283 | return -ENOMEM; | 281 | return -ENOMEM; |
284 | } | 282 | } |
@@ -365,10 +363,8 @@ void iwl3945_tx_queue_free(struct iwl3945_priv *priv, struct iwl3945_tx_queue *t | |||
365 | txq->q.n_bd, txq->bd, txq->q.dma_addr); | 363 | txq->q.n_bd, txq->bd, txq->q.dma_addr); |
366 | 364 | ||
367 | /* De-alloc array of per-TFD driver data */ | 365 | /* De-alloc array of per-TFD driver data */ |
368 | if (txq->txb) { | 366 | kfree(txq->txb); |
369 | kfree(txq->txb); | 367 | txq->txb = NULL; |
370 | txq->txb = NULL; | ||
371 | } | ||
372 | 368 | ||
373 | /* 0-fill queue descriptor structure */ | 369 | /* 0-fill queue descriptor structure */ |
374 | memset(txq, 0, sizeof(*txq)); | 370 | memset(txq, 0, sizeof(*txq)); |
@@ -2703,9 +2699,8 @@ static int iwl3945_tx_skb(struct iwl3945_priv *priv, struct sk_buff *skb) | |||
2703 | 2699 | ||
2704 | if (!ieee80211_has_morefrags(hdr->frame_control)) { | 2700 | if (!ieee80211_has_morefrags(hdr->frame_control)) { |
2705 | txq->need_update = 1; | 2701 | txq->need_update = 1; |
2706 | if (qc) { | 2702 | if (qc) |
2707 | priv->stations[sta_id].tid[tid].seq_number = seq_number; | 2703 | priv->stations[sta_id].tid[tid].seq_number = seq_number; |
2708 | } | ||
2709 | } else { | 2704 | } else { |
2710 | wait_write_ptr = 1; | 2705 | wait_write_ptr = 1; |
2711 | txq->need_update = 0; | 2706 | txq->need_update = 0; |
@@ -3813,7 +3808,7 @@ int iwl3945_calc_db_from_ratio(int sig_ratio) | |||
3813 | /* 100:1 or higher, divide by 10 and use table, | 3808 | /* 100:1 or higher, divide by 10 and use table, |
3814 | * add 20 dB to make up for divide by 10 */ | 3809 | * add 20 dB to make up for divide by 10 */ |
3815 | if (sig_ratio >= 100) | 3810 | if (sig_ratio >= 100) |
3816 | return (20 + (int)ratio2dB[sig_ratio/10]); | 3811 | return 20 + (int)ratio2dB[sig_ratio/10]; |
3817 | 3812 | ||
3818 | /* We shouldn't see this */ | 3813 | /* We shouldn't see this */ |
3819 | if (sig_ratio < 1) | 3814 | if (sig_ratio < 1) |
@@ -5088,7 +5083,7 @@ static void iwl3945_dealloc_ucode_pci(struct iwl3945_priv *priv) | |||
5088 | * iwl3945_verify_inst_full - verify runtime uCode image in card vs. host, | 5083 | * iwl3945_verify_inst_full - verify runtime uCode image in card vs. host, |
5089 | * looking at all data. | 5084 | * looking at all data. |
5090 | */ | 5085 | */ |
5091 | static int iwl3945_verify_inst_full(struct iwl3945_priv *priv, __le32 * image, u32 len) | 5086 | static int iwl3945_verify_inst_full(struct iwl3945_priv *priv, __le32 *image, u32 len) |
5092 | { | 5087 | { |
5093 | u32 val; | 5088 | u32 val; |
5094 | u32 save_len = len; | 5089 | u32 save_len = len; |
@@ -5237,7 +5232,7 @@ static int iwl3945_verify_bsm(struct iwl3945_priv *priv) | |||
5237 | val = iwl3945_read_prph(priv, BSM_WR_DWCOUNT_REG); | 5232 | val = iwl3945_read_prph(priv, BSM_WR_DWCOUNT_REG); |
5238 | for (reg = BSM_SRAM_LOWER_BOUND; | 5233 | for (reg = BSM_SRAM_LOWER_BOUND; |
5239 | reg < BSM_SRAM_LOWER_BOUND + len; | 5234 | reg < BSM_SRAM_LOWER_BOUND + len; |
5240 | reg += sizeof(u32), image ++) { | 5235 | reg += sizeof(u32), image++) { |
5241 | val = iwl3945_read_prph(priv, reg); | 5236 | val = iwl3945_read_prph(priv, reg); |
5242 | if (val != le32_to_cpu(*image)) { | 5237 | if (val != le32_to_cpu(*image)) { |
5243 | IWL_ERROR("BSM uCode verification failed at " | 5238 | IWL_ERROR("BSM uCode verification failed at " |
@@ -6336,7 +6331,7 @@ static void iwl3945_bg_post_associate(struct work_struct *data) | |||
6336 | DECLARE_MAC_BUF(mac); | 6331 | DECLARE_MAC_BUF(mac); |
6337 | 6332 | ||
6338 | if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { | 6333 | if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { |
6339 | IWL_ERROR("%s Should not be called in AP mode\n", __FUNCTION__); | 6334 | IWL_ERROR("%s Should not be called in AP mode\n", __func__); |
6340 | return; | 6335 | return; |
6341 | } | 6336 | } |
6342 | 6337 | ||
@@ -6417,7 +6412,7 @@ static void iwl3945_bg_post_associate(struct work_struct *data) | |||
6417 | 6412 | ||
6418 | default: | 6413 | default: |
6419 | IWL_ERROR("%s Should not be called in %d mode\n", | 6414 | IWL_ERROR("%s Should not be called in %d mode\n", |
6420 | __FUNCTION__, priv->iw_mode); | 6415 | __func__, priv->iw_mode); |
6421 | break; | 6416 | break; |
6422 | } | 6417 | } |
6423 | 6418 | ||
@@ -7456,7 +7451,7 @@ static ssize_t show_measurement(struct device *d, | |||
7456 | struct iwl3945_priv *priv = dev_get_drvdata(d); | 7451 | struct iwl3945_priv *priv = dev_get_drvdata(d); |
7457 | struct iwl3945_spectrum_notification measure_report; | 7452 | struct iwl3945_spectrum_notification measure_report; |
7458 | u32 size = sizeof(measure_report), len = 0, ofs = 0; | 7453 | u32 size = sizeof(measure_report), len = 0, ofs = 0; |
7459 | u8 *data = (u8 *) & measure_report; | 7454 | u8 *data = (u8 *)&measure_report; |
7460 | unsigned long flags; | 7455 | unsigned long flags; |
7461 | 7456 | ||
7462 | spin_lock_irqsave(&priv->lock, flags); | 7457 | spin_lock_irqsave(&priv->lock, flags); |
@@ -7627,7 +7622,7 @@ static ssize_t show_power_level(struct device *d, | |||
7627 | else | 7622 | else |
7628 | p += sprintf(p, " \n"); | 7623 | p += sprintf(p, " \n"); |
7629 | 7624 | ||
7630 | return (p - buf + 1); | 7625 | return p - buf + 1; |
7631 | 7626 | ||
7632 | } | 7627 | } |
7633 | 7628 | ||
@@ -7649,7 +7644,7 @@ static ssize_t show_statistics(struct device *d, | |||
7649 | struct iwl3945_priv *priv = dev_get_drvdata(d); | 7644 | struct iwl3945_priv *priv = dev_get_drvdata(d); |
7650 | u32 size = sizeof(struct iwl3945_notif_statistics); | 7645 | u32 size = sizeof(struct iwl3945_notif_statistics); |
7651 | u32 len = 0, ofs = 0; | 7646 | u32 len = 0, ofs = 0; |
7652 | u8 *data = (u8 *) & priv->statistics; | 7647 | u8 *data = (u8 *)&priv->statistics; |
7653 | int rc = 0; | 7648 | int rc = 0; |
7654 | 7649 | ||
7655 | if (!iwl3945_is_alive(priv)) | 7650 | if (!iwl3945_is_alive(priv)) |
@@ -8003,16 +7998,16 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
8003 | 7998 | ||
8004 | /* nic init */ | 7999 | /* nic init */ |
8005 | iwl3945_set_bit(priv, CSR_GIO_CHICKEN_BITS, | 8000 | iwl3945_set_bit(priv, CSR_GIO_CHICKEN_BITS, |
8006 | CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER); | 8001 | CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER); |
8007 | 8002 | ||
8008 | iwl3945_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); | 8003 | iwl3945_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); |
8009 | err = iwl3945_poll_bit(priv, CSR_GP_CNTRL, | 8004 | err = iwl3945_poll_bit(priv, CSR_GP_CNTRL, |
8010 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, | 8005 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, |
8011 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); | 8006 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); |
8012 | if (err < 0) { | 8007 | if (err < 0) { |
8013 | IWL_DEBUG_INFO("Failed to init the card\n"); | 8008 | IWL_DEBUG_INFO("Failed to init the card\n"); |
8014 | goto out_remove_sysfs; | 8009 | goto out_remove_sysfs; |
8015 | } | 8010 | } |
8016 | /* Read the EEPROM */ | 8011 | /* Read the EEPROM */ |
8017 | err = iwl3945_eeprom_init(priv); | 8012 | err = iwl3945_eeprom_init(priv); |
8018 | if (err) { | 8013 | if (err) { |
@@ -8114,9 +8109,8 @@ static void __devexit iwl3945_pci_remove(struct pci_dev *pdev) | |||
8114 | iwl3945_unset_hw_setting(priv); | 8109 | iwl3945_unset_hw_setting(priv); |
8115 | iwl3945_clear_stations_table(priv); | 8110 | iwl3945_clear_stations_table(priv); |
8116 | 8111 | ||
8117 | if (priv->mac80211_registered) { | 8112 | if (priv->mac80211_registered) |
8118 | ieee80211_unregister_hw(priv->hw); | 8113 | ieee80211_unregister_hw(priv->hw); |
8119 | } | ||
8120 | 8114 | ||
8121 | /*netif_stop_queue(dev); */ | 8115 | /*netif_stop_queue(dev); */ |
8122 | flush_workqueue(priv->workqueue); | 8116 | flush_workqueue(priv->workqueue); |