diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-11-15 08:51:01 -0500 |
---|---|---|
committer | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-11-15 08:51:01 -0500 |
commit | 1722f8e12a9c6117d872bd19ec5919460ccdfb4e (patch) | |
tree | 8f40a7240155e074c1a8f01927821c4a16eabe70 /drivers/net/wireless/iwlegacy/3945.c | |
parent | e7392364fcd1004a5e495f15cf21b1e0ef874215 (diff) |
iwlegacy: checkpatch.pl fixes
Fix most checkpatch.pl ERRORs and some WARNINGs.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy/3945.c')
-rw-r--r-- | drivers/net/wireless/iwlegacy/3945.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c index 7f0b9f56f4be..7367dbb75ec6 100644 --- a/drivers/net/wireless/iwlegacy/3945.c +++ b/drivers/net/wireless/iwlegacy/3945.c | |||
@@ -381,10 +381,10 @@ il3945_accumulative_stats(struct il_priv *il, __le32 * stats) | |||
381 | u32 *accum_stats; | 381 | u32 *accum_stats; |
382 | u32 *delta, *max_delta; | 382 | u32 *delta, *max_delta; |
383 | 383 | ||
384 | prev_stats = (__le32 *) & il->_3945.stats; | 384 | prev_stats = (__le32 *) &il->_3945.stats; |
385 | accum_stats = (u32 *) & il->_3945.accum_stats; | 385 | accum_stats = (u32 *) &il->_3945.accum_stats; |
386 | delta = (u32 *) & il->_3945.delta_stats; | 386 | delta = (u32 *) &il->_3945.delta_stats; |
387 | max_delta = (u32 *) & il->_3945.max_delta; | 387 | max_delta = (u32 *) &il->_3945.max_delta; |
388 | 388 | ||
389 | for (i = sizeof(__le32); i < sizeof(struct il3945_notif_stats); | 389 | for (i = sizeof(__le32); i < sizeof(struct il3945_notif_stats); |
390 | i += | 390 | i += |
@@ -416,7 +416,7 @@ il3945_hdl_stats(struct il_priv *il, struct il_rx_buf *rxb) | |||
416 | (int)sizeof(struct il3945_notif_stats), | 416 | (int)sizeof(struct il3945_notif_stats), |
417 | le32_to_cpu(pkt->len_n_flags) & IL_RX_FRAME_SIZE_MSK); | 417 | le32_to_cpu(pkt->len_n_flags) & IL_RX_FRAME_SIZE_MSK); |
418 | #ifdef CONFIG_IWLEGACY_DEBUGFS | 418 | #ifdef CONFIG_IWLEGACY_DEBUGFS |
419 | il3945_accumulative_stats(il, (__le32 *) & pkt->u.raw); | 419 | il3945_accumulative_stats(il, (__le32 *) &pkt->u.raw); |
420 | #endif | 420 | #endif |
421 | 421 | ||
422 | memcpy(&il->_3945.stats, pkt->u.raw, sizeof(il->_3945.stats)); | 422 | memcpy(&il->_3945.stats, pkt->u.raw, sizeof(il->_3945.stats)); |
@@ -426,7 +426,7 @@ void | |||
426 | il3945_hdl_c_stats(struct il_priv *il, struct il_rx_buf *rxb) | 426 | il3945_hdl_c_stats(struct il_priv *il, struct il_rx_buf *rxb) |
427 | { | 427 | { |
428 | struct il_rx_pkt *pkt = rxb_addr(rxb); | 428 | struct il_rx_pkt *pkt = rxb_addr(rxb); |
429 | __le32 *flag = (__le32 *) & pkt->u.raw; | 429 | __le32 *flag = (__le32 *) &pkt->u.raw; |
430 | 430 | ||
431 | if (le32_to_cpu(*flag) & UCODE_STATS_CLEAR_MSK) { | 431 | if (le32_to_cpu(*flag) & UCODE_STATS_CLEAR_MSK) { |
432 | #ifdef CONFIG_IWLEGACY_DEBUGFS | 432 | #ifdef CONFIG_IWLEGACY_DEBUGFS |
@@ -775,7 +775,8 @@ il3945_set_pwr_vmain(struct il_priv *il) | |||
775 | APMG_PS_CTRL_VAL_PWR_SRC_VMAIN, | 775 | APMG_PS_CTRL_VAL_PWR_SRC_VMAIN, |
776 | ~APMG_PS_CTRL_MSK_PWR_SRC); | 776 | ~APMG_PS_CTRL_MSK_PWR_SRC); |
777 | 777 | ||
778 | _il_poll_bit(il, CSR_GPIO_IN, CSR_GPIO_IN_VAL_VMAIN_PWR_SRC, CSR_GPIO_IN_BIT_AUX_POWER, 5000); /* uS */ | 778 | _il_poll_bit(il, CSR_GPIO_IN, CSR_GPIO_IN_VAL_VMAIN_PWR_SRC, |
779 | CSR_GPIO_IN_BIT_AUX_POWER, 5000); | ||
779 | } | 780 | } |
780 | 781 | ||
781 | static int | 782 | static int |
@@ -1228,7 +1229,8 @@ static struct il3945_tx_power power_gain_table[2][IL_MAX_GAIN_ENTRIES] = { | |||
1228 | {3, 113}, | 1229 | {3, 113}, |
1229 | {3, 106}, | 1230 | {3, 106}, |
1230 | {3, 102}, | 1231 | {3, 102}, |
1231 | {3, 95}}, /* 2.4 GHz, lowest power */ | 1232 | {3, 95} /* 2.4 GHz, lowest power */ |
1233 | }, | ||
1232 | { | 1234 | { |
1233 | {251, 127}, /* 5.x GHz, highest power */ | 1235 | {251, 127}, /* 5.x GHz, highest power */ |
1234 | {251, 120}, | 1236 | {251, 120}, |
@@ -1307,7 +1309,8 @@ static struct il3945_tx_power power_gain_table[2][IL_MAX_GAIN_ENTRIES] = { | |||
1307 | {35, 113}, | 1309 | {35, 113}, |
1308 | {35, 107}, | 1310 | {35, 107}, |
1309 | {35, 99}, | 1311 | {35, 99}, |
1310 | {3, 120}} /* 5.x GHz, lowest power */ | 1312 | {3, 120} /* 5.x GHz, lowest power */ |
1313 | } | ||
1311 | }; | 1314 | }; |
1312 | 1315 | ||
1313 | static inline u8 | 1316 | static inline u8 |
@@ -1331,7 +1334,7 @@ il3945_hw_reg_fix_power_idx(int idx) | |||
1331 | */ | 1334 | */ |
1332 | static void | 1335 | static void |
1333 | il3945_hw_reg_set_scan_power(struct il_priv *il, u32 scan_tbl_idx, s32 rate_idx, | 1336 | il3945_hw_reg_set_scan_power(struct il_priv *il, u32 scan_tbl_idx, s32 rate_idx, |
1334 | const s8 * clip_pwrs, | 1337 | const s8 *clip_pwrs, |
1335 | struct il_channel_info *ch_info, int band_idx) | 1338 | struct il_channel_info *ch_info, int band_idx) |
1336 | { | 1339 | { |
1337 | struct il3945_scan_power_info *scan_power_info; | 1340 | struct il3945_scan_power_info *scan_power_info; |
@@ -1883,8 +1886,7 @@ il3945_bg_reg_txpower_periodic(struct work_struct *work) | |||
1883 | } | 1886 | } |
1884 | 1887 | ||
1885 | /** | 1888 | /** |
1886 | * il3945_hw_reg_get_ch_grp_idx - find the channel-group idx (0-4) | 1889 | * il3945_hw_reg_get_ch_grp_idx - find the channel-group idx (0-4) for channel. |
1887 | * for the channel. | ||
1888 | * | 1890 | * |
1889 | * This function is used when initializing channel-info structs. | 1891 | * This function is used when initializing channel-info structs. |
1890 | * | 1892 | * |
@@ -1930,7 +1932,7 @@ il3945_hw_reg_get_ch_grp_idx(struct il_priv *il, | |||
1930 | */ | 1932 | */ |
1931 | static int | 1933 | static int |
1932 | il3945_hw_reg_get_matched_power_idx(struct il_priv *il, s8 requested_power, | 1934 | il3945_hw_reg_get_matched_power_idx(struct il_priv *il, s8 requested_power, |
1933 | s32 setting_idx, s32 * new_idx) | 1935 | s32 setting_idx, s32 *new_idx) |
1934 | { | 1936 | { |
1935 | const struct il3945_eeprom_txpower_group *chnl_grp = NULL; | 1937 | const struct il3945_eeprom_txpower_group *chnl_grp = NULL; |
1936 | struct il3945_eeprom *eeprom = (struct il3945_eeprom *)il->eeprom; | 1938 | struct il3945_eeprom *eeprom = (struct il3945_eeprom *)il->eeprom; |
@@ -2735,14 +2737,13 @@ static struct il_cfg il3945_abg_cfg = { | |||
2735 | }; | 2737 | }; |
2736 | 2738 | ||
2737 | DEFINE_PCI_DEVICE_TABLE(il3945_hw_card_ids) = { | 2739 | DEFINE_PCI_DEVICE_TABLE(il3945_hw_card_ids) = { |
2738 | { | 2740 | {IL_PCI_DEVICE(0x4222, 0x1005, il3945_bg_cfg)}, |
2739 | IL_PCI_DEVICE(0x4222, 0x1005, il3945_bg_cfg)}, { | 2741 | {IL_PCI_DEVICE(0x4222, 0x1034, il3945_bg_cfg)}, |
2740 | IL_PCI_DEVICE(0x4222, 0x1034, il3945_bg_cfg)}, { | 2742 | {IL_PCI_DEVICE(0x4222, 0x1044, il3945_bg_cfg)}, |
2741 | IL_PCI_DEVICE(0x4222, 0x1044, il3945_bg_cfg)}, { | 2743 | {IL_PCI_DEVICE(0x4227, 0x1014, il3945_bg_cfg)}, |
2742 | IL_PCI_DEVICE(0x4227, 0x1014, il3945_bg_cfg)}, { | 2744 | {IL_PCI_DEVICE(0x4222, PCI_ANY_ID, il3945_abg_cfg)}, |
2743 | IL_PCI_DEVICE(0x4222, PCI_ANY_ID, il3945_abg_cfg)}, { | 2745 | {IL_PCI_DEVICE(0x4227, PCI_ANY_ID, il3945_abg_cfg)}, |
2744 | IL_PCI_DEVICE(0x4227, PCI_ANY_ID, il3945_abg_cfg)}, { | 2746 | {0} |
2745 | 0} | ||
2746 | }; | 2747 | }; |
2747 | 2748 | ||
2748 | MODULE_DEVICE_TABLE(pci, il3945_hw_card_ids); | 2749 | MODULE_DEVICE_TABLE(pci, il3945_hw_card_ids); |