aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/main.c
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2011-04-26 18:25:29 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-28 14:53:18 -0400
commit8973a6e770fc891f92daacbc1c92c7cd396fcf7e (patch)
tree3e5025263b23db5c7cac9c64af6ba948701de980 /drivers/net/wireless/libertas/main.c
parent47684808fd89d6809c0886e06f8ac324252499d8 (diff)
libertas: use kernel-doc notation, fix comment style
Convert all libertas/ files to use kernel-doc notation instead of whatever it was (doxygen?). Add or fix function parameters in several places. Use expected style for multi-line comments in lots of places. Remove erroneous /** in multiple places. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/main.c')
-rw-r--r--drivers/net/wireless/libertas/main.c99
1 files changed, 53 insertions, 46 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index ca8149cd5bd9..ed57cf863b69 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -1,8 +1,8 @@
1/** 1/*
2 * This file contains the major functions in WLAN 2 * This file contains the major functions in WLAN
3 * driver. It includes init, exit, open, close and main 3 * driver. It includes init, exit, open, close and main
4 * thread etc.. 4 * thread etc..
5 */ 5 */
6 6
7#include <linux/moduleparam.h> 7#include <linux/moduleparam.h>
8#include <linux/delay.h> 8#include <linux/delay.h>
@@ -35,18 +35,20 @@ EXPORT_SYMBOL_GPL(lbs_debug);
35module_param_named(libertas_debug, lbs_debug, int, 0644); 35module_param_named(libertas_debug, lbs_debug, int, 0644);
36 36
37 37
38/* This global structure is used to send the confirm_sleep command as 38/*
39 * fast as possible down to the firmware. */ 39 * This global structure is used to send the confirm_sleep command as
40 * fast as possible down to the firmware.
41 */
40struct cmd_confirm_sleep confirm_sleep; 42struct cmd_confirm_sleep confirm_sleep;
41 43
42 44
43/** 45/*
44 * the table to keep region code 46 * the table to keep region code
45 */ 47 */
46u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE] = 48u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE] =
47 { 0x10, 0x20, 0x30, 0x31, 0x32, 0x40 }; 49 { 0x10, 0x20, 0x30, 0x31, 0x32, 0x40 };
48 50
49/** 51/*
50 * FW rate table. FW refers to rates by their index in this table, not by the 52 * FW rate table. FW refers to rates by their index in this table, not by the
51 * rate value itself. Values of 0x00 are 53 * rate value itself. Values of 0x00 are
52 * reserved positions. 54 * reserved positions.
@@ -57,10 +59,10 @@ static u8 fw_data_rates[MAX_RATES] =
57}; 59};
58 60
59/** 61/**
60 * @brief use index to get the data rate 62 * lbs_fw_index_to_data_rate - use index to get the data rate
61 * 63 *
62 * @param idx The index of data rate 64 * @idx: The index of data rate
63 * @return data rate or 0 65 * returns: data rate or 0
64 */ 66 */
65u32 lbs_fw_index_to_data_rate(u8 idx) 67u32 lbs_fw_index_to_data_rate(u8 idx)
66{ 68{
@@ -70,10 +72,10 @@ u32 lbs_fw_index_to_data_rate(u8 idx)
70} 72}
71 73
72/** 74/**
73 * @brief use rate to get the index 75 * lbs_data_rate_to_fw_index - use rate to get the index
74 * 76 *
75 * @param rate data rate 77 * @rate: data rate
76 * @return index or 0 78 * returns: index or 0
77 */ 79 */
78u8 lbs_data_rate_to_fw_index(u32 rate) 80u8 lbs_data_rate_to_fw_index(u32 rate)
79{ 81{
@@ -91,10 +93,10 @@ u8 lbs_data_rate_to_fw_index(u32 rate)
91 93
92 94
93/** 95/**
94 * @brief This function opens the ethX interface 96 * lbs_dev_open - open the ethX interface
95 * 97 *
96 * @param dev A pointer to net_device structure 98 * @dev: A pointer to &net_device structure
97 * @return 0 or -EBUSY if monitor mode active 99 * returns: 0 or -EBUSY if monitor mode active
98 */ 100 */
99static int lbs_dev_open(struct net_device *dev) 101static int lbs_dev_open(struct net_device *dev)
100{ 102{
@@ -120,10 +122,10 @@ static int lbs_dev_open(struct net_device *dev)
120} 122}
121 123
122/** 124/**
123 * @brief This function closes the ethX interface 125 * lbs_eth_stop - close the ethX interface
124 * 126 *
125 * @param dev A pointer to net_device structure 127 * @dev: A pointer to &net_device structure
126 * @return 0 128 * returns: 0
127 */ 129 */
128static int lbs_eth_stop(struct net_device *dev) 130static int lbs_eth_stop(struct net_device *dev)
129{ 131{
@@ -336,12 +338,12 @@ void lbs_set_multicast_list(struct net_device *dev)
336} 338}
337 339
338/** 340/**
339 * @brief This function handles the major jobs in the LBS driver. 341 * lbs_thread - handles the major jobs in the LBS driver.
340 * It handles all events generated by firmware, RX data received 342 * It handles all events generated by firmware, RX data received
341 * from firmware and TX data sent from kernel. 343 * from firmware and TX data sent from kernel.
342 * 344 *
343 * @param data A pointer to lbs_thread structure 345 * @data: A pointer to &lbs_thread structure
344 * @return 0 346 * returns: 0
345 */ 347 */
346static int lbs_thread(void *data) 348static int lbs_thread(void *data)
347{ 349{
@@ -540,11 +542,11 @@ static int lbs_thread(void *data)
540} 542}
541 543
542/** 544/**
543 * @brief This function gets the HW spec from the firmware and sets 545 * lbs_setup_firmware - gets the HW spec from the firmware and sets
544 * some basic parameters. 546 * some basic parameters
545 * 547 *
546 * @param priv A pointer to struct lbs_private structure 548 * @priv: A pointer to &struct lbs_private structure
547 * @return 0 or -1 549 * returns: 0 or -1
548 */ 550 */
549static int lbs_setup_firmware(struct lbs_private *priv) 551static int lbs_setup_firmware(struct lbs_private *priv)
550{ 552{
@@ -630,8 +632,10 @@ int lbs_resume(struct lbs_private *priv)
630EXPORT_SYMBOL_GPL(lbs_resume); 632EXPORT_SYMBOL_GPL(lbs_resume);
631 633
632/** 634/**
633 * This function handles the timeout of command sending. 635 * lbs_cmd_timeout_handler - handles the timeout of command sending.
634 * It will re-send the same command again. 636 * It will re-send the same command again.
637 *
638 * @data: &struct lbs_private pointer
635 */ 639 */
636static void lbs_cmd_timeout_handler(unsigned long data) 640static void lbs_cmd_timeout_handler(unsigned long data)
637{ 641{
@@ -655,8 +659,10 @@ out:
655} 659}
656 660
657/** 661/**
658 * This function put the device back to deep sleep mode when timer expires 662 * auto_deepsleep_timer_fn - put the device back to deep sleep mode when
659 * and no activity (command, event, data etc.) is detected. 663 * timer expires and no activity (command, event, data etc.) is detected.
664 * @data: &struct lbs_private pointer
665 * returns: N/A
660 */ 666 */
661static void auto_deepsleep_timer_fn(unsigned long data) 667static void auto_deepsleep_timer_fn(unsigned long data)
662{ 668{
@@ -792,11 +798,12 @@ static const struct net_device_ops lbs_netdev_ops = {
792}; 798};
793 799
794/** 800/**
795 * @brief This function adds the card. it will probe the 801 * lbs_add_card - adds the card. It will probe the
796 * card, allocate the lbs_priv and initialize the device. 802 * card, allocate the lbs_priv and initialize the device.
797 * 803 *
798 * @param card A pointer to card 804 * @card: A pointer to card
799 * @return A pointer to struct lbs_private structure 805 * @dmdev: A pointer to &struct device
806 * returns: A pointer to &struct lbs_private structure
800 */ 807 */
801struct lbs_private *lbs_add_card(void *card, struct device *dmdev) 808struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
802{ 809{
@@ -1057,19 +1064,19 @@ void lbs_notify_command_response(struct lbs_private *priv, u8 resp_idx)
1057EXPORT_SYMBOL_GPL(lbs_notify_command_response); 1064EXPORT_SYMBOL_GPL(lbs_notify_command_response);
1058 1065
1059/** 1066/**
1060 * @brief Retrieves two-stage firmware 1067 * lbs_get_firmware - Retrieves two-stage firmware
1061 * 1068 *
1062 * @param dev A pointer to device structure 1069 * @dev: A pointer to &device structure
1063 * @param user_helper User-defined helper firmware file 1070 * @user_helper: User-defined helper firmware file
1064 * @param user_mainfw User-defined main firmware file 1071 * @user_mainfw: User-defined main firmware file
1065 * @param card_model Bus-specific card model ID used to filter firmware table 1072 * @card_model: Bus-specific card model ID used to filter firmware table
1066 * elements 1073 * elements
1067 * @param fw_table Table of firmware file names and device model numbers 1074 * @fw_table: Table of firmware file names and device model numbers
1068 * terminated by an entry with a NULL helper name 1075 * terminated by an entry with a NULL helper name
1069 * @param helper On success, the helper firmware; caller must free 1076 * @helper: On success, the helper firmware; caller must free
1070 * @param mainfw On success, the main firmware; caller must free 1077 * @mainfw: On success, the main firmware; caller must free
1071 * 1078 *
1072 * @return 0 on success, non-zero on failure 1079 * returns: 0 on success, non-zero on failure
1073 */ 1080 */
1074int lbs_get_firmware(struct device *dev, const char *user_helper, 1081int lbs_get_firmware(struct device *dev, const char *user_helper,
1075 const char *user_mainfw, u32 card_model, 1082 const char *user_mainfw, u32 card_model,