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/common.h | |
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/common.h')
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.h | 132 |
1 files changed, 65 insertions, 67 deletions
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h index 38ff3d66c745..d0975ab8b908 100644 --- a/drivers/net/wireless/iwlegacy/common.h +++ b/drivers/net/wireless/iwlegacy/common.h | |||
@@ -112,8 +112,8 @@ struct il_cmd_meta { | |||
112 | * invoked for SYNC commands, if it were and its result passed | 112 | * invoked for SYNC commands, if it were and its result passed |
113 | * through it would be simpler...) | 113 | * through it would be simpler...) |
114 | */ | 114 | */ |
115 | void (*callback) (struct il_priv * il, struct il_device_cmd * cmd, | 115 | void (*callback) (struct il_priv *il, struct il_device_cmd *cmd, |
116 | struct il_rx_pkt * pkt); | 116 | struct il_rx_pkt *pkt); |
117 | 117 | ||
118 | /* The CMD_SIZE_HUGE flag bit indicates that the command | 118 | /* The CMD_SIZE_HUGE flag bit indicates that the command |
119 | * structure is stored at the end of the shared queue memory. */ | 119 | * structure is stored at the end of the shared queue memory. */ |
@@ -432,8 +432,8 @@ struct il_eeprom_calib_info { | |||
432 | 432 | ||
433 | struct il_eeprom_ops { | 433 | struct il_eeprom_ops { |
434 | const u32 regulatory_bands[7]; | 434 | const u32 regulatory_bands[7]; |
435 | int (*acquire_semaphore) (struct il_priv * il); | 435 | int (*acquire_semaphore) (struct il_priv *il); |
436 | void (*release_semaphore) (struct il_priv * il); | 436 | void (*release_semaphore) (struct il_priv *il); |
437 | }; | 437 | }; |
438 | 438 | ||
439 | int il_eeprom_init(struct il_priv *il); | 439 | int il_eeprom_init(struct il_priv *il); |
@@ -592,8 +592,8 @@ struct il_device_cmd { | |||
592 | struct il_host_cmd { | 592 | struct il_host_cmd { |
593 | const void *data; | 593 | const void *data; |
594 | unsigned long reply_page; | 594 | unsigned long reply_page; |
595 | void (*callback) (struct il_priv * il, struct il_device_cmd * cmd, | 595 | void (*callback) (struct il_priv *il, struct il_device_cmd *cmd, |
596 | struct il_rx_pkt * pkt); | 596 | struct il_rx_pkt *pkt); |
597 | u32 flags; | 597 | u32 flags; |
598 | u16 len; | 598 | u16 len; |
599 | u8 id; | 599 | u8 id; |
@@ -1224,8 +1224,8 @@ struct il_priv { | |||
1224 | enum ieee80211_band band; | 1224 | enum ieee80211_band band; |
1225 | int alloc_rxb_page; | 1225 | int alloc_rxb_page; |
1226 | 1226 | ||
1227 | void (*handlers[IL_CN_MAX]) (struct il_priv * il, | 1227 | void (*handlers[IL_CN_MAX]) (struct il_priv *il, |
1228 | struct il_rx_buf * rxb); | 1228 | struct il_rx_buf *rxb); |
1229 | 1229 | ||
1230 | struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; | 1230 | struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; |
1231 | 1231 | ||
@@ -1613,69 +1613,69 @@ il_free_pages(struct il_priv *il, unsigned long page) | |||
1613 | #define IL_RX_BUF_SIZE_8K (8 * 1024) | 1613 | #define IL_RX_BUF_SIZE_8K (8 * 1024) |
1614 | 1614 | ||
1615 | struct il_hcmd_ops { | 1615 | struct il_hcmd_ops { |
1616 | int (*rxon_assoc) (struct il_priv * il, struct il_rxon_context * ctx); | 1616 | int (*rxon_assoc) (struct il_priv *il, struct il_rxon_context *ctx); |
1617 | int (*commit_rxon) (struct il_priv * il, struct il_rxon_context * ctx); | 1617 | int (*commit_rxon) (struct il_priv *il, struct il_rxon_context *ctx); |
1618 | void (*set_rxon_chain) (struct il_priv * il, | 1618 | void (*set_rxon_chain) (struct il_priv *il, |
1619 | struct il_rxon_context * ctx); | 1619 | struct il_rxon_context *ctx); |
1620 | }; | 1620 | }; |
1621 | 1621 | ||
1622 | struct il_hcmd_utils_ops { | 1622 | struct il_hcmd_utils_ops { |
1623 | u16(*get_hcmd_size) (u8 cmd_id, u16 len); | 1623 | u16(*get_hcmd_size) (u8 cmd_id, u16 len); |
1624 | u16(*build_addsta_hcmd) (const struct il_addsta_cmd * cmd, u8 * data); | 1624 | u16(*build_addsta_hcmd) (const struct il_addsta_cmd *cmd, u8 *data); |
1625 | int (*request_scan) (struct il_priv * il, struct ieee80211_vif * vif); | 1625 | int (*request_scan) (struct il_priv *il, struct ieee80211_vif *vif); |
1626 | void (*post_scan) (struct il_priv * il); | 1626 | void (*post_scan) (struct il_priv *il); |
1627 | }; | 1627 | }; |
1628 | 1628 | ||
1629 | struct il_apm_ops { | 1629 | struct il_apm_ops { |
1630 | int (*init) (struct il_priv * il); | 1630 | int (*init) (struct il_priv *il); |
1631 | void (*config) (struct il_priv * il); | 1631 | void (*config) (struct il_priv *il); |
1632 | }; | 1632 | }; |
1633 | 1633 | ||
1634 | struct il_debugfs_ops { | 1634 | struct il_debugfs_ops { |
1635 | ssize_t(*rx_stats_read) (struct file * file, char __user * user_buf, | 1635 | ssize_t(*rx_stats_read) (struct file *file, char __user *user_buf, |
1636 | size_t count, loff_t * ppos); | 1636 | size_t count, loff_t *ppos); |
1637 | ssize_t(*tx_stats_read) (struct file * file, char __user * user_buf, | 1637 | ssize_t(*tx_stats_read) (struct file *file, char __user *user_buf, |
1638 | size_t count, loff_t * ppos); | 1638 | size_t count, loff_t *ppos); |
1639 | ssize_t(*general_stats_read) (struct file * file, | 1639 | ssize_t(*general_stats_read) (struct file *file, |
1640 | char __user * user_buf, size_t count, | 1640 | char __user *user_buf, size_t count, |
1641 | loff_t * ppos); | 1641 | loff_t *ppos); |
1642 | }; | 1642 | }; |
1643 | 1643 | ||
1644 | struct il_temp_ops { | 1644 | struct il_temp_ops { |
1645 | void (*temperature) (struct il_priv * il); | 1645 | void (*temperature) (struct il_priv *il); |
1646 | }; | 1646 | }; |
1647 | 1647 | ||
1648 | struct il_lib_ops { | 1648 | struct il_lib_ops { |
1649 | /* set hw dependent parameters */ | 1649 | /* set hw dependent parameters */ |
1650 | int (*set_hw_params) (struct il_priv * il); | 1650 | int (*set_hw_params) (struct il_priv *il); |
1651 | /* Handling TX */ | 1651 | /* Handling TX */ |
1652 | void (*txq_update_byte_cnt_tbl) (struct il_priv * il, | 1652 | void (*txq_update_byte_cnt_tbl) (struct il_priv *il, |
1653 | struct il_tx_queue * txq, | 1653 | struct il_tx_queue *txq, |
1654 | u16 byte_cnt); | 1654 | u16 byte_cnt); |
1655 | int (*txq_attach_buf_to_tfd) (struct il_priv * il, | 1655 | int (*txq_attach_buf_to_tfd) (struct il_priv *il, |
1656 | struct il_tx_queue * txq, dma_addr_t addr, | 1656 | struct il_tx_queue *txq, dma_addr_t addr, |
1657 | u16 len, u8 reset, u8 pad); | 1657 | u16 len, u8 reset, u8 pad); |
1658 | void (*txq_free_tfd) (struct il_priv * il, struct il_tx_queue * txq); | 1658 | void (*txq_free_tfd) (struct il_priv *il, struct il_tx_queue *txq); |
1659 | int (*txq_init) (struct il_priv * il, struct il_tx_queue * txq); | 1659 | int (*txq_init) (struct il_priv *il, struct il_tx_queue *txq); |
1660 | /* setup Rx handler */ | 1660 | /* setup Rx handler */ |
1661 | void (*handler_setup) (struct il_priv * il); | 1661 | void (*handler_setup) (struct il_priv *il); |
1662 | /* alive notification after init uCode load */ | 1662 | /* alive notification after init uCode load */ |
1663 | void (*init_alive_start) (struct il_priv * il); | 1663 | void (*init_alive_start) (struct il_priv *il); |
1664 | /* check validity of rtc data address */ | 1664 | /* check validity of rtc data address */ |
1665 | int (*is_valid_rtc_data_addr) (u32 addr); | 1665 | int (*is_valid_rtc_data_addr) (u32 addr); |
1666 | /* 1st ucode load */ | 1666 | /* 1st ucode load */ |
1667 | int (*load_ucode) (struct il_priv * il); | 1667 | int (*load_ucode) (struct il_priv *il); |
1668 | 1668 | ||
1669 | void (*dump_nic_error_log) (struct il_priv * il); | 1669 | void (*dump_nic_error_log) (struct il_priv *il); |
1670 | int (*dump_fh) (struct il_priv * il, char **buf, bool display); | 1670 | int (*dump_fh) (struct il_priv *il, char **buf, bool display); |
1671 | int (*set_channel_switch) (struct il_priv * il, | 1671 | int (*set_channel_switch) (struct il_priv *il, |
1672 | struct ieee80211_channel_switch * ch_switch); | 1672 | struct ieee80211_channel_switch *ch_switch); |
1673 | /* power management */ | 1673 | /* power management */ |
1674 | struct il_apm_ops apm_ops; | 1674 | struct il_apm_ops apm_ops; |
1675 | 1675 | ||
1676 | /* power */ | 1676 | /* power */ |
1677 | int (*send_tx_power) (struct il_priv * il); | 1677 | int (*send_tx_power) (struct il_priv *il); |
1678 | void (*update_chain_flags) (struct il_priv * il); | 1678 | void (*update_chain_flags) (struct il_priv *il); |
1679 | 1679 | ||
1680 | /* eeprom operations */ | 1680 | /* eeprom operations */ |
1681 | struct il_eeprom_ops eeprom_ops; | 1681 | struct il_eeprom_ops eeprom_ops; |
@@ -1688,16 +1688,16 @@ struct il_lib_ops { | |||
1688 | }; | 1688 | }; |
1689 | 1689 | ||
1690 | struct il_led_ops { | 1690 | struct il_led_ops { |
1691 | int (*cmd) (struct il_priv * il, struct il_led_cmd * led_cmd); | 1691 | int (*cmd) (struct il_priv *il, struct il_led_cmd *led_cmd); |
1692 | }; | 1692 | }; |
1693 | 1693 | ||
1694 | struct il_legacy_ops { | 1694 | struct il_legacy_ops { |
1695 | void (*post_associate) (struct il_priv * il); | 1695 | void (*post_associate) (struct il_priv *il); |
1696 | void (*config_ap) (struct il_priv * il); | 1696 | void (*config_ap) (struct il_priv *il); |
1697 | /* station management */ | 1697 | /* station management */ |
1698 | int (*update_bcast_stations) (struct il_priv * il); | 1698 | int (*update_bcast_stations) (struct il_priv *il); |
1699 | int (*manage_ibss_station) (struct il_priv * il, | 1699 | int (*manage_ibss_station) (struct il_priv *il, |
1700 | struct ieee80211_vif * vif, bool add); | 1700 | struct ieee80211_vif *vif, bool add); |
1701 | }; | 1701 | }; |
1702 | 1702 | ||
1703 | struct il_ops { | 1703 | struct il_ops { |
@@ -1965,7 +1965,7 @@ int il_mac_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
1965 | void il_internal_short_hw_scan(struct il_priv *il); | 1965 | void il_internal_short_hw_scan(struct il_priv *il); |
1966 | int il_force_reset(struct il_priv *il, bool external); | 1966 | int il_force_reset(struct il_priv *il, bool external); |
1967 | u16 il_fill_probe_req(struct il_priv *il, struct ieee80211_mgmt *frame, | 1967 | u16 il_fill_probe_req(struct il_priv *il, struct ieee80211_mgmt *frame, |
1968 | const u8 * ta, const u8 * ie, int ie_len, int left); | 1968 | const u8 *ta, const u8 *ie, int ie_len, int left); |
1969 | void il_setup_rx_scan_handlers(struct il_priv *il); | 1969 | void il_setup_rx_scan_handlers(struct il_priv *il); |
1970 | u16 il_get_active_dwell_time(struct il_priv *il, enum ieee80211_band band, | 1970 | u16 il_get_active_dwell_time(struct il_priv *il, enum ieee80211_band band, |
1971 | u8 n_probes); | 1971 | u8 n_probes); |
@@ -1995,9 +1995,9 @@ int il_send_cmd(struct il_priv *il, struct il_host_cmd *cmd); | |||
1995 | int __must_check il_send_cmd_pdu(struct il_priv *il, u8 id, u16 len, | 1995 | int __must_check il_send_cmd_pdu(struct il_priv *il, u8 id, u16 len, |
1996 | const void *data); | 1996 | const void *data); |
1997 | int il_send_cmd_pdu_async(struct il_priv *il, u8 id, u16 len, const void *data, | 1997 | int il_send_cmd_pdu_async(struct il_priv *il, u8 id, u16 len, const void *data, |
1998 | void (*callback) (struct il_priv * il, | 1998 | void (*callback) (struct il_priv *il, |
1999 | struct il_device_cmd * cmd, | 1999 | struct il_device_cmd *cmd, |
2000 | struct il_rx_pkt * pkt)); | 2000 | struct il_rx_pkt *pkt)); |
2001 | 2001 | ||
2002 | int il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd); | 2002 | int il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd); |
2003 | 2003 | ||
@@ -2155,7 +2155,7 @@ void il_mac_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif); | |||
2155 | void il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 2155 | void il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
2156 | struct ieee80211_bss_conf *bss_conf, u32 changes); | 2156 | struct ieee80211_bss_conf *bss_conf, u32 changes); |
2157 | void il_tx_cmd_protection(struct il_priv *il, struct ieee80211_tx_info *info, | 2157 | void il_tx_cmd_protection(struct il_priv *il, struct ieee80211_tx_info *info, |
2158 | __le16 fc, __le32 * tx_flags); | 2158 | __le16 fc, __le32 *tx_flags); |
2159 | 2159 | ||
2160 | irqreturn_t il_isr(int irq, void *data); | 2160 | irqreturn_t il_isr(int irq, void *data); |
2161 | 2161 | ||
@@ -2191,8 +2191,7 @@ _il_poll_bit(struct il_priv *il, u32 addr, u32 bits, u32 mask, int timeout) | |||
2191 | return t; | 2191 | return t; |
2192 | udelay(IL_POLL_INTERVAL); | 2192 | udelay(IL_POLL_INTERVAL); |
2193 | t += IL_POLL_INTERVAL; | 2193 | t += IL_POLL_INTERVAL; |
2194 | } | 2194 | } while (t < timeout); |
2195 | while (t < timeout); | ||
2196 | 2195 | ||
2197 | return -ETIMEDOUT; | 2196 | return -ETIMEDOUT; |
2198 | } | 2197 | } |
@@ -2324,8 +2323,7 @@ il_poll_bit(struct il_priv *il, u32 addr, u32 mask, int timeout) | |||
2324 | return t; | 2323 | return t; |
2325 | udelay(IL_POLL_INTERVAL); | 2324 | udelay(IL_POLL_INTERVAL); |
2326 | t += IL_POLL_INTERVAL; | 2325 | t += IL_POLL_INTERVAL; |
2327 | } | 2326 | } while (t < timeout); |
2328 | while (t < timeout); | ||
2329 | 2327 | ||
2330 | return -ETIMEDOUT; | 2328 | return -ETIMEDOUT; |
2331 | } | 2329 | } |
@@ -2485,14 +2483,14 @@ void il_dealloc_bcast_stations(struct il_priv *il); | |||
2485 | int il_get_free_ucode_key_idx(struct il_priv *il); | 2483 | int il_get_free_ucode_key_idx(struct il_priv *il); |
2486 | int il_send_add_sta(struct il_priv *il, struct il_addsta_cmd *sta, u8 flags); | 2484 | int il_send_add_sta(struct il_priv *il, struct il_addsta_cmd *sta, u8 flags); |
2487 | int il_add_station_common(struct il_priv *il, struct il_rxon_context *ctx, | 2485 | int il_add_station_common(struct il_priv *il, struct il_rxon_context *ctx, |
2488 | const u8 * addr, bool is_ap, | 2486 | const u8 *addr, bool is_ap, |
2489 | struct ieee80211_sta *sta, u8 * sta_id_r); | 2487 | struct ieee80211_sta *sta, u8 *sta_id_r); |
2490 | int il_remove_station(struct il_priv *il, const u8 sta_id, const u8 * addr); | 2488 | int il_remove_station(struct il_priv *il, const u8 sta_id, const u8 * addr); |
2491 | int il_mac_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 2489 | int il_mac_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
2492 | struct ieee80211_sta *sta); | 2490 | struct ieee80211_sta *sta); |
2493 | 2491 | ||
2494 | u8 il_prep_station(struct il_priv *il, struct il_rxon_context *ctx, | 2492 | u8 il_prep_station(struct il_priv *il, struct il_rxon_context *ctx, |
2495 | const u8 * addr, bool is_ap, struct ieee80211_sta *sta); | 2493 | const u8 *addr, bool is_ap, struct ieee80211_sta *sta); |
2496 | 2494 | ||
2497 | int il_send_lq_cmd(struct il_priv *il, struct il_rxon_context *ctx, | 2495 | int il_send_lq_cmd(struct il_priv *il, struct il_rxon_context *ctx, |
2498 | struct il_link_quality_cmd *lq, u8 flags, bool init); | 2496 | struct il_link_quality_cmd *lq, u8 flags, bool init); |
@@ -2758,10 +2756,10 @@ il_get_dma_hi_addr(dma_addr_t addr) | |||
2758 | * | 2756 | * |
2759 | * This structure contains dma address and length of transmission address | 2757 | * This structure contains dma address and length of transmission address |
2760 | * | 2758 | * |
2761 | * @lo: low [31:0] portion of the dma address of TX buffer | 2759 | * @lo: low [31:0] portion of the dma address of TX buffer every even is |
2762 | * every even is unaligned on 16 bit boundary | 2760 | * unaligned on 16 bit boundary |
2763 | * @hi_n_len 0-3 [35:32] portion of dma | 2761 | * @hi_n_len: 0-3 [35:32] portion of dma |
2764 | * 4-15 length of the tx buffer | 2762 | * 4-15 length of the tx buffer |
2765 | */ | 2763 | */ |
2766 | struct il_tfd_tb { | 2764 | struct il_tfd_tb { |
2767 | __le32 lo; | 2765 | __le32 lo; |
@@ -2778,7 +2776,7 @@ struct il_tfd_tb { | |||
2778 | * 5 reserved | 2776 | * 5 reserved |
2779 | * 6-7 padding (not used) | 2777 | * 6-7 padding (not used) |
2780 | * @ tbs[20] transmit frame buffer descriptors | 2778 | * @ tbs[20] transmit frame buffer descriptors |
2781 | * @ __pad padding | 2779 | * @ __pad padding |
2782 | * | 2780 | * |
2783 | * Each Tx queue uses a circular buffer of 256 TFDs stored in host DRAM. | 2781 | * Each Tx queue uses a circular buffer of 256 TFDs stored in host DRAM. |
2784 | * Both driver and device share these circular buffers, each of which must be | 2782 | * Both driver and device share these circular buffers, each of which must be |
@@ -3295,7 +3293,7 @@ do { \ | |||
3295 | __func__ , ## args); \ | 3293 | __func__ , ## args); \ |
3296 | } while (0) | 3294 | } while (0) |
3297 | 3295 | ||
3298 | #define il_print_hex_dump(il, level, p, len) \ | 3296 | #define il_print_hex_dump(il, level, p, len) \ |
3299 | do { \ | 3297 | do { \ |
3300 | if (il_get_debug_level(il) & level) \ | 3298 | if (il_get_debug_level(il) & level) \ |
3301 | print_hex_dump(KERN_DEBUG, "iwl data: ", \ | 3299 | print_hex_dump(KERN_DEBUG, "iwl data: ", \ |
@@ -3342,9 +3340,9 @@ il_dbgfs_unregister(struct il_priv *il) | |||
3342 | * | 3340 | * |
3343 | * The active debug levels can be accessed via files | 3341 | * The active debug levels can be accessed via files |
3344 | * | 3342 | * |
3345 | * /sys/module/iwl4965/parameters/debug | 3343 | * /sys/module/iwl4965/parameters/debug |
3346 | * /sys/module/iwl3945/parameters/debug | 3344 | * /sys/module/iwl3945/parameters/debug |
3347 | * /sys/class/net/wlan0/device/debug_level | 3345 | * /sys/class/net/wlan0/device/debug_level |
3348 | * | 3346 | * |
3349 | * when CONFIG_IWLEGACY_DEBUG=y. | 3347 | * when CONFIG_IWLEGACY_DEBUG=y. |
3350 | */ | 3348 | */ |