Commit 3ac7f146 authored by Tomas Winkler's avatar Tomas Winkler Committed by John W. Linville

iwlwifi: fix checkpatch.pl errors

This patch fixes errors reported by checkpatch in iwlwifi drivers
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 25bc2ded
...@@ -795,8 +795,7 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv, ...@@ -795,8 +795,7 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv,
struct ieee80211_mgmt *mgmt = struct ieee80211_mgmt *mgmt =
(struct ieee80211_mgmt *)header; (struct ieee80211_mgmt *)header;
__le32 *pos; __le32 *pos;
pos = pos = (__le32 *)&mgmt->u.beacon.
(__le32 *) & mgmt->u.beacon.
timestamp; timestamp;
priv->timestamp0 = le32_to_cpu(pos[0]); priv->timestamp0 = le32_to_cpu(pos[0]);
priv->timestamp1 = le32_to_cpu(pos[1]); 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,7 +1508,7 @@ static int iwl3945_hw_reg_adjust_power_by_temp(int new_reading, int old_reading)
*/ */
static inline int iwl3945_hw_reg_temp_out_of_range(int temperature) static inline int iwl3945_hw_reg_temp_out_of_range(int temperature)
{ {
return (((temperature < -260) || (temperature > 25)) ? 1 : 0); return ((temperature < -260) || (temperature > 25)) ? 1 : 0;
} }
int iwl3945_hw_get_temperature(struct iwl3945_priv *priv) 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,7 +2629,7 @@ unsigned int iwl3945_hw_get_beacon_cmd(struct iwl3945_priv *priv,
tx_beacon_cmd->tx.supp_rates[1] = tx_beacon_cmd->tx.supp_rates[1] =
(IWL_CCK_BASIC_RATES_MASK & 0xF); (IWL_CCK_BASIC_RATES_MASK & 0xF);
return (sizeof(struct iwl3945_tx_beacon_cmd) + frame_size); return sizeof(struct iwl3945_tx_beacon_cmd) + frame_size;
} }
void iwl3945_hw_rx_handler_setup(struct iwl3945_priv *priv) void iwl3945_hw_rx_handler_setup(struct iwl3945_priv *priv)
......
...@@ -1515,11 +1515,11 @@ static int iwl4965_fill_txpower_tbl(struct iwl_priv *priv, u8 band, u16 channel, ...@@ -1515,11 +1515,11 @@ static int iwl4965_fill_txpower_tbl(struct iwl_priv *priv, u8 band, u16 channel,
c, atten_value, power_index, c, atten_value, power_index,
tx_power.s.radio_tx_gain[c], tx_power.s.radio_tx_gain[c],
tx_power.s.dsp_predis_atten[c]); tx_power.s.dsp_predis_atten[c]);
}/* for each chain */ } /* for each chain */
tx_power_tbl->power_tbl[i].dw = cpu_to_le32(tx_power.dw); tx_power_tbl->power_tbl[i].dw = cpu_to_le32(tx_power.dw);
}/* for each rate */ } /* for each rate */
return 0; return 0;
} }
......
...@@ -1131,7 +1131,7 @@ static void iwl5000_txq_set_sched(struct iwl_priv *priv, u32 mask) ...@@ -1131,7 +1131,7 @@ static void iwl5000_txq_set_sched(struct iwl_priv *priv, u32 mask)
static inline u32 iwl5000_get_scd_ssn(struct iwl5000_tx_resp *tx_resp) static inline u32 iwl5000_get_scd_ssn(struct iwl5000_tx_resp *tx_resp)
{ {
return le32_to_cpup((__le32*)&tx_resp->status + return le32_to_cpup((__le32 *)&tx_resp->status +
tx_resp->frame_count) & MAX_SN; tx_resp->frame_count) & MAX_SN;
} }
......
...@@ -245,7 +245,7 @@ static void rs_rate_scale_clear_window(struct iwl_rate_scale_data *window) ...@@ -245,7 +245,7 @@ static void rs_rate_scale_clear_window(struct iwl_rate_scale_data *window)
static inline u8 rs_is_valid_ant(u8 valid_antenna, u8 ant_type) static inline u8 rs_is_valid_ant(u8 valid_antenna, u8 ant_type)
{ {
return ((ant_type & valid_antenna) == ant_type); return (ant_type & valid_antenna) == ant_type;
} }
/* /*
...@@ -384,9 +384,9 @@ static void rs_tl_turn_on_agg(struct iwl_priv *priv, u8 tid, ...@@ -384,9 +384,9 @@ static void rs_tl_turn_on_agg(struct iwl_priv *priv, u8 tid,
static inline int get_num_of_ant_from_rate(u32 rate_n_flags) static inline int get_num_of_ant_from_rate(u32 rate_n_flags)
{ {
return (!!(rate_n_flags & RATE_MCS_ANT_A_MSK) + return !!(rate_n_flags & RATE_MCS_ANT_A_MSK) +
!!(rate_n_flags & RATE_MCS_ANT_B_MSK) + !!(rate_n_flags & RATE_MCS_ANT_B_MSK) +
!!(rate_n_flags & RATE_MCS_ANT_C_MSK)); !!(rate_n_flags & RATE_MCS_ANT_C_MSK);
} }
/** /**
...@@ -620,9 +620,9 @@ static int rs_toggle_antenna(u32 valid_ant, u32 *rate_n_flags, ...@@ -620,9 +620,9 @@ static int rs_toggle_antenna(u32 valid_ant, u32 *rate_n_flags,
#if 0 #if 0
static inline u8 rs_use_green(struct iwl_priv *priv, struct ieee80211_conf *conf) static inline u8 rs_use_green(struct iwl_priv *priv, struct ieee80211_conf *conf)
{ {
return ((conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) && return (conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) &&
priv->current_ht_config.is_green_field && priv->current_ht_config.is_green_field &&
!priv->current_ht_config.non_GF_STA_present); !priv->current_ht_config.non_GF_STA_present;
} }
#endif #endif
static inline u8 rs_use_green(struct iwl_priv *priv, struct ieee80211_conf *conf) 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,7 +2157,7 @@ static void *rs_alloc_sta(void *priv_rate, gfp_t gfp)
for (j = 0; j < LQ_SIZE; j++) for (j = 0; j < LQ_SIZE; j++)
for (i = 0; i < IWL_RATE_COUNT; i++) for (i = 0; i < IWL_RATE_COUNT; i++)
rs_rate_scale_clear_window(&(lq_sta->lq_info[j].win[i])); rs_rate_scale_clear_window(&lq_sta->lq_info[j].win[i]);
return lq_sta; return lq_sta;
} }
...@@ -2179,7 +2179,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta, ...@@ -2179,7 +2179,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
sta->txrate_idx = 3; sta->txrate_idx = 3;
for (j = 0; j < LQ_SIZE; j++) for (j = 0; j < LQ_SIZE; j++)
for (i = 0; i < IWL_RATE_COUNT; i++) for (i = 0; i < IWL_RATE_COUNT; i++)
rs_rate_scale_clear_window(&(lq_sta->lq_info[j].win[i])); rs_rate_scale_clear_window(&lq_sta->lq_info[j].win[i]);
IWL_DEBUG_RATE("LQ: *** rate scale global init ***\n"); IWL_DEBUG_RATE("LQ: *** rate scale global init ***\n");
/* TODO: what is a good starting rate for STA? About middle? Maybe not /* TODO: what is a good starting rate for STA? About middle? Maybe not
......
...@@ -2476,7 +2476,7 @@ static void iwl4965_post_associate(struct iwl_priv *priv) ...@@ -2476,7 +2476,7 @@ static void iwl4965_post_associate(struct iwl_priv *priv)
unsigned long flags; unsigned long flags;
if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { if (priv->iw_mode == IEEE80211_IF_TYPE_AP) {
IWL_ERROR("%s Should not be called in AP mode\n", __FUNCTION__); IWL_ERROR("%s Should not be called in AP mode\n", __func__);
return; return;
} }
...@@ -2552,7 +2552,7 @@ static void iwl4965_post_associate(struct iwl_priv *priv) ...@@ -2552,7 +2552,7 @@ static void iwl4965_post_associate(struct iwl_priv *priv)
default: default:
IWL_ERROR("%s Should not be called in %d mode\n", IWL_ERROR("%s Should not be called in %d mode\n",
__FUNCTION__, priv->iw_mode); __func__, priv->iw_mode);
break; break;
} }
...@@ -3794,7 +3794,7 @@ static ssize_t show_measurement(struct device *d, ...@@ -3794,7 +3794,7 @@ static ssize_t show_measurement(struct device *d,
struct iwl_priv *priv = dev_get_drvdata(d); struct iwl_priv *priv = dev_get_drvdata(d);
struct iwl4965_spectrum_notification measure_report; struct iwl4965_spectrum_notification measure_report;
u32 size = sizeof(measure_report), len = 0, ofs = 0; u32 size = sizeof(measure_report), len = 0, ofs = 0;
u8 *data = (u8 *) & measure_report; u8 *data = (u8 *)&measure_report;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
...@@ -3934,7 +3934,7 @@ static ssize_t show_power_level(struct device *d, ...@@ -3934,7 +3934,7 @@ static ssize_t show_power_level(struct device *d,
p += sprintf(p, "\tMODE:%s", (mode < IWL_POWER_AUTO)?"fixed":"auto"); p += sprintf(p, "\tMODE:%s", (mode < IWL_POWER_AUTO)?"fixed":"auto");
p += sprintf(p, "\tINDEX:%d", level); p += sprintf(p, "\tINDEX:%d", level);
p += sprintf(p, "\n"); p += sprintf(p, "\n");
return (p - buf + 1); return p - buf + 1;
} }
static DEVICE_ATTR(power_level, S_IWUSR | S_IRUSR, show_power_level, 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,7 +4009,7 @@ static ssize_t show_statistics(struct device *d,
struct iwl_priv *priv = dev_get_drvdata(d); struct iwl_priv *priv = dev_get_drvdata(d);
u32 size = sizeof(struct iwl_notif_statistics); u32 size = sizeof(struct iwl_notif_statistics);
u32 len = 0, ofs = 0; u32 len = 0, ofs = 0;
u8 *data = (u8 *) & priv->statistics; u8 *data = (u8 *)&priv->statistics;
int rc = 0; int rc = 0;
if (!iwl_is_alive(priv)) if (!iwl_is_alive(priv))
......
...@@ -383,8 +383,8 @@ void iwl_reset_qos(struct iwl_priv *priv) ...@@ -383,8 +383,8 @@ void iwl_reset_qos(struct iwl_priv *priv)
} }
EXPORT_SYMBOL(iwl_reset_qos); EXPORT_SYMBOL(iwl_reset_qos);
#define MAX_BIT_RATE_40_MHZ 0x96; /* 150 Mbps */ #define MAX_BIT_RATE_40_MHZ 0x96 /* 150 Mbps */
#define MAX_BIT_RATE_20_MHZ 0x48; /* 72 Mbps */ #define MAX_BIT_RATE_20_MHZ 0x48 /* 72 Mbps */
static void iwlcore_init_ht_hw_capab(const struct iwl_priv *priv, static void iwlcore_init_ht_hw_capab(const struct iwl_priv *priv,
struct ieee80211_ht_info *ht_info, struct ieee80211_ht_info *ht_info,
enum ieee80211_band band) enum ieee80211_band band)
......
...@@ -33,12 +33,12 @@ ...@@ -33,12 +33,12 @@
#define IWL_DEBUG(level, fmt, args...) \ #define IWL_DEBUG(level, fmt, args...) \
do { if (priv->debug_level & (level)) \ do { if (priv->debug_level & (level)) \
dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \ dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \
in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0)
#define IWL_DEBUG_LIMIT(level, fmt, args...) \ #define IWL_DEBUG_LIMIT(level, fmt, args...) \
do { if ((priv->debug_level & (level)) && net_ratelimit()) \ do { if ((priv->debug_level & (level)) && net_ratelimit()) \
dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \ dev_printk(KERN_ERR, &(priv->hw->wiphy->dev), "%c %s " fmt, \
in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0) in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0)
#ifdef CONFIG_IWLWIFI_DEBUGFS #ifdef CONFIG_IWLWIFI_DEBUGFS
struct iwl_debugfs { struct iwl_debugfs {
......
...@@ -231,7 +231,7 @@ static ssize_t iwl_dbgfs_stations_read(struct file *file, char __user *user_buf, ...@@ -231,7 +231,7 @@ static ssize_t iwl_dbgfs_stations_read(struct file *file, char __user *user_buf,
DECLARE_MAC_BUF(mac); DECLARE_MAC_BUF(mac);
buf = kmalloc(bufsz, GFP_KERNEL); buf = kmalloc(bufsz, GFP_KERNEL);
if(!buf) if (!buf)
return -ENOMEM; return -ENOMEM;
pos += scnprintf(buf + pos, bufsz - pos, "num of stations: %d\n\n", 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,16 +364,19 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name)
{ {
struct iwl_debugfs *dbgfs; struct iwl_debugfs *dbgfs;
struct dentry *phyd = priv->hw->wiphy->debugfsdir; struct dentry *phyd = priv->hw->wiphy->debugfsdir;
int ret = 0;
dbgfs = kzalloc(sizeof(struct iwl_debugfs), GFP_KERNEL); dbgfs = kzalloc(sizeof(struct iwl_debugfs), GFP_KERNEL);
if (!dbgfs) { if (!dbgfs) {
ret = -ENOMEM;
goto err; goto err;
} }
priv->dbgfs = dbgfs; priv->dbgfs = dbgfs;
dbgfs->name = name; dbgfs->name = name;
dbgfs->dir_drv = debugfs_create_dir(name, phyd); dbgfs->dir_drv = debugfs_create_dir(name, phyd);
if (!dbgfs->dir_drv || IS_ERR(dbgfs->dir_drv)){ if (!dbgfs->dir_drv || IS_ERR(dbgfs->dir_drv)) {
ret = -ENOENT;
goto err; goto err;
} }
...@@ -394,7 +397,7 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) ...@@ -394,7 +397,7 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name)
err: err:
IWL_ERROR("Can't open the debugfs directory\n"); IWL_ERROR("Can't open the debugfs directory\n");
iwl_dbgfs_unregister(priv); iwl_dbgfs_unregister(priv);
return -ENOENT; return ret;
} }
EXPORT_SYMBOL(iwl_dbgfs_register); EXPORT_SYMBOL(iwl_dbgfs_register);
...@@ -404,7 +407,7 @@ EXPORT_SYMBOL(iwl_dbgfs_register); ...@@ -404,7 +407,7 @@ EXPORT_SYMBOL(iwl_dbgfs_register);
*/ */
void iwl_dbgfs_unregister(struct iwl_priv *priv) void iwl_dbgfs_unregister(struct iwl_priv *priv)
{ {
if (!(priv->dbgfs)) if (!priv->dbgfs)
return; return;
DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_eeprom); DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_eeprom);
......
...@@ -273,8 +273,7 @@ EXPORT_SYMBOL(iwl_eeprom_init); ...@@ -273,8 +273,7 @@ EXPORT_SYMBOL(iwl_eeprom_init);
void iwl_eeprom_free(struct iwl_priv *priv) void iwl_eeprom_free(struct iwl_priv *priv)
{ {
if(priv->eeprom) kfree(priv->eeprom);
kfree(priv->eeprom);
priv->eeprom = NULL; priv->eeprom = NULL;
} }
EXPORT_SYMBOL(iwl_eeprom_free); EXPORT_SYMBOL(iwl_eeprom_free);
......
...@@ -823,7 +823,7 @@ int iwl_send_lq_cmd(struct iwl_priv *priv, ...@@ -823,7 +823,7 @@ int iwl_send_lq_cmd(struct iwl_priv *priv,
if (lq->sta_id == 0xFF) if (lq->sta_id == 0xFF)
lq->sta_id = IWL_AP_ID; lq->sta_id = IWL_AP_ID;
iwl_dump_lq_cmd(priv,lq); iwl_dump_lq_cmd(priv, lq);
if (iwl_is_associated(priv) && priv->assoc_station_added) if (iwl_is_associated(priv) && priv->assoc_station_added)
return iwl_send_cmd(priv, &cmd); return iwl_send_cmd(priv, &cmd);
......
...@@ -275,10 +275,8 @@ static int iwl3945_tx_queue_alloc(struct iwl3945_priv *priv, ...@@ -275,10 +275,8 @@ static int iwl3945_tx_queue_alloc(struct iwl3945_priv *priv,
return 0; return 0;
error: error:
if (txq->txb) { kfree(txq->txb);
kfree(txq->txb); txq->txb = NULL;
txq->txb = NULL;
}
return -ENOMEM; return -ENOMEM;
} }
...@@ -365,10 +363,8 @@ void iwl3945_tx_queue_free(struct iwl3945_priv *priv, struct iwl3945_tx_queue *t ...@@ -365,10 +363,8 @@ void iwl3945_tx_queue_free(struct iwl3945_priv *priv, struct iwl3945_tx_queue *t
txq->q.n_bd, txq->bd, txq->q.dma_addr); txq->q.n_bd, txq->bd, txq->q.dma_addr);
/* De-alloc array of per-TFD driver data */ /* De-alloc array of per-TFD driver data */
if (txq->txb) { kfree(txq->txb);
kfree(txq->txb); txq->txb = NULL;
txq->txb = NULL;
}
/* 0-fill queue descriptor structure */ /* 0-fill queue descriptor structure */
memset(txq, 0, sizeof(*txq)); memset(txq, 0, sizeof(*txq));
...@@ -2703,9 +2699,8 @@ static int iwl3945_tx_skb(struct iwl3945_priv *priv, struct sk_buff *skb) ...@@ -2703,9 +2699,8 @@ static int iwl3945_tx_skb(struct iwl3945_priv *priv, struct sk_buff *skb)
if (!ieee80211_has_morefrags(hdr->frame_control)) { if (!ieee80211_has_morefrags(hdr->frame_control)) {
txq->need_update = 1; txq->need_update = 1;
if (qc) { if (qc)
priv->stations[sta_id].tid[tid].seq_number = seq_number; priv->stations[sta_id].tid[tid].seq_number = seq_number;
}
} else { } else {
wait_write_ptr = 1; wait_write_ptr = 1;
txq->need_update = 0; txq->need_update = 0;
...@@ -3813,7 +3808,7 @@ int iwl3945_calc_db_from_ratio(int sig_ratio) ...@@ -3813,7 +3808,7 @@ int iwl3945_calc_db_from_ratio(int sig_ratio)
/* 100:1 or higher, divide by 10 and use table, /* 100:1 or higher, divide by 10 and use table,
* add 20 dB to make up for divide by 10 */ * add 20 dB to make up for divide by 10 */
if (sig_ratio >= 100) if (sig_ratio >= 100)
return (20 + (int)ratio2dB[sig_ratio/10]); return 20 + (int)ratio2dB[sig_ratio/10];
/* We shouldn't see this */ /* We shouldn't see this */
if (sig_ratio < 1) if (sig_ratio < 1)
...@@ -5088,7 +5083,7 @@ static void iwl3945_dealloc_ucode_pci(struct iwl3945_priv *priv) ...@@ -5088,7 +5083,7 @@ static void iwl3945_dealloc_ucode_pci(struct iwl3945_priv *priv)
* iwl3945_verify_inst_full - verify runtime uCode image in card vs. host, * iwl3945_verify_inst_full - verify runtime uCode image in card vs. host,
* looking at all data. * looking at all data.
*/ */
static int iwl3945_verify_inst_full(struct iwl3945_priv *priv, __le32 * image, u32 len) static int iwl3945_verify_inst_full(struct iwl3945_priv *priv, __le32 *image, u32 len)
{ {
u32 val; u32 val;
u32 save_len = len; u32 save_len = len;
...@@ -5237,7 +5232,7 @@ static int iwl3945_verify_bsm(struct iwl3945_priv *priv) ...@@ -5237,7 +5232,7 @@ static int iwl3945_verify_bsm(struct iwl3945_priv *priv)
val = iwl3945_read_prph(priv, BSM_WR_DWCOUNT_REG); val = iwl3945_read_prph(priv, BSM_WR_DWCOUNT_REG);
for (reg = BSM_SRAM_LOWER_BOUND; for (reg = BSM_SRAM_LOWER_BOUND;
reg < BSM_SRAM_LOWER_BOUND + len; reg < BSM_SRAM_LOWER_BOUND + len;
reg += sizeof(u32), image ++) { reg += sizeof(u32), image++) {
val = iwl3945_read_prph(priv, reg); val = iwl3945_read_prph(priv, reg);
if (val != le32_to_cpu(*image)) { if (val != le32_to_cpu(*image)) {
IWL_ERROR("BSM uCode verification failed at " IWL_ERROR("BSM uCode verification failed at "
...@@ -6336,7 +6331,7 @@ static void iwl3945_bg_post_associate(struct work_struct *data) ...@@ -6336,7 +6331,7 @@ static void iwl3945_bg_post_associate(struct work_struct *data)
DECLARE_MAC_BUF(mac); DECLARE_MAC_BUF(mac);
if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { if (priv->iw_mode == IEEE80211_IF_TYPE_AP) {
IWL_ERROR("%s Should not be called in AP mode\n", __FUNCTION__); IWL_ERROR("%s Should not be called in AP mode\n", __func__);
return; return;
} }
...@@ -6417,7 +6412,7 @@ static void iwl3945_bg_post_associate(struct work_struct *data) ...@@ -6417,7 +6412,7 @@ static void iwl3945_bg_post_associate(struct work_struct *data)
default: default:
IWL_ERROR("%s Should not be called in %d mode\n", IWL_ERROR("%s Should not be called in %d mode\n",
__FUNCTION__, priv->iw_mode); __func__, priv->iw_mode);
break; break;
} }
...@@ -7456,7 +7451,7 @@ static ssize_t show_measurement(struct device *d, ...@@ -7456,7 +7451,7 @@ static ssize_t show_measurement(struct device *d,
struct iwl3945_priv *priv = dev_get_drvdata(d); struct iwl3945_priv *priv = dev_get_drvdata(d);
struct iwl3945_spectrum_notification measure_report; struct iwl3945_spectrum_notification measure_report;
u32 size = sizeof(measure_report), len = 0, ofs = 0; u32 size = sizeof(measure_report), len = 0, ofs = 0;
u8 *data = (u8 *) & measure_report; u8 *data = (u8 *)&measure_report;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
...@@ -7627,7 +7622,7 @@ static ssize_t show_power_level(struct device *d, ...@@ -7627,7 +7622,7 @@ static ssize_t show_power_level(struct device *d,
else else
p += sprintf(p, " \n"); p += sprintf(p, " \n");
return (p - buf + 1); return p - buf + 1;
} }
...@@ -7649,7 +7644,7 @@ static ssize_t show_statistics(struct device *d, ...@@ -7649,7 +7644,7 @@ static ssize_t show_statistics(struct device *d,
struct iwl3945_priv *priv = dev_get_drvdata(d); struct iwl3945_priv *priv = dev_get_drvdata(d);
u32 size = sizeof(struct iwl3945_notif_statistics); u32 size = sizeof(struct iwl3945_notif_statistics);
u32 len = 0, ofs = 0; u32 len = 0, ofs = 0;
u8 *data = (u8 *) & priv->statistics; u8 *data = (u8 *)&priv->statistics;
int rc = 0; int rc = 0;
if (!iwl3945_is_alive(priv)) 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,16 +7998,16 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
/* nic init */ /* nic init */
iwl3945_set_bit(priv, CSR_GIO_CHICKEN_BITS, iwl3945_set_bit(priv, CSR_GIO_CHICKEN_BITS,
CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER); CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER);
iwl3945_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); iwl3945_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
err = iwl3945_poll_bit(priv, CSR_GP_CNTRL, err = iwl3945_poll_bit(priv, CSR_GP_CNTRL,
CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY,
CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000);
if (err < 0) { if (err < 0) {
IWL_DEBUG_INFO("Failed to init the card\n"); IWL_DEBUG_INFO("Failed to init the card\n");
goto out_remove_sysfs; goto out_remove_sysfs;
} }
/* Read the EEPROM */ /* Read the EEPROM */
err = iwl3945_eeprom_init(priv); err = iwl3945_eeprom_init(priv);
if (err) { if (err) {
...@@ -8114,9 +8109,8 @@ static void __devexit iwl3945_pci_remove(struct pci_dev *pdev) ...@@ -8114,9 +8109,8 @@ static void __devexit iwl3945_pci_remove(struct pci_dev *pdev)
iwl3945_unset_hw_setting(priv); iwl3945_unset_hw_setting(priv);
iwl3945_clear_stations_table(priv); iwl3945_clear_stations_table(priv);
if (priv->mac80211_registered) { if (priv->mac80211_registered)
ieee80211_unregister_hw(priv->hw); ieee80211_unregister_hw(priv->hw);
}
/*netif_stop_queue(dev); */ /*netif_stop_queue(dev); */
flush_workqueue(priv->workqueue); flush_workqueue(priv->workqueue);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment