aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/libertas/cfg.c45
-rw-r--r--drivers/net/wireless/libertas/cmd.c245
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c19
-rw-r--r--drivers/net/wireless/libertas/debugfs.c36
-rw-r--r--drivers/net/wireless/libertas/decl.h8
-rw-r--r--drivers/net/wireless/libertas/defs.h113
-rw-r--r--drivers/net/wireless/libertas/dev.h20
-rw-r--r--drivers/net/wireless/libertas/ethtool.c3
-rw-r--r--drivers/net/wireless/libertas/host.h33
-rw-r--r--drivers/net/wireless/libertas/if_cs.c35
-rw-r--r--drivers/net/wireless/libertas/if_spi.c134
-rw-r--r--drivers/net/wireless/libertas/if_spi.h68
-rw-r--r--drivers/net/wireless/libertas/if_usb.c113
-rw-r--r--drivers/net/wireless/libertas/if_usb.h14
-rw-r--r--drivers/net/wireless/libertas/main.c99
-rw-r--r--drivers/net/wireless/libertas/mesh.c210
-rw-r--r--drivers/net/wireless/libertas/mesh.h6
-rw-r--r--drivers/net/wireless/libertas/rx.c34
-rw-r--r--drivers/net/wireless/libertas/tx.c34
-rw-r--r--drivers/net/wireless/libertas/types.h18
20 files changed, 730 insertions, 557 deletions
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index 30ef0351bfc4..f582dfd2927f 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -122,8 +122,10 @@ static u8 lbs_auth_to_authtype(enum nl80211_auth_type auth_type)
122} 122}
123 123
124 124
125/* Various firmware commands need the list of supported rates, but with 125/*
126 the hight-bit set for basic rates */ 126 * Various firmware commands need the list of supported rates, but with
127 * the hight-bit set for basic rates
128 */
127static int lbs_add_rates(u8 *rates) 129static int lbs_add_rates(u8 *rates)
128{ 130{
129 size_t i; 131 size_t i;
@@ -425,7 +427,7 @@ static int lbs_add_wpa_tlv(u8 *tlv, const u8 *ie, u8 ie_len)
425 return ie_len + 2; 427 return ie_len + 2;
426} 428}
427 429
428/*************************************************************************** 430/*
429 * Set Channel 431 * Set Channel
430 */ 432 */
431 433
@@ -452,7 +454,7 @@ static int lbs_cfg_set_channel(struct wiphy *wiphy,
452 454
453 455
454 456
455/*************************************************************************** 457/*
456 * Scanning 458 * Scanning
457 */ 459 */
458 460
@@ -538,8 +540,10 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy,
538 goto done; 540 goto done;
539 } 541 }
540 542
541 /* Validity check: the TLV holds TSF values with 8 bytes each, so 543 /*
542 * the size in the TLV must match the nr_sets value */ 544 * Validity check: the TLV holds TSF values with 8 bytes each, so
545 * the size in the TLV must match the nr_sets value
546 */
543 i = get_unaligned_le16(tsfdesc); 547 i = get_unaligned_le16(tsfdesc);
544 tsfdesc += 2; 548 tsfdesc += 2;
545 if (i / 8 != scanresp->nr_sets) { 549 if (i / 8 != scanresp->nr_sets) {
@@ -581,8 +585,10 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy,
581 585
582 /* To find out the channel, we must parse the IEs */ 586 /* To find out the channel, we must parse the IEs */
583 ie = pos; 587 ie = pos;
584 /* 6+1+8+2+2: size of BSSID, RSSI, time stamp, beacon 588 /*
585 interval, capabilities */ 589 * 6+1+8+2+2: size of BSSID, RSSI, time stamp, beacon
590 * interval, capabilities
591 */
586 ielen = left = len - (6 + 1 + 8 + 2 + 2); 592 ielen = left = len - (6 + 1 + 8 + 2 + 2);
587 while (left >= 2) { 593 while (left >= 2) {
588 u8 id, elen; 594 u8 id, elen;
@@ -790,7 +796,7 @@ static int lbs_cfg_scan(struct wiphy *wiphy,
790 796
791 797
792 798
793/*************************************************************************** 799/*
794 * Events 800 * Events
795 */ 801 */
796 802
@@ -825,7 +831,7 @@ void lbs_send_mic_failureevent(struct lbs_private *priv, u32 event)
825 831
826 832
827 833
828/*************************************************************************** 834/*
829 * Connect/disconnect 835 * Connect/disconnect
830 */ 836 */
831 837
@@ -950,8 +956,10 @@ static int lbs_enable_rsn(struct lbs_private *priv, int enable)
950 * Set WPA/WPA key material 956 * Set WPA/WPA key material
951 */ 957 */
952 958
953/* like "struct cmd_ds_802_11_key_material", but with cmd_header. Once we 959/*
954 * get rid of WEXT, this should go into host.h */ 960 * like "struct cmd_ds_802_11_key_material", but with cmd_header. Once we
961 * get rid of WEXT, this should go into host.h
962 */
955 963
956struct cmd_key_material { 964struct cmd_key_material {
957 struct cmd_header hdr; 965 struct cmd_header hdr;
@@ -1536,7 +1544,7 @@ static int lbs_cfg_del_key(struct wiphy *wiphy, struct net_device *netdev,
1536} 1544}
1537 1545
1538 1546
1539/*************************************************************************** 1547/*
1540 * Get station 1548 * Get station
1541 */ 1549 */
1542 1550
@@ -1581,7 +1589,7 @@ static int lbs_cfg_get_station(struct wiphy *wiphy, struct net_device *dev,
1581 1589
1582 1590
1583 1591
1584/*************************************************************************** 1592/*
1585 * "Site survey", here just current channel and noise level 1593 * "Site survey", here just current channel and noise level
1586 */ 1594 */
1587 1595
@@ -1614,7 +1622,7 @@ static int lbs_get_survey(struct wiphy *wiphy, struct net_device *dev,
1614 1622
1615 1623
1616 1624
1617/*************************************************************************** 1625/*
1618 * Change interface 1626 * Change interface
1619 */ 1627 */
1620 1628
@@ -1656,11 +1664,12 @@ static int lbs_change_intf(struct wiphy *wiphy, struct net_device *dev,
1656 1664
1657 1665
1658 1666
1659/*************************************************************************** 1667/*
1660 * IBSS (Ad-Hoc) 1668 * IBSS (Ad-Hoc)
1661 */ 1669 */
1662 1670
1663/* The firmware needs the following bits masked out of the beacon-derived 1671/*
1672 * The firmware needs the following bits masked out of the beacon-derived
1664 * capability field when associating/joining to a BSS: 1673 * capability field when associating/joining to a BSS:
1665 * 9 (QoS), 11 (APSD), 12 (unused), 14 (unused), 15 (unused) 1674 * 9 (QoS), 11 (APSD), 12 (unused), 14 (unused), 15 (unused)
1666 */ 1675 */
@@ -1999,7 +2008,7 @@ static int lbs_leave_ibss(struct wiphy *wiphy, struct net_device *dev)
1999 2008
2000 2009
2001 2010
2002/*************************************************************************** 2011/*
2003 * Initialization 2012 * Initialization
2004 */ 2013 */
2005 2014
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 7e8a658b7670..6a96fc9c1cea 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -1,7 +1,7 @@
1/** 1/*
2 * This file contains the handling of command. 2 * This file contains the handling of command.
3 * It prepares command and sends it to firmware when it is ready. 3 * It prepares command and sends it to firmware when it is ready.
4 */ 4 */
5 5
6#include <linux/kfifo.h> 6#include <linux/kfifo.h>
7#include <linux/sched.h> 7#include <linux/sched.h>
@@ -16,14 +16,14 @@
16#define CAL_RSSI(snr, nf) ((s32)((s32)(snr) + CAL_NF(nf))) 16#define CAL_RSSI(snr, nf) ((s32)((s32)(snr) + CAL_NF(nf)))
17 17
18/** 18/**
19 * @brief Simple callback that copies response back into command 19 * lbs_cmd_copyback - Simple callback that copies response back into command
20 * 20 *
21 * @param priv A pointer to struct lbs_private structure 21 * @priv: A pointer to &struct lbs_private structure
22 * @param extra A pointer to the original command structure for which 22 * @extra: A pointer to the original command structure for which
23 * 'resp' is a response 23 * 'resp' is a response
24 * @param resp A pointer to the command response 24 * @resp: A pointer to the command response
25 * 25 *
26 * @return 0 on success, error on failure 26 * returns: 0 on success, error on failure
27 */ 27 */
28int lbs_cmd_copyback(struct lbs_private *priv, unsigned long extra, 28int lbs_cmd_copyback(struct lbs_private *priv, unsigned long extra,
29 struct cmd_header *resp) 29 struct cmd_header *resp)
@@ -38,15 +38,15 @@ int lbs_cmd_copyback(struct lbs_private *priv, unsigned long extra,
38EXPORT_SYMBOL_GPL(lbs_cmd_copyback); 38EXPORT_SYMBOL_GPL(lbs_cmd_copyback);
39 39
40/** 40/**
41 * @brief Simple callback that ignores the result. Use this if 41 * lbs_cmd_async_callback - Simple callback that ignores the result.
42 * you just want to send a command to the hardware, but don't 42 * Use this if you just want to send a command to the hardware, but don't
43 * care for the result. 43 * care for the result.
44 * 44 *
45 * @param priv ignored 45 * @priv: ignored
46 * @param extra ignored 46 * @extra: ignored
47 * @param resp ignored 47 * @resp: ignored
48 * 48 *
49 * @return 0 for success 49 * returns: 0 for success
50 */ 50 */
51static int lbs_cmd_async_callback(struct lbs_private *priv, unsigned long extra, 51static int lbs_cmd_async_callback(struct lbs_private *priv, unsigned long extra,
52 struct cmd_header *resp) 52 struct cmd_header *resp)
@@ -56,10 +56,11 @@ static int lbs_cmd_async_callback(struct lbs_private *priv, unsigned long extra,
56 56
57 57
58/** 58/**
59 * @brief Checks whether a command is allowed in Power Save mode 59 * is_command_allowed_in_ps - tests if a command is allowed in Power Save mode
60 *
61 * @cmd: the command ID
60 * 62 *
61 * @param command the command ID 63 * returns: 1 if allowed, 0 if not allowed
62 * @return 1 if allowed, 0 if not allowed
63 */ 64 */
64static u8 is_command_allowed_in_ps(u16 cmd) 65static u8 is_command_allowed_in_ps(u16 cmd)
65{ 66{
@@ -75,11 +76,12 @@ static u8 is_command_allowed_in_ps(u16 cmd)
75} 76}
76 77
77/** 78/**
78 * @brief Updates the hardware details like MAC address and regulatory region 79 * lbs_update_hw_spec - Updates the hardware details like MAC address
80 * and regulatory region
79 * 81 *
80 * @param priv A pointer to struct lbs_private structure 82 * @priv: A pointer to &struct lbs_private structure
81 * 83 *
82 * @return 0 on success, error on failure 84 * returns: 0 on success, error on failure
83 */ 85 */
84int lbs_update_hw_spec(struct lbs_private *priv) 86int lbs_update_hw_spec(struct lbs_private *priv)
85{ 87{
@@ -217,14 +219,14 @@ int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria,
217EXPORT_SYMBOL_GPL(lbs_host_sleep_cfg); 219EXPORT_SYMBOL_GPL(lbs_host_sleep_cfg);
218 220
219/** 221/**
220 * @brief Sets the Power Save mode 222 * lbs_set_ps_mode - Sets the Power Save mode
221 * 223 *
222 * @param priv A pointer to struct lbs_private structure 224 * @priv: A pointer to &struct lbs_private structure
223 * @param cmd_action The Power Save operation (PS_MODE_ACTION_ENTER_PS or 225 * @cmd_action: The Power Save operation (PS_MODE_ACTION_ENTER_PS or
224 * PS_MODE_ACTION_EXIT_PS) 226 * PS_MODE_ACTION_EXIT_PS)
225 * @param block Whether to block on a response or not 227 * @block: Whether to block on a response or not
226 * 228 *
227 * @return 0 on success, error on failure 229 * returns: 0 on success, error on failure
228 */ 230 */
229int lbs_set_ps_mode(struct lbs_private *priv, u16 cmd_action, bool block) 231int lbs_set_ps_mode(struct lbs_private *priv, u16 cmd_action, bool block)
230{ 232{
@@ -417,13 +419,13 @@ int lbs_set_host_sleep(struct lbs_private *priv, int host_sleep)
417} 419}
418 420
419/** 421/**
420 * @brief Set an SNMP MIB value 422 * lbs_set_snmp_mib - Set an SNMP MIB value
421 * 423 *
422 * @param priv A pointer to struct lbs_private structure 424 * @priv: A pointer to &struct lbs_private structure
423 * @param oid The OID to set in the firmware 425 * @oid: The OID to set in the firmware
424 * @param val Value to set the OID to 426 * @val: Value to set the OID to
425 * 427 *
426 * @return 0 on success, error on failure 428 * returns: 0 on success, error on failure
427 */ 429 */
428int lbs_set_snmp_mib(struct lbs_private *priv, u32 oid, u16 val) 430int lbs_set_snmp_mib(struct lbs_private *priv, u32 oid, u16 val)
429{ 431{
@@ -467,13 +469,13 @@ out:
467} 469}
468 470
469/** 471/**
470 * @brief Get an SNMP MIB value 472 * lbs_get_snmp_mib - Get an SNMP MIB value
471 * 473 *
472 * @param priv A pointer to struct lbs_private structure 474 * @priv: A pointer to &struct lbs_private structure
473 * @param oid The OID to retrieve from the firmware 475 * @oid: The OID to retrieve from the firmware
474 * @param out_val Location for the returned value 476 * @out_val: Location for the returned value
475 * 477 *
476 * @return 0 on success, error on failure 478 * returns: 0 on success, error on failure
477 */ 479 */
478int lbs_get_snmp_mib(struct lbs_private *priv, u32 oid, u16 *out_val) 480int lbs_get_snmp_mib(struct lbs_private *priv, u32 oid, u16 *out_val)
479{ 481{
@@ -510,14 +512,14 @@ out:
510} 512}
511 513
512/** 514/**
513 * @brief Get the min, max, and current TX power 515 * lbs_get_tx_power - Get the min, max, and current TX power
514 * 516 *
515 * @param priv A pointer to struct lbs_private structure 517 * @priv: A pointer to &struct lbs_private structure
516 * @param curlevel Current power level in dBm 518 * @curlevel: Current power level in dBm
517 * @param minlevel Minimum supported power level in dBm (optional) 519 * @minlevel: Minimum supported power level in dBm (optional)
518 * @param maxlevel Maximum supported power level in dBm (optional) 520 * @maxlevel: Maximum supported power level in dBm (optional)
519 * 521 *
520 * @return 0 on success, error on failure 522 * returns: 0 on success, error on failure
521 */ 523 */
522int lbs_get_tx_power(struct lbs_private *priv, s16 *curlevel, s16 *minlevel, 524int lbs_get_tx_power(struct lbs_private *priv, s16 *curlevel, s16 *minlevel,
523 s16 *maxlevel) 525 s16 *maxlevel)
@@ -545,12 +547,12 @@ int lbs_get_tx_power(struct lbs_private *priv, s16 *curlevel, s16 *minlevel,
545} 547}
546 548
547/** 549/**
548 * @brief Set the TX power 550 * lbs_set_tx_power - Set the TX power
549 * 551 *
550 * @param priv A pointer to struct lbs_private structure 552 * @priv: A pointer to &struct lbs_private structure
551 * @param dbm The desired power level in dBm 553 * @dbm: The desired power level in dBm
552 * 554 *
553 * @return 0 on success, error on failure 555 * returns: 0 on success, error on failure
554 */ 556 */
555int lbs_set_tx_power(struct lbs_private *priv, s16 dbm) 557int lbs_set_tx_power(struct lbs_private *priv, s16 dbm)
556{ 558{
@@ -573,12 +575,13 @@ int lbs_set_tx_power(struct lbs_private *priv, s16 dbm)
573} 575}
574 576
575/** 577/**
576 * @brief Enable or disable monitor mode (only implemented on OLPC usb8388 FW) 578 * lbs_set_monitor_mode - Enable or disable monitor mode
579 * (only implemented on OLPC usb8388 FW)
577 * 580 *
578 * @param priv A pointer to struct lbs_private structure 581 * @priv: A pointer to &struct lbs_private structure
579 * @param enable 1 to enable monitor mode, 0 to disable 582 * @enable: 1 to enable monitor mode, 0 to disable
580 * 583 *
581 * @return 0 on success, error on failure 584 * returns: 0 on success, error on failure
582 */ 585 */
583int lbs_set_monitor_mode(struct lbs_private *priv, int enable) 586int lbs_set_monitor_mode(struct lbs_private *priv, int enable)
584{ 587{
@@ -604,11 +607,11 @@ int lbs_set_monitor_mode(struct lbs_private *priv, int enable)
604} 607}
605 608
606/** 609/**
607 * @brief Get the radio channel 610 * lbs_get_channel - Get the radio channel
608 * 611 *
609 * @param priv A pointer to struct lbs_private structure 612 * @priv: A pointer to &struct lbs_private structure
610 * 613 *
611 * @return The channel on success, error on failure 614 * returns: The channel on success, error on failure
612 */ 615 */
613static int lbs_get_channel(struct lbs_private *priv) 616static int lbs_get_channel(struct lbs_private *priv)
614{ 617{
@@ -650,12 +653,12 @@ int lbs_update_channel(struct lbs_private *priv)
650} 653}
651 654
652/** 655/**
653 * @brief Set the radio channel 656 * lbs_set_channel - Set the radio channel
654 * 657 *
655 * @param priv A pointer to struct lbs_private structure 658 * @priv: A pointer to &struct lbs_private structure
656 * @param channel The desired channel, or 0 to clear a locked channel 659 * @channel: The desired channel, or 0 to clear a locked channel
657 * 660 *
658 * @return 0 on success, error on failure 661 * returns: 0 on success, error on failure
659 */ 662 */
660int lbs_set_channel(struct lbs_private *priv, u8 channel) 663int lbs_set_channel(struct lbs_private *priv, u8 channel)
661{ 664{
@@ -686,12 +689,13 @@ out:
686} 689}
687 690
688/** 691/**
689 * @brief Get current RSSI and noise floor 692 * lbs_get_rssi - Get current RSSI and noise floor
690 * 693 *
691 * @param priv A pointer to struct lbs_private structure 694 * @priv: A pointer to &struct lbs_private structure
692 * @param rssi On successful return, signal level in mBm 695 * @rssi: On successful return, signal level in mBm
696 * @nf: On successful return, Noise floor
693 * 697 *
694 * @return The channel on success, error on failure 698 * returns: The channel on success, error on failure
695 */ 699 */
696int lbs_get_rssi(struct lbs_private *priv, s8 *rssi, s8 *nf) 700int lbs_get_rssi(struct lbs_private *priv, s8 *rssi, s8 *nf)
697{ 701{
@@ -719,13 +723,14 @@ int lbs_get_rssi(struct lbs_private *priv, s8 *rssi, s8 *nf)
719} 723}
720 724
721/** 725/**
722 * @brief Send regulatory and 802.11d domain information to the firmware 726 * lbs_set_11d_domain_info - Send regulatory and 802.11d domain information
727 * to the firmware
723 * 728 *
724 * @param priv pointer to struct lbs_private 729 * @priv: pointer to &struct lbs_private
725 * @param request cfg80211 regulatory request structure 730 * @request: cfg80211 regulatory request structure
726 * @param bands the device's supported bands and channels 731 * @bands: the device's supported bands and channels
727 * 732 *
728 * @return 0 on success, error code on failure 733 * returns: 0 on success, error code on failure
729*/ 734*/
730int lbs_set_11d_domain_info(struct lbs_private *priv, 735int lbs_set_11d_domain_info(struct lbs_private *priv,
731 struct regulatory_request *request, 736 struct regulatory_request *request,
@@ -842,15 +847,15 @@ int lbs_set_11d_domain_info(struct lbs_private *priv,
842} 847}
843 848
844/** 849/**
845 * @brief Read a MAC, Baseband, or RF register 850 * lbs_get_reg - Read a MAC, Baseband, or RF register
846 * 851 *
847 * @param priv pointer to struct lbs_private 852 * @priv: pointer to &struct lbs_private
848 * @param cmd register command, one of CMD_MAC_REG_ACCESS, 853 * @reg: register command, one of CMD_MAC_REG_ACCESS,
849 * CMD_BBP_REG_ACCESS, or CMD_RF_REG_ACCESS 854 * CMD_BBP_REG_ACCESS, or CMD_RF_REG_ACCESS
850 * @param offset byte offset of the register to get 855 * @offset: byte offset of the register to get
851 * @param value on success, the value of the register at 'offset' 856 * @value: on success, the value of the register at 'offset'
852 * 857 *
853 * @return 0 on success, error code on failure 858 * returns: 0 on success, error code on failure
854*/ 859*/
855int lbs_get_reg(struct lbs_private *priv, u16 reg, u16 offset, u32 *value) 860int lbs_get_reg(struct lbs_private *priv, u16 reg, u16 offset, u32 *value)
856{ 861{
@@ -886,15 +891,15 @@ out:
886} 891}
887 892
888/** 893/**
889 * @brief Write a MAC, Baseband, or RF register 894 * lbs_set_reg - Write a MAC, Baseband, or RF register
890 * 895 *
891 * @param priv pointer to struct lbs_private 896 * @priv: pointer to &struct lbs_private
892 * @param cmd register command, one of CMD_MAC_REG_ACCESS, 897 * @reg: register command, one of CMD_MAC_REG_ACCESS,
893 * CMD_BBP_REG_ACCESS, or CMD_RF_REG_ACCESS 898 * CMD_BBP_REG_ACCESS, or CMD_RF_REG_ACCESS
894 * @param offset byte offset of the register to set 899 * @offset: byte offset of the register to set
895 * @param value the value to write to the register at 'offset' 900 * @value: the value to write to the register at 'offset'
896 * 901 *
897 * @return 0 on success, error code on failure 902 * returns: 0 on success, error code on failure
898*/ 903*/
899int lbs_set_reg(struct lbs_private *priv, u16 reg, u16 offset, u32 value) 904int lbs_set_reg(struct lbs_private *priv, u16 reg, u16 offset, u32 value)
900{ 905{
@@ -1023,7 +1028,7 @@ static void lbs_submit_command(struct lbs_private *priv,
1023 lbs_deb_leave(LBS_DEB_HOST); 1028 lbs_deb_leave(LBS_DEB_HOST);
1024} 1029}
1025 1030
1026/** 1031/*
1027 * This function inserts command node to cmdfreeq 1032 * This function inserts command node to cmdfreeq
1028 * after cleans it. Requires priv->driver_lock held. 1033 * after cleans it. Requires priv->driver_lock held.
1029 */ 1034 */
@@ -1125,11 +1130,12 @@ void lbs_set_mac_control(struct lbs_private *priv)
1125} 1130}
1126 1131
1127/** 1132/**
1128 * @brief This function allocates the command buffer and link 1133 * lbs_allocate_cmd_buffer - allocates the command buffer and links
1129 * it to command free queue. 1134 * it to command free queue
1135 *
1136 * @priv: A pointer to &struct lbs_private structure
1130 * 1137 *
1131 * @param priv A pointer to struct lbs_private structure 1138 * returns: 0 for success or -1 on error
1132 * @return 0 or -1
1133 */ 1139 */
1134int lbs_allocate_cmd_buffer(struct lbs_private *priv) 1140int lbs_allocate_cmd_buffer(struct lbs_private *priv)
1135{ 1141{
@@ -1171,10 +1177,11 @@ done:
1171} 1177}
1172 1178
1173/** 1179/**
1174 * @brief This function frees the command buffer. 1180 * lbs_free_cmd_buffer - free the command buffer
1175 * 1181 *
1176 * @param priv A pointer to struct lbs_private structure 1182 * @priv: A pointer to &struct lbs_private structure
1177 * @return 0 or -1 1183 *
1184 * returns: 0 for success
1178 */ 1185 */
1179int lbs_free_cmd_buffer(struct lbs_private *priv) 1186int lbs_free_cmd_buffer(struct lbs_private *priv)
1180{ 1187{
@@ -1211,11 +1218,13 @@ done:
1211} 1218}
1212 1219
1213/** 1220/**
1214 * @brief This function gets a free command node if available in 1221 * lbs_get_free_cmd_node - gets a free command node if available in
1215 * command free queue. 1222 * command free queue
1223 *
1224 * @priv: A pointer to &struct lbs_private structure
1216 * 1225 *
1217 * @param priv A pointer to struct lbs_private structure 1226 * returns: A pointer to &cmd_ctrl_node structure on success
1218 * @return cmd_ctrl_node A pointer to cmd_ctrl_node structure or NULL 1227 * or %NULL on error
1219 */ 1228 */
1220static struct cmd_ctrl_node *lbs_get_free_cmd_node(struct lbs_private *priv) 1229static struct cmd_ctrl_node *lbs_get_free_cmd_node(struct lbs_private *priv)
1221{ 1230{
@@ -1245,12 +1254,12 @@ static struct cmd_ctrl_node *lbs_get_free_cmd_node(struct lbs_private *priv)
1245} 1254}
1246 1255
1247/** 1256/**
1248 * @brief This function executes next command in command 1257 * lbs_execute_next_command - execute next command in command
1249 * pending queue. It will put firmware back to PS mode 1258 * pending queue. Will put firmware back to PS mode if applicable.
1250 * if applicable.
1251 * 1259 *
1252 * @param priv A pointer to struct lbs_private structure 1260 * @priv: A pointer to &struct lbs_private structure
1253 * @return 0 or -1 1261 *
1262 * returns: 0 on success or -1 on error
1254 */ 1263 */
1255int lbs_execute_next_command(struct lbs_private *priv) 1264int lbs_execute_next_command(struct lbs_private *priv)
1256{ 1265{
@@ -1454,12 +1463,12 @@ out:
1454} 1463}
1455 1464
1456/** 1465/**
1457 * @brief This function checks condition and prepares to 1466 * lbs_ps_confirm_sleep - checks condition and prepares to
1458 * send sleep confirm command to firmware if ok. 1467 * send sleep confirm command to firmware if ok
1468 *
1469 * @priv: A pointer to &struct lbs_private structure
1459 * 1470 *
1460 * @param priv A pointer to struct lbs_private structure 1471 * returns: n/a
1461 * @param psmode Power Saving mode
1462 * @return n/a
1463 */ 1472 */
1464void lbs_ps_confirm_sleep(struct lbs_private *priv) 1473void lbs_ps_confirm_sleep(struct lbs_private *priv)
1465{ 1474{
@@ -1499,16 +1508,16 @@ void lbs_ps_confirm_sleep(struct lbs_private *priv)
1499 1508
1500 1509
1501/** 1510/**
1502 * @brief Configures the transmission power control functionality. 1511 * lbs_set_tpc_cfg - Configures the transmission power control functionality
1503 * 1512 *
1504 * @param priv A pointer to struct lbs_private structure 1513 * @priv: A pointer to &struct lbs_private structure
1505 * @param enable Transmission power control enable 1514 * @enable: Transmission power control enable
1506 * @param p0 Power level when link quality is good (dBm). 1515 * @p0: Power level when link quality is good (dBm).
1507 * @param p1 Power level when link quality is fair (dBm). 1516 * @p1: Power level when link quality is fair (dBm).
1508 * @param p2 Power level when link quality is poor (dBm). 1517 * @p2: Power level when link quality is poor (dBm).
1509 * @param usesnr Use Signal to Noise Ratio in TPC 1518 * @usesnr: Use Signal to Noise Ratio in TPC
1510 * 1519 *
1511 * @return 0 on success 1520 * returns: 0 on success
1512 */ 1521 */
1513int lbs_set_tpc_cfg(struct lbs_private *priv, int enable, int8_t p0, int8_t p1, 1522int lbs_set_tpc_cfg(struct lbs_private *priv, int enable, int8_t p0, int8_t p1,
1514 int8_t p2, int usesnr) 1523 int8_t p2, int usesnr)
@@ -1531,15 +1540,15 @@ int lbs_set_tpc_cfg(struct lbs_private *priv, int enable, int8_t p0, int8_t p1,
1531} 1540}
1532 1541
1533/** 1542/**
1534 * @brief Configures the power adaptation settings. 1543 * lbs_set_power_adapt_cfg - Configures the power adaptation settings
1535 * 1544 *
1536 * @param priv A pointer to struct lbs_private structure 1545 * @priv: A pointer to &struct lbs_private structure
1537 * @param enable Power adaptation enable 1546 * @enable: Power adaptation enable
1538 * @param p0 Power level for 1, 2, 5.5 and 11 Mbps (dBm). 1547 * @p0: Power level for 1, 2, 5.5 and 11 Mbps (dBm).
1539 * @param p1 Power level for 6, 9, 12, 18, 22, 24 and 36 Mbps (dBm). 1548 * @p1: Power level for 6, 9, 12, 18, 22, 24 and 36 Mbps (dBm).
1540 * @param p2 Power level for 48 and 54 Mbps (dBm). 1549 * @p2: Power level for 48 and 54 Mbps (dBm).
1541 * 1550 *
1542 * @return 0 on Success 1551 * returns: 0 on Success
1543 */ 1552 */
1544 1553
1545int lbs_set_power_adapt_cfg(struct lbs_private *priv, int enable, int8_t p0, 1554int lbs_set_power_adapt_cfg(struct lbs_private *priv, int enable, int8_t p0,
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 5e95da9dcc2e..03e528994a9e 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -1,7 +1,7 @@
1/** 1/*
2 * This file contains the handling of command 2 * This file contains the handling of command
3 * responses as well as events generated by firmware. 3 * responses as well as events generated by firmware.
4 */ 4 */
5#include <linux/slab.h> 5#include <linux/slab.h>
6#include <linux/delay.h> 6#include <linux/delay.h>
7#include <linux/sched.h> 7#include <linux/sched.h>
@@ -12,12 +12,13 @@
12#include "cmd.h" 12#include "cmd.h"
13 13
14/** 14/**
15 * @brief This function handles disconnect event. it 15 * lbs_mac_event_disconnected - handles disconnect event. It
16 * reports disconnect to upper layer, clean tx/rx packets, 16 * reports disconnect to upper layer, clean tx/rx packets,
17 * reset link state etc. 17 * reset link state etc.
18 *
19 * @priv: A pointer to struct lbs_private structure
18 * 20 *
19 * @param priv A pointer to struct lbs_private structure 21 * returns: n/a
20 * @return n/a
21 */ 22 */
22void lbs_mac_event_disconnected(struct lbs_private *priv) 23void lbs_mac_event_disconnected(struct lbs_private *priv)
23{ 24{
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
index fbf3b0332bb7..851fe7bd4ba4 100644
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -849,15 +849,14 @@ static struct debug_data items[] = {
849static int num_of_items = ARRAY_SIZE(items); 849static int num_of_items = ARRAY_SIZE(items);
850 850
851/** 851/**
852 * @brief proc read function 852 * lbs_debugfs_read - proc read function
853 * 853 *
854 * @param page pointer to buffer 854 * @file: file to read
855 * @param s read data starting position 855 * @userbuf: pointer to buffer
856 * @param off offset 856 * @count: number of bytes to read
857 * @param cnt counter 857 * @ppos: read data starting position
858 * @param eof end of file flag 858 *
859 * @param data data to output 859 * returns: amount of data read or negative error code
860 * @return number of output data
861 */ 860 */
862static ssize_t lbs_debugfs_read(struct file *file, char __user *userbuf, 861static ssize_t lbs_debugfs_read(struct file *file, char __user *userbuf,
863 size_t count, loff_t *ppos) 862 size_t count, loff_t *ppos)
@@ -897,13 +896,14 @@ static ssize_t lbs_debugfs_read(struct file *file, char __user *userbuf,
897} 896}
898 897
899/** 898/**
900 * @brief proc write function 899 * lbs_debugfs_write - proc write function
900 *
901 * @f: file pointer
902 * @buf: pointer to data buffer
903 * @cnt: data number to write
904 * @ppos: file position
901 * 905 *
902 * @param f file pointer 906 * returns: amount of data written
903 * @param buf pointer to data buffer
904 * @param cnt data number to write
905 * @param data data to write
906 * @return number of data
907 */ 907 */
908static ssize_t lbs_debugfs_write(struct file *f, const char __user *buf, 908static ssize_t lbs_debugfs_write(struct file *f, const char __user *buf,
909 size_t cnt, loff_t *ppos) 909 size_t cnt, loff_t *ppos)
@@ -966,11 +966,11 @@ static const struct file_operations lbs_debug_fops = {
966}; 966};
967 967
968/** 968/**
969 * @brief create debug proc file 969 * lbs_debug_init - create debug proc file
970 *
971 * @priv: pointer to &struct lbs_private
970 * 972 *
971 * @param priv pointer struct lbs_private 973 * returns: N/A
972 * @param dev pointer net_device
973 * @return N/A
974 */ 974 */
975static void lbs_debug_init(struct lbs_private *priv) 975static void lbs_debug_init(struct lbs_private *priv)
976{ 976{
diff --git a/drivers/net/wireless/libertas/decl.h b/drivers/net/wireless/libertas/decl.h
index 2ae752d10065..da0b05bb89fe 100644
--- a/drivers/net/wireless/libertas/decl.h
+++ b/drivers/net/wireless/libertas/decl.h
@@ -1,8 +1,8 @@
1 1
2/** 2/*
3 * This file contains declaration referring to 3 * This file contains declaration referring to
4 * functions defined in other source files 4 * functions defined in other source files
5 */ 5 */
6 6
7#ifndef _LBS_DECL_H_ 7#ifndef _LBS_DECL_H_
8#define _LBS_DECL_H_ 8#define _LBS_DECL_H_
diff --git a/drivers/net/wireless/libertas/defs.h b/drivers/net/wireless/libertas/defs.h
index d00c728cec47..92b5b1f8fd75 100644
--- a/drivers/net/wireless/libertas/defs.h
+++ b/drivers/net/wireless/libertas/defs.h
@@ -1,7 +1,7 @@
1/** 1/*
2 * This header file contains global constant/enum definitions, 2 * This header file contains global constant/enum definitions,
3 * global variable declaration. 3 * global variable declaration.
4 */ 4 */
5#ifndef _LBS_DEFS_H_ 5#ifndef _LBS_DEFS_H_
6#define _LBS_DEFS_H_ 6#define _LBS_DEFS_H_
7 7
@@ -123,19 +123,19 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
123 123
124 124
125 125
126/** Buffer Constants */ 126/* Buffer Constants */
127 127
128/* The size of SQ memory PPA, DPA are 8 DWORDs, that keep the physical 128/* The size of SQ memory PPA, DPA are 8 DWORDs, that keep the physical
129* addresses of TxPD buffers. Station has only 8 TxPD available, Whereas 129 * addresses of TxPD buffers. Station has only 8 TxPD available, Whereas
130* driver has more local TxPDs. Each TxPD on the host memory is associated 130 * driver has more local TxPDs. Each TxPD on the host memory is associated
131* with a Tx control node. The driver maintains 8 RxPD descriptors for 131 * with a Tx control node. The driver maintains 8 RxPD descriptors for
132* station firmware to store Rx packet information. 132 * station firmware to store Rx packet information.
133* 133 *
134* Current version of MAC has a 32x6 multicast address buffer. 134 * Current version of MAC has a 32x6 multicast address buffer.
135* 135 *
136* 802.11b can have up to 14 channels, the driver keeps the 136 * 802.11b can have up to 14 channels, the driver keeps the
137* BSSID(MAC address) of each APs or Ad hoc stations it has sensed. 137 * BSSID(MAC address) of each APs or Ad hoc stations it has sensed.
138*/ 138 */
139 139
140#define MRVDRV_MAX_MULTICAST_LIST_SIZE 32 140#define MRVDRV_MAX_MULTICAST_LIST_SIZE 32
141#define LBS_NUM_CMD_BUFFERS 10 141#define LBS_NUM_CMD_BUFFERS 10
@@ -166,7 +166,7 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
166#define WOL_RESULT_NOSPC_ERR 1 166#define WOL_RESULT_NOSPC_ERR 1
167#define WOL_RESULT_EEXIST_ERR 2 167#define WOL_RESULT_EEXIST_ERR 2
168 168
169/** Misc constants */ 169/* Misc constants */
170/* This section defines 802.11 specific contants */ 170/* This section defines 802.11 specific contants */
171 171
172#define MRVDRV_MAX_BSS_DESCRIPTS 16 172#define MRVDRV_MAX_BSS_DESCRIPTS 16
@@ -183,7 +183,8 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
183 183
184#define MARVELL_MESH_IE_LENGTH 9 184#define MARVELL_MESH_IE_LENGTH 9
185 185
186/* Values used to populate the struct mrvl_mesh_ie. The only time you need this 186/*
187 * Values used to populate the struct mrvl_mesh_ie. The only time you need this
187 * is when enabling the mesh using CMD_MESH_CONFIG. 188 * is when enabling the mesh using CMD_MESH_CONFIG.
188 */ 189 */
189#define MARVELL_MESH_IE_TYPE 4 190#define MARVELL_MESH_IE_TYPE 4
@@ -193,7 +194,7 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
193#define MARVELL_MESH_METRIC_ID 0 194#define MARVELL_MESH_METRIC_ID 0
194#define MARVELL_MESH_CAPABILITY 0 195#define MARVELL_MESH_CAPABILITY 0
195 196
196/** INT status Bit Definition*/ 197/* INT status Bit Definition */
197#define MRVDRV_TX_DNLD_RDY 0x0001 198#define MRVDRV_TX_DNLD_RDY 0x0001
198#define MRVDRV_RX_UPLD_RDY 0x0002 199#define MRVDRV_RX_UPLD_RDY 0x0002
199#define MRVDRV_CMD_DNLD_RDY 0x0004 200#define MRVDRV_CMD_DNLD_RDY 0x0004
@@ -208,59 +209,63 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
208#define TPC_DEFAULT_P1 10 209#define TPC_DEFAULT_P1 10
209#define TPC_DEFAULT_P2 13 210#define TPC_DEFAULT_P2 13
210 211
211/** TxPD status */ 212/* TxPD status */
212 213
213/* Station firmware use TxPD status field to report final Tx transmit 214/*
214* result, Bit masks are used to present combined situations. 215 * Station firmware use TxPD status field to report final Tx transmit
215*/ 216 * result, Bit masks are used to present combined situations.
217 */
216 218
217#define MRVDRV_TxPD_POWER_MGMT_NULL_PACKET 0x01 219#define MRVDRV_TxPD_POWER_MGMT_NULL_PACKET 0x01
218#define MRVDRV_TxPD_POWER_MGMT_LAST_PACKET 0x08 220#define MRVDRV_TxPD_POWER_MGMT_LAST_PACKET 0x08
219 221
220/** Tx mesh flag */ 222/* Tx mesh flag */
221/* Currently we are using normal WDS flag as mesh flag. 223/*
224 * Currently we are using normal WDS flag as mesh flag.
222 * TODO: change to proper mesh flag when MAC understands it. 225 * TODO: change to proper mesh flag when MAC understands it.
223 */ 226 */
224#define TxPD_CONTROL_WDS_FRAME (1<<17) 227#define TxPD_CONTROL_WDS_FRAME (1<<17)
225#define TxPD_MESH_FRAME TxPD_CONTROL_WDS_FRAME 228#define TxPD_MESH_FRAME TxPD_CONTROL_WDS_FRAME
226 229
227/** Mesh interface ID */ 230/* Mesh interface ID */
228#define MESH_IFACE_ID 0x0001 231#define MESH_IFACE_ID 0x0001
229/** Mesh id should be in bits 14-13-12 */ 232/* Mesh id should be in bits 14-13-12 */
230#define MESH_IFACE_BIT_OFFSET 0x000c 233#define MESH_IFACE_BIT_OFFSET 0x000c
231/** Mesh enable bit in FW capability */ 234/* Mesh enable bit in FW capability */
232#define MESH_CAPINFO_ENABLE_MASK (1<<16) 235#define MESH_CAPINFO_ENABLE_MASK (1<<16)
233 236
234/** FW definition from Marvell v4 */ 237/* FW definition from Marvell v4 */
235#define MRVL_FW_V4 (0x04) 238#define MRVL_FW_V4 (0x04)
236/** FW definition from Marvell v5 */ 239/* FW definition from Marvell v5 */
237#define MRVL_FW_V5 (0x05) 240#define MRVL_FW_V5 (0x05)
238/** FW definition from Marvell v10 */ 241/* FW definition from Marvell v10 */
239#define MRVL_FW_V10 (0x0a) 242#define MRVL_FW_V10 (0x0a)
240/** FW major revision definition */ 243/* FW major revision definition */
241#define MRVL_FW_MAJOR_REV(x) ((x)>>24) 244#define MRVL_FW_MAJOR_REV(x) ((x)>>24)
242 245
243/** RxPD status */ 246/* RxPD status */
244 247
245#define MRVDRV_RXPD_STATUS_OK 0x0001 248#define MRVDRV_RXPD_STATUS_OK 0x0001
246 249
247/** RxPD status - Received packet types */ 250/* RxPD status - Received packet types */
248/** Rx mesh flag */ 251/* Rx mesh flag */
249/* Currently we are using normal WDS flag as mesh flag. 252/*
253 * Currently we are using normal WDS flag as mesh flag.
250 * TODO: change to proper mesh flag when MAC understands it. 254 * TODO: change to proper mesh flag when MAC understands it.
251 */ 255 */
252#define RxPD_CONTROL_WDS_FRAME (0x40) 256#define RxPD_CONTROL_WDS_FRAME (0x40)
253#define RxPD_MESH_FRAME RxPD_CONTROL_WDS_FRAME 257#define RxPD_MESH_FRAME RxPD_CONTROL_WDS_FRAME
254 258
255/** RSSI-related defines */ 259/* RSSI-related defines */
256/* RSSI constants are used to implement 802.11 RSSI threshold 260/*
257* indication. if the Rx packet signal got too weak for 5 consecutive 261 * RSSI constants are used to implement 802.11 RSSI threshold
258* times, miniport driver (driver) will report this event to wrapper 262 * indication. if the Rx packet signal got too weak for 5 consecutive
259*/ 263 * times, miniport driver (driver) will report this event to wrapper
264 */
260 265
261#define MRVDRV_NF_DEFAULT_SCAN_VALUE (-96) 266#define MRVDRV_NF_DEFAULT_SCAN_VALUE (-96)
262 267
263/** RTS/FRAG related defines */ 268/* RTS/FRAG related defines */
264#define MRVDRV_RTS_MIN_VALUE 0 269#define MRVDRV_RTS_MIN_VALUE 0
265#define MRVDRV_RTS_MAX_VALUE 2347 270#define MRVDRV_RTS_MAX_VALUE 2347
266#define MRVDRV_FRAG_MIN_VALUE 256 271#define MRVDRV_FRAG_MIN_VALUE 256
@@ -300,36 +305,36 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
300 305
301#define MAX_LEDS 8 306#define MAX_LEDS 8
302 307
303/** Global Variable Declaration */ 308/* Global Variable Declaration */
304extern const char lbs_driver_version[]; 309extern const char lbs_driver_version[];
305extern u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE]; 310extern u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE];
306 311
307 312
308/** ENUM definition*/ 313/* ENUM definition */
309/** SNRNF_TYPE */ 314/* SNRNF_TYPE */
310enum SNRNF_TYPE { 315enum SNRNF_TYPE {
311 TYPE_BEACON = 0, 316 TYPE_BEACON = 0,
312 TYPE_RXPD, 317 TYPE_RXPD,
313 MAX_TYPE_B 318 MAX_TYPE_B
314}; 319};
315 320
316/** SNRNF_DATA*/ 321/* SNRNF_DATA */
317enum SNRNF_DATA { 322enum SNRNF_DATA {
318 TYPE_NOAVG = 0, 323 TYPE_NOAVG = 0,
319 TYPE_AVG, 324 TYPE_AVG,
320 MAX_TYPE_AVG 325 MAX_TYPE_AVG
321}; 326};
322 327
323/** LBS_802_11_POWER_MODE */ 328/* LBS_802_11_POWER_MODE */
324enum LBS_802_11_POWER_MODE { 329enum LBS_802_11_POWER_MODE {
325 LBS802_11POWERMODECAM, 330 LBS802_11POWERMODECAM,
326 LBS802_11POWERMODEMAX_PSP, 331 LBS802_11POWERMODEMAX_PSP,
327 LBS802_11POWERMODEFAST_PSP, 332 LBS802_11POWERMODEFAST_PSP,
328 /*not a real mode, defined as an upper bound */ 333 /* not a real mode, defined as an upper bound */
329 LBS802_11POWEMODEMAX 334 LBS802_11POWEMODEMAX
330}; 335};
331 336
332/** PS_STATE */ 337/* PS_STATE */
333enum PS_STATE { 338enum PS_STATE {
334 PS_STATE_FULL_POWER, 339 PS_STATE_FULL_POWER,
335 PS_STATE_AWAKE, 340 PS_STATE_AWAKE,
@@ -337,7 +342,7 @@ enum PS_STATE {
337 PS_STATE_SLEEP 342 PS_STATE_SLEEP
338}; 343};
339 344
340/** DNLD_STATE */ 345/* DNLD_STATE */
341enum DNLD_STATE { 346enum DNLD_STATE {
342 DNLD_RES_RECEIVED, 347 DNLD_RES_RECEIVED,
343 DNLD_DATA_SENT, 348 DNLD_DATA_SENT,
@@ -345,19 +350,19 @@ enum DNLD_STATE {
345 DNLD_BOOTCMD_SENT, 350 DNLD_BOOTCMD_SENT,
346}; 351};
347 352
348/** LBS_MEDIA_STATE */ 353/* LBS_MEDIA_STATE */
349enum LBS_MEDIA_STATE { 354enum LBS_MEDIA_STATE {
350 LBS_CONNECTED, 355 LBS_CONNECTED,
351 LBS_DISCONNECTED 356 LBS_DISCONNECTED
352}; 357};
353 358
354/** LBS_802_11_PRIVACY_FILTER */ 359/* LBS_802_11_PRIVACY_FILTER */
355enum LBS_802_11_PRIVACY_FILTER { 360enum LBS_802_11_PRIVACY_FILTER {
356 LBS802_11PRIVFILTERACCEPTALL, 361 LBS802_11PRIVFILTERACCEPTALL,
357 LBS802_11PRIVFILTER8021XWEP 362 LBS802_11PRIVFILTER8021XWEP
358}; 363};
359 364
360/** mv_ms_type */ 365/* mv_ms_type */
361enum mv_ms_type { 366enum mv_ms_type {
362 MVMS_DAT = 0, 367 MVMS_DAT = 0,
363 MVMS_CMD = 1, 368 MVMS_CMD = 1,
@@ -365,14 +370,14 @@ enum mv_ms_type {
365 MVMS_EVENT 370 MVMS_EVENT
366}; 371};
367 372
368/** KEY_TYPE_ID */ 373/* KEY_TYPE_ID */
369enum KEY_TYPE_ID { 374enum KEY_TYPE_ID {
370 KEY_TYPE_ID_WEP = 0, 375 KEY_TYPE_ID_WEP = 0,
371 KEY_TYPE_ID_TKIP, 376 KEY_TYPE_ID_TKIP,
372 KEY_TYPE_ID_AES 377 KEY_TYPE_ID_AES
373}; 378};
374 379
375/** KEY_INFO_WPA (applies to both TKIP and AES/CCMP) */ 380/* KEY_INFO_WPA (applies to both TKIP and AES/CCMP) */
376enum KEY_INFO_WPA { 381enum KEY_INFO_WPA {
377 KEY_INFO_WPA_MCAST = 0x01, 382 KEY_INFO_WPA_MCAST = 0x01,
378 KEY_INFO_WPA_UNICAST = 0x02, 383 KEY_INFO_WPA_UNICAST = 0x02,
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h
index bc461eb39660..76d018beebf4 100644
--- a/drivers/net/wireless/libertas/dev.h
+++ b/drivers/net/wireless/libertas/dev.h
@@ -1,8 +1,8 @@
1/** 1/*
2 * This file contains definitions and data structures specific 2 * This file contains definitions and data structures specific
3 * to Marvell 802.11 NIC. It contains the Device Information 3 * to Marvell 802.11 NIC. It contains the Device Information
4 * structure struct lbs_private.. 4 * structure struct lbs_private..
5 */ 5 */
6#ifndef _LBS_DEV_H_ 6#ifndef _LBS_DEV_H_
7#define _LBS_DEV_H_ 7#define _LBS_DEV_H_
8 8
@@ -12,7 +12,7 @@
12 12
13#include <linux/kfifo.h> 13#include <linux/kfifo.h>
14 14
15/** sleep_params */ 15/* sleep_params */
16struct sleep_params { 16struct sleep_params {
17 uint16_t sp_error; 17 uint16_t sp_error;
18 uint16_t sp_offset; 18 uint16_t sp_offset;
@@ -23,7 +23,7 @@ struct sleep_params {
23}; 23};
24 24
25 25
26/** Private structure for the MV device */ 26/* Private structure for the MV device */
27struct lbs_private { 27struct lbs_private {
28 28
29 /* Basic networking */ 29 /* Basic networking */
@@ -125,12 +125,12 @@ struct lbs_private {
125 /* Events sent from hardware to driver */ 125 /* Events sent from hardware to driver */
126 struct kfifo event_fifo; 126 struct kfifo event_fifo;
127 127
128 /** thread to service interrupts */ 128 /* thread to service interrupts */
129 struct task_struct *main_thread; 129 struct task_struct *main_thread;
130 wait_queue_head_t waitq; 130 wait_queue_head_t waitq;
131 struct workqueue_struct *work_thread; 131 struct workqueue_struct *work_thread;
132 132
133 /** Encryption stuff */ 133 /* Encryption stuff */
134 u8 authtype_auto; 134 u8 authtype_auto;
135 u8 wep_tx_key; 135 u8 wep_tx_key;
136 u8 wep_key[4][WLAN_KEY_LEN_WEP104]; 136 u8 wep_key[4][WLAN_KEY_LEN_WEP104];
@@ -162,7 +162,7 @@ struct lbs_private {
162 s16 txpower_min; 162 s16 txpower_min;
163 s16 txpower_max; 163 s16 txpower_max;
164 164
165 /** Scanning */ 165 /* Scanning */
166 struct delayed_work scan_work; 166 struct delayed_work scan_work;
167 int scan_channel; 167 int scan_channel;
168 /* Queue of things waiting for scan completion */ 168 /* Queue of things waiting for scan completion */
diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c
index 50193aac679e..29dbce4a9f86 100644
--- a/drivers/net/wireless/libertas/ethtool.c
+++ b/drivers/net/wireless/libertas/ethtool.c
@@ -20,7 +20,8 @@ static void lbs_ethtool_get_drvinfo(struct net_device *dev,
20 strcpy(info->version, lbs_driver_version); 20 strcpy(info->version, lbs_driver_version);
21} 21}
22 22
23/* All 8388 parts have 16KiB EEPROM size at the time of writing. 23/*
24 * All 8388 parts have 16KiB EEPROM size at the time of writing.
24 * In case that changes this needs fixing. 25 * In case that changes this needs fixing.
25 */ 26 */
26#define LBS_EEPROM_LEN 16384 27#define LBS_EEPROM_LEN 16384
diff --git a/drivers/net/wireless/libertas/host.h b/drivers/net/wireless/libertas/host.h
index 6cb6935ee4a3..2e2dbfa2ee50 100644
--- a/drivers/net/wireless/libertas/host.h
+++ b/drivers/net/wireless/libertas/host.h
@@ -1,7 +1,7 @@
1/** 1/*
2 * This file function prototypes, data structure 2 * This file function prototypes, data structure
3 * and definitions for all the host/station commands 3 * and definitions for all the host/station commands
4 */ 4 */
5 5
6#ifndef _LBS_HOST_H_ 6#ifndef _LBS_HOST_H_
7#define _LBS_HOST_H_ 7#define _LBS_HOST_H_
@@ -13,9 +13,10 @@
13 13
14#define CMD_OPTION_WAITFORRSP 0x0002 14#define CMD_OPTION_WAITFORRSP 0x0002
15 15
16/** Host command IDs */ 16/* Host command IDs */
17 17
18/* Return command are almost always the same as the host command, but with 18/*
19 * Return command are almost always the same as the host command, but with
19 * bit 15 set high. There are a few exceptions, though... 20 * bit 15 set high. There are a few exceptions, though...
20 */ 21 */
21#define CMD_RET(cmd) (0x8000 | cmd) 22#define CMD_RET(cmd) (0x8000 | cmd)
@@ -251,7 +252,7 @@ enum cmd_mesh_config_types {
251 CMD_TYPE_MESH_GET_MESH_IE, /* GET_DEFAULTS is superset of GET_MESHIE */ 252 CMD_TYPE_MESH_GET_MESH_IE, /* GET_DEFAULTS is superset of GET_MESHIE */
252}; 253};
253 254
254/** Card Event definition */ 255/* Card Event definition */
255#define MACREG_INT_CODE_TX_PPA_FREE 0 256#define MACREG_INT_CODE_TX_PPA_FREE 0
256#define MACREG_INT_CODE_TX_DMA_DONE 1 257#define MACREG_INT_CODE_TX_DMA_DONE 1
257#define MACREG_INT_CODE_LINK_LOST_W_SCAN 2 258#define MACREG_INT_CODE_LINK_LOST_W_SCAN 2
@@ -624,12 +625,14 @@ struct cmd_ds_802_11_rf_channel {
624struct cmd_ds_802_11_rssi { 625struct cmd_ds_802_11_rssi {
625 struct cmd_header hdr; 626 struct cmd_header hdr;
626 627
627 /* request: number of beacons (N) to average the SNR and NF over 628 /*
629 * request: number of beacons (N) to average the SNR and NF over
628 * response: SNR of most recent beacon 630 * response: SNR of most recent beacon
629 */ 631 */
630 __le16 n_or_snr; 632 __le16 n_or_snr;
631 633
632 /* The following fields are only set in the response. 634 /*
635 * The following fields are only set in the response.
633 * In the request these are reserved and should be set to 0. 636 * In the request these are reserved and should be set to 0.
634 */ 637 */
635 __le16 nf; /* most recent beacon noise floor */ 638 __le16 nf; /* most recent beacon noise floor */
@@ -680,14 +683,16 @@ struct cmd_ds_802_11_ps_mode {
680 683
681 __le16 action; 684 __le16 action;
682 685
683 /* Interval for keepalive in PS mode: 686 /*
687 * Interval for keepalive in PS mode:
684 * 0x0000 = don't change 688 * 0x0000 = don't change
685 * 0x001E = firmware default 689 * 0x001E = firmware default
686 * 0xFFFF = disable 690 * 0xFFFF = disable
687 */ 691 */
688 __le16 nullpktinterval; 692 __le16 nullpktinterval;
689 693
690 /* Number of DTIM intervals to wake up for: 694 /*
695 * Number of DTIM intervals to wake up for:
691 * 0 = don't change 696 * 0 = don't change
692 * 1 = firmware default 697 * 1 = firmware default
693 * 5 = max 698 * 5 = max
@@ -697,7 +702,8 @@ struct cmd_ds_802_11_ps_mode {
697 __le16 reserved; 702 __le16 reserved;
698 __le16 locallisteninterval; 703 __le16 locallisteninterval;
699 704
700 /* AdHoc awake period (FW v9+ only): 705 /*
706 * AdHoc awake period (FW v9+ only):
701 * 0 = don't change 707 * 0 = don't change
702 * 1 = always awake (IEEE standard behavior) 708 * 1 = always awake (IEEE standard behavior)
703 * 2 - 31 = sleep for (n - 1) periods and awake for 1 period 709 * 2 - 31 = sleep for (n - 1) periods and awake for 1 period
@@ -771,7 +777,8 @@ struct adhoc_bssdesc {
771 __le16 capability; 777 __le16 capability;
772 u8 rates[MAX_RATES]; 778 u8 rates[MAX_RATES];
773 779
774 /* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the 780 /*
781 * DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
775 * Adhoc join command and will cause a binary layout mismatch with 782 * Adhoc join command and will cause a binary layout mismatch with
776 * the firmware 783 * the firmware
777 */ 784 */
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index fc8121190d38..4dfd48fe8b6e 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -312,7 +312,8 @@ static int if_cs_poll_while_fw_download(struct if_cs_card *card, uint addr, u8 r
312#define CF8385_MANFID 0x02df 312#define CF8385_MANFID 0x02df
313#define CF8385_CARDID 0x8103 313#define CF8385_CARDID 0x8103
314 314
315/* FIXME: just use the 'driver_info' field of 'struct pcmcia_device_id' when 315/*
316 * FIXME: just use the 'driver_info' field of 'struct pcmcia_device_id' when
316 * that gets fixed. Currently there's no way to access it from the probe hook. 317 * that gets fixed. Currently there's no way to access it from the probe hook.
317 */ 318 */
318static inline u32 get_model(u16 manf_id, u16 card_id) 319static inline u32 get_model(u16 manf_id, u16 card_id)
@@ -621,8 +622,10 @@ static int if_cs_prog_helper(struct if_cs_card *card, const struct firmware *fw)
621 if (remain < count) 622 if (remain < count)
622 count = remain; 623 count = remain;
623 624
624 /* "write the number of bytes to be sent to the I/O Command 625 /*
625 * write length register" */ 626 * "write the number of bytes to be sent to the I/O Command
627 * write length register"
628 */
626 if_cs_write16(card, IF_CS_CMD_LEN, count); 629 if_cs_write16(card, IF_CS_CMD_LEN, count);
627 630
628 /* "write this to I/O Command port register as 16 bit writes */ 631 /* "write this to I/O Command port register as 16 bit writes */
@@ -631,16 +634,22 @@ static int if_cs_prog_helper(struct if_cs_card *card, const struct firmware *fw)
631 &fw->data[sent], 634 &fw->data[sent],
632 count >> 1); 635 count >> 1);
633 636
634 /* "Assert the download over interrupt command in the Host 637 /*
635 * status register" */ 638 * "Assert the download over interrupt command in the Host
639 * status register"
640 */
636 if_cs_write8(card, IF_CS_HOST_STATUS, IF_CS_BIT_COMMAND); 641 if_cs_write8(card, IF_CS_HOST_STATUS, IF_CS_BIT_COMMAND);
637 642
638 /* "Assert the download over interrupt command in the Card 643 /*
639 * interrupt case register" */ 644 * "Assert the download over interrupt command in the Card
645 * interrupt case register"
646 */
640 if_cs_write16(card, IF_CS_HOST_INT_CAUSE, IF_CS_BIT_COMMAND); 647 if_cs_write16(card, IF_CS_HOST_INT_CAUSE, IF_CS_BIT_COMMAND);
641 648
642 /* "The host polls the Card Status register ... for 50 ms before 649 /*
643 declaring a failure */ 650 * "The host polls the Card Status register ... for 50 ms before
651 * declaring a failure"
652 */
644 ret = if_cs_poll_while_fw_download(card, IF_CS_CARD_STATUS, 653 ret = if_cs_poll_while_fw_download(card, IF_CS_CARD_STATUS,
645 IF_CS_BIT_COMMAND); 654 IF_CS_BIT_COMMAND);
646 if (ret < 0) { 655 if (ret < 0) {
@@ -841,7 +850,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
841 850
842 /* 851 /*
843 * Most of the libertas cards can do unaligned register access, but some 852 * Most of the libertas cards can do unaligned register access, but some
844 * weird ones can not. That's especially true for the CF8305 card. 853 * weird ones cannot. That's especially true for the CF8305 card.
845 */ 854 */
846 card->align_regs = 0; 855 card->align_regs = 0;
847 856
@@ -913,8 +922,10 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
913 goto out3; 922 goto out3;
914 } 923 }
915 924
916 /* Clear any interrupt cause that happend while sending 925 /*
917 * firmware/initializing card */ 926 * Clear any interrupt cause that happened while sending
927 * firmware/initializing card
928 */
918 if_cs_write16(card, IF_CS_CARD_INT_CAUSE, IF_CS_BIT_MASK); 929 if_cs_write16(card, IF_CS_CARD_INT_CAUSE, IF_CS_BIT_MASK);
919 if_cs_enable_ints(card); 930 if_cs_enable_ints(card);
920 931
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
index 078ef43d957d..67de5b3c68b2 100644
--- a/drivers/net/wireless/libertas/if_spi.c
+++ b/drivers/net/wireless/libertas/if_spi.c
@@ -143,8 +143,10 @@ static void spu_transaction_finish(struct if_spi_card *card)
143 card->prev_xfer_time = jiffies; 143 card->prev_xfer_time = jiffies;
144} 144}
145 145
146/* Write out a byte buffer to an SPI register, 146/*
147 * using a series of 16-bit transfers. */ 147 * Write out a byte buffer to an SPI register,
148 * using a series of 16-bit transfers.
149 */
148static int spu_write(struct if_spi_card *card, u16 reg, const u8 *buf, int len) 150static int spu_write(struct if_spi_card *card, u16 reg, const u8 *buf, int len)
149{ 151{
150 int err = 0; 152 int err = 0;
@@ -208,8 +210,10 @@ static int spu_read(struct if_spi_card *card, u16 reg, u8 *buf, int len)
208 struct spi_transfer dummy_trans; 210 struct spi_transfer dummy_trans;
209 struct spi_transfer data_trans; 211 struct spi_transfer data_trans;
210 212
211 /* You must take an even number of bytes from the SPU, even if you 213 /*
212 * don't care about the last one. */ 214 * You must take an even number of bytes from the SPU, even if you
215 * don't care about the last one.
216 */
213 BUG_ON(len & 0x1); 217 BUG_ON(len & 0x1);
214 218
215 spu_transaction_init(card); 219 spu_transaction_init(card);
@@ -258,8 +262,10 @@ static inline int spu_read_u16(struct if_spi_card *card, u16 reg, u16 *val)
258 return ret; 262 return ret;
259} 263}
260 264
261/* Read 32 bits from an SPI register. 265/*
262 * The low 16 bits are read first. */ 266 * Read 32 bits from an SPI register.
267 * The low 16 bits are read first.
268 */
263static int spu_read_u32(struct if_spi_card *card, u16 reg, u32 *val) 269static int spu_read_u32(struct if_spi_card *card, u16 reg, u32 *val)
264{ 270{
265 __le32 buf; 271 __le32 buf;
@@ -271,13 +277,15 @@ static int spu_read_u32(struct if_spi_card *card, u16 reg, u32 *val)
271 return err; 277 return err;
272} 278}
273 279
274/* Keep reading 16 bits from an SPI register until you get the correct result. 280/*
281 * Keep reading 16 bits from an SPI register until you get the correct result.
275 * 282 *
276 * If mask = 0, the correct result is any non-zero number. 283 * If mask = 0, the correct result is any non-zero number.
277 * If mask != 0, the correct result is any number where 284 * If mask != 0, the correct result is any number where
278 * number & target_mask == target 285 * number & target_mask == target
279 * 286 *
280 * Returns -ETIMEDOUT if a second passes without the correct result. */ 287 * Returns -ETIMEDOUT if a second passes without the correct result.
288 */
281static int spu_wait_for_u16(struct if_spi_card *card, u16 reg, 289static int spu_wait_for_u16(struct if_spi_card *card, u16 reg,
282 u16 target_mask, u16 target) 290 u16 target_mask, u16 target)
283{ 291{
@@ -305,8 +313,10 @@ static int spu_wait_for_u16(struct if_spi_card *card, u16 reg,
305 } 313 }
306} 314}
307 315
308/* Read 16 bits from an SPI register until you receive a specific value. 316/*
309 * Returns -ETIMEDOUT if a 4 tries pass without success. */ 317 * Read 16 bits from an SPI register until you receive a specific value.
318 * Returns -ETIMEDOUT if a 4 tries pass without success.
319 */
310static int spu_wait_for_u32(struct if_spi_card *card, u32 reg, u32 target) 320static int spu_wait_for_u32(struct if_spi_card *card, u32 reg, u32 target)
311{ 321{
312 int err, try; 322 int err, try;
@@ -328,8 +338,10 @@ static int spu_set_interrupt_mode(struct if_spi_card *card,
328{ 338{
329 int err = 0; 339 int err = 0;
330 340
331 /* We can suppress a host interrupt by clearing the appropriate 341 /*
332 * bit in the "host interrupt status mask" register */ 342 * We can suppress a host interrupt by clearing the appropriate
343 * bit in the "host interrupt status mask" register
344 */
333 if (suppress_host_int) { 345 if (suppress_host_int) {
334 err = spu_write_u16(card, IF_SPI_HOST_INT_STATUS_MASK_REG, 0); 346 err = spu_write_u16(card, IF_SPI_HOST_INT_STATUS_MASK_REG, 0);
335 if (err) 347 if (err)
@@ -345,10 +357,12 @@ static int spu_set_interrupt_mode(struct if_spi_card *card,
345 return err; 357 return err;
346 } 358 }
347 359
348 /* If auto-interrupts are on, the completion of certain transactions 360 /*
361 * If auto-interrupts are on, the completion of certain transactions
349 * will trigger an interrupt automatically. If auto-interrupts 362 * will trigger an interrupt automatically. If auto-interrupts
350 * are off, we need to set the "Card Interrupt Cause" register to 363 * are off, we need to set the "Card Interrupt Cause" register to
351 * trigger a card interrupt. */ 364 * trigger a card interrupt.
365 */
352 if (auto_int) { 366 if (auto_int) {
353 err = spu_write_u16(card, IF_SPI_HOST_INT_CTRL_REG, 367 err = spu_write_u16(card, IF_SPI_HOST_INT_CTRL_REG,
354 IF_SPI_HICT_TX_DOWNLOAD_OVER_AUTO | 368 IF_SPI_HICT_TX_DOWNLOAD_OVER_AUTO |
@@ -402,8 +416,10 @@ static int spu_init(struct if_spi_card *card, int use_dummy_writes)
402 int err = 0; 416 int err = 0;
403 u32 delay; 417 u32 delay;
404 418
405 /* We have to start up in timed delay mode so that we can safely 419 /*
406 * read the Delay Read Register. */ 420 * We have to start up in timed delay mode so that we can safely
421 * read the Delay Read Register.
422 */
407 card->use_dummy_writes = 0; 423 card->use_dummy_writes = 0;
408 err = spu_set_bus_mode(card, 424 err = spu_set_bus_mode(card,
409 IF_SPI_BUS_MODE_SPI_CLOCK_PHASE_RISING | 425 IF_SPI_BUS_MODE_SPI_CLOCK_PHASE_RISING |
@@ -459,8 +475,10 @@ static int if_spi_prog_helper_firmware(struct if_spi_card *card,
459 475
460 /* Load helper firmware image */ 476 /* Load helper firmware image */
461 while (bytes_remaining > 0) { 477 while (bytes_remaining > 0) {
462 /* Scratch pad 1 should contain the number of bytes we 478 /*
463 * want to download to the firmware */ 479 * Scratch pad 1 should contain the number of bytes we
480 * want to download to the firmware
481 */
464 err = spu_write_u16(card, IF_SPI_SCRATCH_1_REG, 482 err = spu_write_u16(card, IF_SPI_SCRATCH_1_REG,
465 HELPER_FW_LOAD_CHUNK_SZ); 483 HELPER_FW_LOAD_CHUNK_SZ);
466 if (err) 484 if (err)
@@ -472,8 +490,10 @@ static int if_spi_prog_helper_firmware(struct if_spi_card *card,
472 if (err) 490 if (err)
473 goto out; 491 goto out;
474 492
475 /* Feed the data into the command read/write port reg 493 /*
476 * in chunks of 64 bytes */ 494 * Feed the data into the command read/write port reg
495 * in chunks of 64 bytes
496 */
477 memset(temp, 0, sizeof(temp)); 497 memset(temp, 0, sizeof(temp));
478 memcpy(temp, fw, 498 memcpy(temp, fw,
479 min(bytes_remaining, HELPER_FW_LOAD_CHUNK_SZ)); 499 min(bytes_remaining, HELPER_FW_LOAD_CHUNK_SZ));
@@ -495,9 +515,11 @@ static int if_spi_prog_helper_firmware(struct if_spi_card *card,
495 fw += HELPER_FW_LOAD_CHUNK_SZ; 515 fw += HELPER_FW_LOAD_CHUNK_SZ;
496 } 516 }
497 517
498 /* Once the helper / single stage firmware download is complete, 518 /*
519 * Once the helper / single stage firmware download is complete,
499 * write 0 to scratch pad 1 and interrupt the 520 * write 0 to scratch pad 1 and interrupt the
500 * bootloader. This completes the helper download. */ 521 * bootloader. This completes the helper download.
522 */
501 err = spu_write_u16(card, IF_SPI_SCRATCH_1_REG, FIRMWARE_DNLD_OK); 523 err = spu_write_u16(card, IF_SPI_SCRATCH_1_REG, FIRMWARE_DNLD_OK);
502 if (err) 524 if (err)
503 goto out; 525 goto out;
@@ -517,16 +539,20 @@ out:
517 return err; 539 return err;
518} 540}
519 541
520/* Returns the length of the next packet the firmware expects us to send 542/*
521 * Sets crc_err if the previous transfer had a CRC error. */ 543 * Returns the length of the next packet the firmware expects us to send.
544 * Sets crc_err if the previous transfer had a CRC error.
545 */
522static int if_spi_prog_main_firmware_check_len(struct if_spi_card *card, 546static int if_spi_prog_main_firmware_check_len(struct if_spi_card *card,
523 int *crc_err) 547 int *crc_err)
524{ 548{
525 u16 len; 549 u16 len;
526 int err = 0; 550 int err = 0;
527 551
528 /* wait until the host interrupt status register indicates 552 /*
529 * that we are ready to download */ 553 * wait until the host interrupt status register indicates
554 * that we are ready to download
555 */
530 err = spu_wait_for_u16(card, IF_SPI_HOST_INT_STATUS_REG, 556 err = spu_wait_for_u16(card, IF_SPI_HOST_INT_STATUS_REG,
531 IF_SPI_HIST_CMD_DOWNLOAD_RDY, 557 IF_SPI_HIST_CMD_DOWNLOAD_RDY,
532 IF_SPI_HIST_CMD_DOWNLOAD_RDY); 558 IF_SPI_HIST_CMD_DOWNLOAD_RDY);
@@ -587,8 +613,10 @@ static int if_spi_prog_main_firmware(struct if_spi_card *card,
587 goto out; 613 goto out;
588 } 614 }
589 if (bytes < 0) { 615 if (bytes < 0) {
590 /* If there are no more bytes left, we would normally 616 /*
591 * expect to have terminated with len = 0 */ 617 * If there are no more bytes left, we would normally
618 * expect to have terminated with len = 0
619 */
592 lbs_pr_err("Firmware load wants more bytes " 620 lbs_pr_err("Firmware load wants more bytes "
593 "than we have to offer.\n"); 621 "than we have to offer.\n");
594 break; 622 break;
@@ -660,14 +688,18 @@ static int if_spi_c2h_cmd(struct if_spi_card *card)
660 u16 len; 688 u16 len;
661 u8 i; 689 u8 i;
662 690
663 /* We need a buffer big enough to handle whatever people send to 691 /*
664 * hw_host_to_card */ 692 * We need a buffer big enough to handle whatever people send to
693 * hw_host_to_card
694 */
665 BUILD_BUG_ON(IF_SPI_CMD_BUF_SIZE < LBS_CMD_BUFFER_SIZE); 695 BUILD_BUG_ON(IF_SPI_CMD_BUF_SIZE < LBS_CMD_BUFFER_SIZE);
666 BUILD_BUG_ON(IF_SPI_CMD_BUF_SIZE < LBS_UPLD_SIZE); 696 BUILD_BUG_ON(IF_SPI_CMD_BUF_SIZE < LBS_UPLD_SIZE);
667 697
668 /* It's just annoying if the buffer size isn't a multiple of 4, because 698 /*
669 * then we might have len < IF_SPI_CMD_BUF_SIZE but 699 * It's just annoying if the buffer size isn't a multiple of 4, because
670 * ALIGN(len, 4) > IF_SPI_CMD_BUF_SIZE */ 700 * then we might have len < IF_SPI_CMD_BUF_SIZE but
701 * ALIGN(len, 4) > IF_SPI_CMD_BUF_SIZE
702 */
671 BUILD_BUG_ON(IF_SPI_CMD_BUF_SIZE % 4 != 0); 703 BUILD_BUG_ON(IF_SPI_CMD_BUF_SIZE % 4 != 0);
672 704
673 lbs_deb_enter(LBS_DEB_SPI); 705 lbs_deb_enter(LBS_DEB_SPI);
@@ -838,8 +870,10 @@ static void if_spi_host_to_card_worker(struct work_struct *work)
838 870
839 lbs_deb_enter(LBS_DEB_SPI); 871 lbs_deb_enter(LBS_DEB_SPI);
840 872
841 /* Read the host interrupt status register to see what we 873 /*
842 * can do. */ 874 * Read the host interrupt status register to see what we
875 * can do.
876 */
843 err = spu_read_u16(card, IF_SPI_HOST_INT_STATUS_REG, 877 err = spu_read_u16(card, IF_SPI_HOST_INT_STATUS_REG,
844 &hiStatus); 878 &hiStatus);
845 if (err) { 879 if (err) {
@@ -858,12 +892,15 @@ static void if_spi_host_to_card_worker(struct work_struct *work)
858 goto err; 892 goto err;
859 } 893 }
860 894
861 /* workaround: in PS mode, the card does not set the Command 895 /*
862 * Download Ready bit, but it sets TX Download Ready. */ 896 * workaround: in PS mode, the card does not set the Command
897 * Download Ready bit, but it sets TX Download Ready.
898 */
863 if (hiStatus & IF_SPI_HIST_CMD_DOWNLOAD_RDY || 899 if (hiStatus & IF_SPI_HIST_CMD_DOWNLOAD_RDY ||
864 (card->priv->psstate != PS_STATE_FULL_POWER && 900 (card->priv->psstate != PS_STATE_FULL_POWER &&
865 (hiStatus & IF_SPI_HIST_TX_DOWNLOAD_RDY))) { 901 (hiStatus & IF_SPI_HIST_TX_DOWNLOAD_RDY))) {
866 /* This means two things. First of all, 902 /*
903 * This means two things. First of all,
867 * if there was a previous command sent, the card has 904 * if there was a previous command sent, the card has
868 * successfully received it. 905 * successfully received it.
869 * Secondly, it is now ready to download another 906 * Secondly, it is now ready to download another
@@ -871,8 +908,7 @@ static void if_spi_host_to_card_worker(struct work_struct *work)
871 */ 908 */
872 lbs_host_to_card_done(card->priv); 909 lbs_host_to_card_done(card->priv);
873 910
874 /* Do we have any command packets from the host to 911 /* Do we have any command packets from the host to send? */
875 * send? */
876 packet = NULL; 912 packet = NULL;
877 spin_lock_irqsave(&card->buffer_lock, flags); 913 spin_lock_irqsave(&card->buffer_lock, flags);
878 if (!list_empty(&card->cmd_packet_list)) { 914 if (!list_empty(&card->cmd_packet_list)) {
@@ -886,8 +922,7 @@ static void if_spi_host_to_card_worker(struct work_struct *work)
886 if_spi_h2c(card, packet, MVMS_CMD); 922 if_spi_h2c(card, packet, MVMS_CMD);
887 } 923 }
888 if (hiStatus & IF_SPI_HIST_TX_DOWNLOAD_RDY) { 924 if (hiStatus & IF_SPI_HIST_TX_DOWNLOAD_RDY) {
889 /* Do we have any data packets from the host to 925 /* Do we have any data packets from the host to send? */
890 * send? */
891 packet = NULL; 926 packet = NULL;
892 spin_lock_irqsave(&card->buffer_lock, flags); 927 spin_lock_irqsave(&card->buffer_lock, flags);
893 if (!list_empty(&card->data_packet_list)) { 928 if (!list_empty(&card->data_packet_list)) {
@@ -914,7 +949,8 @@ err:
914 * Host to Card 949 * Host to Card
915 * 950 *
916 * Called from Libertas to transfer some data to the WLAN device 951 * Called from Libertas to transfer some data to the WLAN device
917 * We can't sleep here. */ 952 * We can't sleep here.
953 */
918static int if_spi_host_to_card(struct lbs_private *priv, 954static int if_spi_host_to_card(struct lbs_private *priv,
919 u8 type, u8 *buf, u16 nb) 955 u8 type, u8 *buf, u16 nb)
920{ 956{
@@ -1125,8 +1161,10 @@ static int __devinit if_spi_probe(struct spi_device *spi)
1125 if (err) 1161 if (err)
1126 goto free_card; 1162 goto free_card;
1127 1163
1128 /* Register our card with libertas. 1164 /*
1129 * This will call alloc_etherdev */ 1165 * Register our card with libertas.
1166 * This will call alloc_etherdev.
1167 */
1130 priv = lbs_add_card(card, &spi->dev); 1168 priv = lbs_add_card(card, &spi->dev);
1131 if (!priv) { 1169 if (!priv) {
1132 err = -ENOMEM; 1170 err = -ENOMEM;
@@ -1153,9 +1191,11 @@ static int __devinit if_spi_probe(struct spi_device *spi)
1153 goto terminate_workqueue; 1191 goto terminate_workqueue;
1154 } 1192 }
1155 1193
1156 /* Start the card. 1194 /*
1195 * Start the card.
1157 * This will call register_netdev, and we'll start 1196 * This will call register_netdev, and we'll start
1158 * getting interrupts... */ 1197 * getting interrupts...
1198 */
1159 err = lbs_start_card(priv); 1199 err = lbs_start_card(priv);
1160 if (err) 1200 if (err)
1161 goto release_irq; 1201 goto release_irq;
diff --git a/drivers/net/wireless/libertas/if_spi.h b/drivers/net/wireless/libertas/if_spi.h
index 8b1417d3b71b..9745bd407d76 100644
--- a/drivers/net/wireless/libertas/if_spi.h
+++ b/drivers/net/wireless/libertas/if_spi.h
@@ -86,34 +86,34 @@
86#define IF_SPI_DEVICEID_CTRL_REG_TO_CARD_REV(dc) (dc & 0x000000ff) 86#define IF_SPI_DEVICEID_CTRL_REG_TO_CARD_REV(dc) (dc & 0x000000ff)
87 87
88/***************** IF_SPI_HOST_INT_CTRL_REG *****************/ 88/***************** IF_SPI_HOST_INT_CTRL_REG *****************/
89/** Host Interrupt Control bit : Wake up */ 89/* Host Interrupt Control bit : Wake up */
90#define IF_SPI_HICT_WAKE_UP (1<<0) 90#define IF_SPI_HICT_WAKE_UP (1<<0)
91/** Host Interrupt Control bit : WLAN ready */ 91/* Host Interrupt Control bit : WLAN ready */
92#define IF_SPI_HICT_WLAN_READY (1<<1) 92#define IF_SPI_HICT_WLAN_READY (1<<1)
93/*#define IF_SPI_HICT_FIFO_FIRST_HALF_EMPTY (1<<2) */ 93/*#define IF_SPI_HICT_FIFO_FIRST_HALF_EMPTY (1<<2) */
94/*#define IF_SPI_HICT_FIFO_SECOND_HALF_EMPTY (1<<3) */ 94/*#define IF_SPI_HICT_FIFO_SECOND_HALF_EMPTY (1<<3) */
95/*#define IF_SPI_HICT_IRQSRC_WLAN (1<<4) */ 95/*#define IF_SPI_HICT_IRQSRC_WLAN (1<<4) */
96/** Host Interrupt Control bit : Tx auto download */ 96/* Host Interrupt Control bit : Tx auto download */
97#define IF_SPI_HICT_TX_DOWNLOAD_OVER_AUTO (1<<5) 97#define IF_SPI_HICT_TX_DOWNLOAD_OVER_AUTO (1<<5)
98/** Host Interrupt Control bit : Rx auto upload */ 98/* Host Interrupt Control bit : Rx auto upload */
99#define IF_SPI_HICT_RX_UPLOAD_OVER_AUTO (1<<6) 99#define IF_SPI_HICT_RX_UPLOAD_OVER_AUTO (1<<6)
100/** Host Interrupt Control bit : Command auto download */ 100/* Host Interrupt Control bit : Command auto download */
101#define IF_SPI_HICT_CMD_DOWNLOAD_OVER_AUTO (1<<7) 101#define IF_SPI_HICT_CMD_DOWNLOAD_OVER_AUTO (1<<7)
102/** Host Interrupt Control bit : Command auto upload */ 102/* Host Interrupt Control bit : Command auto upload */
103#define IF_SPI_HICT_CMD_UPLOAD_OVER_AUTO (1<<8) 103#define IF_SPI_HICT_CMD_UPLOAD_OVER_AUTO (1<<8)
104 104
105/***************** IF_SPI_CARD_INT_CAUSE_REG *****************/ 105/***************** IF_SPI_CARD_INT_CAUSE_REG *****************/
106/** Card Interrupt Case bit : Tx download over */ 106/* Card Interrupt Case bit : Tx download over */
107#define IF_SPI_CIC_TX_DOWNLOAD_OVER (1<<0) 107#define IF_SPI_CIC_TX_DOWNLOAD_OVER (1<<0)
108/** Card Interrupt Case bit : Rx upload over */ 108/* Card Interrupt Case bit : Rx upload over */
109#define IF_SPI_CIC_RX_UPLOAD_OVER (1<<1) 109#define IF_SPI_CIC_RX_UPLOAD_OVER (1<<1)
110/** Card Interrupt Case bit : Command download over */ 110/* Card Interrupt Case bit : Command download over */
111#define IF_SPI_CIC_CMD_DOWNLOAD_OVER (1<<2) 111#define IF_SPI_CIC_CMD_DOWNLOAD_OVER (1<<2)
112/** Card Interrupt Case bit : Host event */ 112/* Card Interrupt Case bit : Host event */
113#define IF_SPI_CIC_HOST_EVENT (1<<3) 113#define IF_SPI_CIC_HOST_EVENT (1<<3)
114/** Card Interrupt Case bit : Command upload over */ 114/* Card Interrupt Case bit : Command upload over */
115#define IF_SPI_CIC_CMD_UPLOAD_OVER (1<<4) 115#define IF_SPI_CIC_CMD_UPLOAD_OVER (1<<4)
116/** Card Interrupt Case bit : Power down */ 116/* Card Interrupt Case bit : Power down */
117#define IF_SPI_CIC_POWER_DOWN (1<<5) 117#define IF_SPI_CIC_POWER_DOWN (1<<5)
118 118
119/***************** IF_SPI_CARD_INT_STATUS_REG *****************/ 119/***************** IF_SPI_CARD_INT_STATUS_REG *****************/
@@ -138,51 +138,51 @@
138#define IF_SPI_HICU_CMD_RD_FIFO_UNDERFLOW (1<<10) 138#define IF_SPI_HICU_CMD_RD_FIFO_UNDERFLOW (1<<10)
139 139
140/***************** IF_SPI_HOST_INT_STATUS_REG *****************/ 140/***************** IF_SPI_HOST_INT_STATUS_REG *****************/
141/** Host Interrupt Status bit : Tx download ready */ 141/* Host Interrupt Status bit : Tx download ready */
142#define IF_SPI_HIST_TX_DOWNLOAD_RDY (1<<0) 142#define IF_SPI_HIST_TX_DOWNLOAD_RDY (1<<0)
143/** Host Interrupt Status bit : Rx upload ready */ 143/* Host Interrupt Status bit : Rx upload ready */
144#define IF_SPI_HIST_RX_UPLOAD_RDY (1<<1) 144#define IF_SPI_HIST_RX_UPLOAD_RDY (1<<1)
145/** Host Interrupt Status bit : Command download ready */ 145/* Host Interrupt Status bit : Command download ready */
146#define IF_SPI_HIST_CMD_DOWNLOAD_RDY (1<<2) 146#define IF_SPI_HIST_CMD_DOWNLOAD_RDY (1<<2)
147/** Host Interrupt Status bit : Card event */ 147/* Host Interrupt Status bit : Card event */
148#define IF_SPI_HIST_CARD_EVENT (1<<3) 148#define IF_SPI_HIST_CARD_EVENT (1<<3)
149/** Host Interrupt Status bit : Command upload ready */ 149/* Host Interrupt Status bit : Command upload ready */
150#define IF_SPI_HIST_CMD_UPLOAD_RDY (1<<4) 150#define IF_SPI_HIST_CMD_UPLOAD_RDY (1<<4)
151/** Host Interrupt Status bit : I/O write FIFO overflow */ 151/* Host Interrupt Status bit : I/O write FIFO overflow */
152#define IF_SPI_HIST_IO_WR_FIFO_OVERFLOW (1<<5) 152#define IF_SPI_HIST_IO_WR_FIFO_OVERFLOW (1<<5)
153/** Host Interrupt Status bit : I/O read FIFO underflow */ 153/* Host Interrupt Status bit : I/O read FIFO underflow */
154#define IF_SPI_HIST_IO_RD_FIFO_UNDRFLOW (1<<6) 154#define IF_SPI_HIST_IO_RD_FIFO_UNDRFLOW (1<<6)
155/** Host Interrupt Status bit : Data write FIFO overflow */ 155/* Host Interrupt Status bit : Data write FIFO overflow */
156#define IF_SPI_HIST_DATA_WR_FIFO_OVERFLOW (1<<7) 156#define IF_SPI_HIST_DATA_WR_FIFO_OVERFLOW (1<<7)
157/** Host Interrupt Status bit : Data read FIFO underflow */ 157/* Host Interrupt Status bit : Data read FIFO underflow */
158#define IF_SPI_HIST_DATA_RD_FIFO_UNDERFLOW (1<<8) 158#define IF_SPI_HIST_DATA_RD_FIFO_UNDERFLOW (1<<8)
159/** Host Interrupt Status bit : Command write FIFO overflow */ 159/* Host Interrupt Status bit : Command write FIFO overflow */
160#define IF_SPI_HIST_CMD_WR_FIFO_OVERFLOW (1<<9) 160#define IF_SPI_HIST_CMD_WR_FIFO_OVERFLOW (1<<9)
161/** Host Interrupt Status bit : Command read FIFO underflow */ 161/* Host Interrupt Status bit : Command read FIFO underflow */
162#define IF_SPI_HIST_CMD_RD_FIFO_UNDERFLOW (1<<10) 162#define IF_SPI_HIST_CMD_RD_FIFO_UNDERFLOW (1<<10)
163 163
164/***************** IF_SPI_HOST_INT_STATUS_MASK_REG *****************/ 164/***************** IF_SPI_HOST_INT_STATUS_MASK_REG *****************/
165/** Host Interrupt Status Mask bit : Tx download ready */ 165/* Host Interrupt Status Mask bit : Tx download ready */
166#define IF_SPI_HISM_TX_DOWNLOAD_RDY (1<<0) 166#define IF_SPI_HISM_TX_DOWNLOAD_RDY (1<<0)
167/** Host Interrupt Status Mask bit : Rx upload ready */ 167/* Host Interrupt Status Mask bit : Rx upload ready */
168#define IF_SPI_HISM_RX_UPLOAD_RDY (1<<1) 168#define IF_SPI_HISM_RX_UPLOAD_RDY (1<<1)
169/** Host Interrupt Status Mask bit : Command download ready */ 169/* Host Interrupt Status Mask bit : Command download ready */
170#define IF_SPI_HISM_CMD_DOWNLOAD_RDY (1<<2) 170#define IF_SPI_HISM_CMD_DOWNLOAD_RDY (1<<2)
171/** Host Interrupt Status Mask bit : Card event */ 171/* Host Interrupt Status Mask bit : Card event */
172#define IF_SPI_HISM_CARDEVENT (1<<3) 172#define IF_SPI_HISM_CARDEVENT (1<<3)
173/** Host Interrupt Status Mask bit : Command upload ready */ 173/* Host Interrupt Status Mask bit : Command upload ready */
174#define IF_SPI_HISM_CMD_UPLOAD_RDY (1<<4) 174#define IF_SPI_HISM_CMD_UPLOAD_RDY (1<<4)
175/** Host Interrupt Status Mask bit : I/O write FIFO overflow */ 175/* Host Interrupt Status Mask bit : I/O write FIFO overflow */
176#define IF_SPI_HISM_IO_WR_FIFO_OVERFLOW (1<<5) 176#define IF_SPI_HISM_IO_WR_FIFO_OVERFLOW (1<<5)
177/** Host Interrupt Status Mask bit : I/O read FIFO underflow */ 177/* Host Interrupt Status Mask bit : I/O read FIFO underflow */
178#define IF_SPI_HISM_IO_RD_FIFO_UNDERFLOW (1<<6) 178#define IF_SPI_HISM_IO_RD_FIFO_UNDERFLOW (1<<6)
179/** Host Interrupt Status Mask bit : Data write FIFO overflow */ 179/* Host Interrupt Status Mask bit : Data write FIFO overflow */
180#define IF_SPI_HISM_DATA_WR_FIFO_OVERFLOW (1<<7) 180#define IF_SPI_HISM_DATA_WR_FIFO_OVERFLOW (1<<7)
181/** Host Interrupt Status Mask bit : Data write FIFO underflow */ 181/* Host Interrupt Status Mask bit : Data write FIFO underflow */
182#define IF_SPI_HISM_DATA_RD_FIFO_UNDERFLOW (1<<8) 182#define IF_SPI_HISM_DATA_RD_FIFO_UNDERFLOW (1<<8)
183/** Host Interrupt Status Mask bit : Command write FIFO overflow */ 183/* Host Interrupt Status Mask bit : Command write FIFO overflow */
184#define IF_SPI_HISM_CMD_WR_FIFO_OVERFLOW (1<<9) 184#define IF_SPI_HISM_CMD_WR_FIFO_OVERFLOW (1<<9)
185/** Host Interrupt Status Mask bit : Command write FIFO underflow */ 185/* Host Interrupt Status Mask bit : Command write FIFO underflow */
186#define IF_SPI_HISM_CMD_RD_FIFO_UNDERFLOW (1<<10) 186#define IF_SPI_HISM_CMD_RD_FIFO_UNDERFLOW (1<<10)
187 187
188/***************** IF_SPI_SPU_BUS_MODE_REG *****************/ 188/***************** IF_SPI_SPU_BUS_MODE_REG *****************/
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
index 6524c70363d9..e1e2128f4113 100644
--- a/drivers/net/wireless/libertas/if_usb.c
+++ b/drivers/net/wireless/libertas/if_usb.c
@@ -1,6 +1,6 @@
1/** 1/*
2 * This file contains functions used in USB interface module. 2 * This file contains functions used in USB interface module.
3 */ 3 */
4#include <linux/delay.h> 4#include <linux/delay.h>
5#include <linux/moduleparam.h> 5#include <linux/moduleparam.h>
6#include <linux/firmware.h> 6#include <linux/firmware.h>
@@ -66,7 +66,7 @@ static int if_usb_reset_device(struct if_usb_card *cardp);
66 66
67/* sysfs hooks */ 67/* sysfs hooks */
68 68
69/** 69/*
70 * Set function to write firmware to device's persistent memory 70 * Set function to write firmware to device's persistent memory
71 */ 71 */
72static ssize_t if_usb_firmware_set(struct device *dev, 72static ssize_t if_usb_firmware_set(struct device *dev,
@@ -85,7 +85,7 @@ static ssize_t if_usb_firmware_set(struct device *dev,
85 return ret; 85 return ret;
86} 86}
87 87
88/** 88/*
89 * lbs_flash_fw attribute to be exported per ethX interface through sysfs 89 * lbs_flash_fw attribute to be exported per ethX interface through sysfs
90 * (/sys/class/net/ethX/lbs_flash_fw). Use this like so to write firmware to 90 * (/sys/class/net/ethX/lbs_flash_fw). Use this like so to write firmware to
91 * the device's persistent memory: 91 * the device's persistent memory:
@@ -94,7 +94,14 @@ static ssize_t if_usb_firmware_set(struct device *dev,
94static DEVICE_ATTR(lbs_flash_fw, 0200, NULL, if_usb_firmware_set); 94static DEVICE_ATTR(lbs_flash_fw, 0200, NULL, if_usb_firmware_set);
95 95
96/** 96/**
97 * Set function to write firmware to device's persistent memory 97 * if_usb_boot2_set - write firmware to device's persistent memory
98 *
99 * @dev: target device
100 * @attr: device attributes
101 * @buf: firmware buffer to write
102 * @count: number of bytes to write
103 *
104 * returns: number of bytes written or negative error code
98 */ 105 */
99static ssize_t if_usb_boot2_set(struct device *dev, 106static ssize_t if_usb_boot2_set(struct device *dev,
100 struct device_attribute *attr, const char *buf, size_t count) 107 struct device_attribute *attr, const char *buf, size_t count)
@@ -112,7 +119,7 @@ static ssize_t if_usb_boot2_set(struct device *dev,
112 return ret; 119 return ret;
113} 120}
114 121
115/** 122/*
116 * lbs_flash_boot2 attribute to be exported per ethX interface through sysfs 123 * lbs_flash_boot2 attribute to be exported per ethX interface through sysfs
117 * (/sys/class/net/ethX/lbs_flash_boot2). Use this like so to write firmware 124 * (/sys/class/net/ethX/lbs_flash_boot2). Use this like so to write firmware
118 * to the device's persistent memory: 125 * to the device's persistent memory:
@@ -121,9 +128,10 @@ static ssize_t if_usb_boot2_set(struct device *dev,
121static DEVICE_ATTR(lbs_flash_boot2, 0200, NULL, if_usb_boot2_set); 128static DEVICE_ATTR(lbs_flash_boot2, 0200, NULL, if_usb_boot2_set);
122 129
123/** 130/**
124 * @brief call back function to handle the status of the URB 131 * if_usb_write_bulk_callback - callback function to handle the status
125 * @param urb pointer to urb structure 132 * of the URB
126 * @return N/A 133 * @urb: pointer to &urb structure
134 * returns: N/A
127 */ 135 */
128static void if_usb_write_bulk_callback(struct urb *urb) 136static void if_usb_write_bulk_callback(struct urb *urb)
129{ 137{
@@ -150,9 +158,9 @@ static void if_usb_write_bulk_callback(struct urb *urb)
150} 158}
151 159
152/** 160/**
153 * @brief free tx/rx urb, skb and rx buffer 161 * if_usb_free - free tx/rx urb, skb and rx buffer
154 * @param cardp pointer if_usb_card 162 * @cardp: pointer to &if_usb_card
155 * @return N/A 163 * returns: N/A
156 */ 164 */
157static void if_usb_free(struct if_usb_card *cardp) 165static void if_usb_free(struct if_usb_card *cardp)
158{ 166{
@@ -231,10 +239,10 @@ static void if_usb_reset_olpc_card(struct lbs_private *priv)
231#endif 239#endif
232 240
233/** 241/**
234 * @brief sets the configuration values 242 * if_usb_probe - sets the configuration values
235 * @param ifnum interface number 243 * @intf: &usb_interface pointer
236 * @param id pointer to usb_device_id 244 * @id: pointer to usb_device_id
237 * @return 0 on success, error code on failure 245 * returns: 0 on success, error code on failure
238 */ 246 */
239static int if_usb_probe(struct usb_interface *intf, 247static int if_usb_probe(struct usb_interface *intf,
240 const struct usb_device_id *id) 248 const struct usb_device_id *id)
@@ -366,9 +374,9 @@ error:
366} 374}
367 375
368/** 376/**
369 * @brief free resource and cleanup 377 * if_usb_disconnect - free resource and cleanup
370 * @param intf USB interface structure 378 * @intf: USB interface structure
371 * @return N/A 379 * returns: N/A
372 */ 380 */
373static void if_usb_disconnect(struct usb_interface *intf) 381static void if_usb_disconnect(struct usb_interface *intf)
374{ 382{
@@ -398,9 +406,9 @@ static void if_usb_disconnect(struct usb_interface *intf)
398} 406}
399 407
400/** 408/**
401 * @brief This function download FW 409 * if_usb_send_fw_pkt - download FW
402 * @param priv pointer to struct lbs_private 410 * @cardp: pointer to &struct if_usb_card
403 * @return 0 411 * returns: 0
404 */ 412 */
405static int if_usb_send_fw_pkt(struct if_usb_card *cardp) 413static int if_usb_send_fw_pkt(struct if_usb_card *cardp)
406{ 414{
@@ -486,11 +494,11 @@ static int if_usb_reset_device(struct if_usb_card *cardp)
486} 494}
487 495
488/** 496/**
489 * @brief This function transfer the data to the device. 497 * usb_tx_block - transfer the data to the device
490 * @param priv pointer to struct lbs_private 498 * @cardp: pointer to &struct if_usb_card
491 * @param payload pointer to payload data 499 * @payload: pointer to payload data
492 * @param nb data length 500 * @nb: data length
493 * @return 0 or -1 501 * returns: 0 for success or negative error code
494 */ 502 */
495static int usb_tx_block(struct if_usb_card *cardp, uint8_t *payload, uint16_t nb) 503static int usb_tx_block(struct if_usb_card *cardp, uint8_t *payload, uint16_t nb)
496{ 504{
@@ -727,11 +735,11 @@ static inline void process_cmdrequest(int recvlength, uint8_t *recvbuff,
727} 735}
728 736
729/** 737/**
730 * @brief This function reads of the packet into the upload buff, 738 * if_usb_receive - read the packet into the upload buffer,
731 * wake up the main thread and initialise the Rx callack. 739 * wake up the main thread and initialise the Rx callack
732 * 740 *
733 * @param urb pointer to struct urb 741 * @urb: pointer to &struct urb
734 * @return N/A 742 * returns: N/A
735 */ 743 */
736static void if_usb_receive(struct urb *urb) 744static void if_usb_receive(struct urb *urb)
737{ 745{
@@ -802,12 +810,12 @@ rx_exit:
802} 810}
803 811
804/** 812/**
805 * @brief This function downloads data to FW 813 * if_usb_host_to_card - downloads data to FW
806 * @param priv pointer to struct lbs_private structure 814 * @priv: pointer to &struct lbs_private structure
807 * @param type type of data 815 * @type: type of data
808 * @param buf pointer to data buffer 816 * @payload: pointer to data buffer
809 * @param len number of bytes 817 * @nb: number of bytes
810 * @return 0 or -1 818 * returns: 0 for success or negative error code
811 */ 819 */
812static int if_usb_host_to_card(struct lbs_private *priv, uint8_t type, 820static int if_usb_host_to_card(struct lbs_private *priv, uint8_t type,
813 uint8_t *payload, uint16_t nb) 821 uint8_t *payload, uint16_t nb)
@@ -831,10 +839,11 @@ static int if_usb_host_to_card(struct lbs_private *priv, uint8_t type,
831} 839}
832 840
833/** 841/**
834 * @brief This function issues Boot command to the Boot2 code 842 * if_usb_issue_boot_command - issues Boot command to the Boot2 code
835 * @param ivalue 1:Boot from FW by USB-Download 843 * @cardp: pointer to &if_usb_card
836 * 2:Boot from FW in EEPROM 844 * @ivalue: 1:Boot from FW by USB-Download
837 * @return 0 845 * 2:Boot from FW in EEPROM
846 * returns: 0 for success or negative error code
838 */ 847 */
839static int if_usb_issue_boot_command(struct if_usb_card *cardp, int ivalue) 848static int if_usb_issue_boot_command(struct if_usb_card *cardp, int ivalue)
840{ 849{
@@ -853,11 +862,11 @@ static int if_usb_issue_boot_command(struct if_usb_card *cardp, int ivalue)
853 862
854 863
855/** 864/**
856 * @brief This function checks the validity of Boot2/FW image. 865 * check_fwfile_format - check the validity of Boot2/FW image
857 * 866 *
858 * @param data pointer to image 867 * @data: pointer to image
859 * len image length 868 * @totlen: image length
860 * @return 0 or -1 869 * returns: 0 (good) or 1 (failure)
861 */ 870 */
862static int check_fwfile_format(const uint8_t *data, uint32_t totlen) 871static int check_fwfile_format(const uint8_t *data, uint32_t totlen)
863{ 872{
@@ -901,13 +910,13 @@ static int check_fwfile_format(const uint8_t *data, uint32_t totlen)
901 910
902 911
903/** 912/**
904* @brief This function programs the firmware subject to cmd 913* if_usb_prog_firmware - programs the firmware subject to cmd
905* 914*
906* @param cardp the if_usb_card descriptor 915* @cardp: the if_usb_card descriptor
907* fwname firmware or boot2 image file name 916* @fwname: firmware or boot2 image file name
908* cmd either BOOT_CMD_FW_BY_USB, BOOT_CMD_UPDATE_FW, 917* @cmd: either BOOT_CMD_FW_BY_USB, BOOT_CMD_UPDATE_FW,
909* or BOOT_CMD_UPDATE_BOOT2. 918* or BOOT_CMD_UPDATE_BOOT2.
910* @return 0 or error code 919* returns: 0 or error code
911*/ 920*/
912static int if_usb_prog_firmware(struct if_usb_card *cardp, 921static int if_usb_prog_firmware(struct if_usb_card *cardp,
913 const char *fwname, int cmd) 922 const char *fwname, int cmd)
diff --git a/drivers/net/wireless/libertas/if_usb.h b/drivers/net/wireless/libertas/if_usb.h
index d819e7e3c9aa..6e42eac331de 100644
--- a/drivers/net/wireless/libertas/if_usb.h
+++ b/drivers/net/wireless/libertas/if_usb.h
@@ -6,9 +6,9 @@
6 6
7struct lbs_private; 7struct lbs_private;
8 8
9/** 9/*
10 * This file contains definition for USB interface. 10 * This file contains definition for USB interface.
11 */ 11 */
12#define CMD_TYPE_REQUEST 0xF00DFACE 12#define CMD_TYPE_REQUEST 0xF00DFACE
13#define CMD_TYPE_DATA 0xBEADC0DE 13#define CMD_TYPE_DATA 0xBEADC0DE
14#define CMD_TYPE_INDICATION 0xBEEFFACE 14#define CMD_TYPE_INDICATION 0xBEEFFACE
@@ -40,7 +40,7 @@ struct bootcmdresp
40 uint8_t pad[2]; 40 uint8_t pad[2];
41}; 41};
42 42
43/** USB card description structure*/ 43/* USB card description structure*/
44struct if_usb_card { 44struct if_usb_card {
45 struct usb_device *udev; 45 struct usb_device *udev;
46 uint32_t model; /* MODEL_* */ 46 uint32_t model; /* MODEL_* */
@@ -77,7 +77,7 @@ struct if_usb_card {
77 __le16 boot2_version; 77 __le16 boot2_version;
78}; 78};
79 79
80/** fwheader */ 80/* fwheader */
81struct fwheader { 81struct fwheader {
82 __le32 dnldcmd; 82 __le32 dnldcmd;
83 __le32 baseaddr; 83 __le32 baseaddr;
@@ -86,14 +86,14 @@ struct fwheader {
86}; 86};
87 87
88#define FW_MAX_DATA_BLK_SIZE 600 88#define FW_MAX_DATA_BLK_SIZE 600
89/** FWData */ 89/* FWData */
90struct fwdata { 90struct fwdata {
91 struct fwheader hdr; 91 struct fwheader hdr;
92 __le32 seqnum; 92 __le32 seqnum;
93 uint8_t data[0]; 93 uint8_t data[0];
94}; 94};
95 95
96/** fwsyncheader */ 96/* fwsyncheader */
97struct fwsyncheader { 97struct fwsyncheader {
98 __le32 cmd; 98 __le32 cmd;
99 __le32 seqnum; 99 __le32 seqnum;
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,
diff --git a/drivers/net/wireless/libertas/mesh.c b/drivers/net/wireless/libertas/mesh.c
index 9d097b9c8005..a0804d12bf20 100644
--- a/drivers/net/wireless/libertas/mesh.c
+++ b/drivers/net/wireless/libertas/mesh.c
@@ -16,12 +16,15 @@
16 * Mesh sysfs support 16 * Mesh sysfs support
17 */ 17 */
18 18
19/** 19/*
20 * Attributes exported through sysfs 20 * Attributes exported through sysfs
21 */ 21 */
22 22
23/** 23/**
24 * @brief Get function for sysfs attribute anycast_mask 24 * lbs_anycast_get - Get function for sysfs attribute anycast_mask
25 * @dev: the &struct device
26 * @attr: device attributes
27 * @buf: buffer where data will be returned
25 */ 28 */
26static ssize_t lbs_anycast_get(struct device *dev, 29static ssize_t lbs_anycast_get(struct device *dev,
27 struct device_attribute *attr, char * buf) 30 struct device_attribute *attr, char * buf)
@@ -40,7 +43,11 @@ static ssize_t lbs_anycast_get(struct device *dev,
40} 43}
41 44
42/** 45/**
43 * @brief Set function for sysfs attribute anycast_mask 46 * lbs_anycast_set - Set function for sysfs attribute anycast_mask
47 * @dev: the &struct device
48 * @attr: device attributes
49 * @buf: buffer that contains new attribute value
50 * @count: size of buffer
44 */ 51 */
45static ssize_t lbs_anycast_set(struct device *dev, 52static ssize_t lbs_anycast_set(struct device *dev,
46 struct device_attribute *attr, const char * buf, size_t count) 53 struct device_attribute *attr, const char * buf, size_t count)
@@ -62,7 +69,10 @@ static ssize_t lbs_anycast_set(struct device *dev,
62} 69}
63 70
64/** 71/**
65 * @brief Get function for sysfs attribute prb_rsp_limit 72 * lbs_prb_rsp_limit_get - Get function for sysfs attribute prb_rsp_limit
73 * @dev: the &struct device
74 * @attr: device attributes
75 * @buf: buffer where data will be returned
66 */ 76 */
67static ssize_t lbs_prb_rsp_limit_get(struct device *dev, 77static ssize_t lbs_prb_rsp_limit_get(struct device *dev,
68 struct device_attribute *attr, char *buf) 78 struct device_attribute *attr, char *buf)
@@ -85,7 +95,11 @@ static ssize_t lbs_prb_rsp_limit_get(struct device *dev,
85} 95}
86 96
87/** 97/**
88 * @brief Set function for sysfs attribute prb_rsp_limit 98 * lbs_prb_rsp_limit_set - Set function for sysfs attribute prb_rsp_limit
99 * @dev: the &struct device
100 * @attr: device attributes
101 * @buf: buffer that contains new attribute value
102 * @count: size of buffer
89 */ 103 */
90static ssize_t lbs_prb_rsp_limit_set(struct device *dev, 104static ssize_t lbs_prb_rsp_limit_set(struct device *dev,
91 struct device_attribute *attr, const char *buf, size_t count) 105 struct device_attribute *attr, const char *buf, size_t count)
@@ -114,7 +128,10 @@ static ssize_t lbs_prb_rsp_limit_set(struct device *dev,
114} 128}
115 129
116/** 130/**
117 * Get function for sysfs attribute mesh 131 * lbs_mesh_get - Get function for sysfs attribute mesh
132 * @dev: the &struct device
133 * @attr: device attributes
134 * @buf: buffer where data will be returned
118 */ 135 */
119static ssize_t lbs_mesh_get(struct device *dev, 136static ssize_t lbs_mesh_get(struct device *dev,
120 struct device_attribute *attr, char * buf) 137 struct device_attribute *attr, char * buf)
@@ -124,7 +141,11 @@ static ssize_t lbs_mesh_get(struct device *dev,
124} 141}
125 142
126/** 143/**
127 * Set function for sysfs attribute mesh 144 * lbs_mesh_set - Set function for sysfs attribute mesh
145 * @dev: the &struct device
146 * @attr: device attributes
147 * @buf: buffer that contains new attribute value
148 * @count: size of buffer
128 */ 149 */
129static ssize_t lbs_mesh_set(struct device *dev, 150static ssize_t lbs_mesh_set(struct device *dev,
130 struct device_attribute *attr, const char * buf, size_t count) 151 struct device_attribute *attr, const char * buf, size_t count)
@@ -151,19 +172,19 @@ static ssize_t lbs_mesh_set(struct device *dev,
151 return count; 172 return count;
152} 173}
153 174
154/** 175/*
155 * lbs_mesh attribute to be exported per ethX interface 176 * lbs_mesh attribute to be exported per ethX interface
156 * through sysfs (/sys/class/net/ethX/lbs_mesh) 177 * through sysfs (/sys/class/net/ethX/lbs_mesh)
157 */ 178 */
158static DEVICE_ATTR(lbs_mesh, 0644, lbs_mesh_get, lbs_mesh_set); 179static DEVICE_ATTR(lbs_mesh, 0644, lbs_mesh_get, lbs_mesh_set);
159 180
160/** 181/*
161 * anycast_mask attribute to be exported per mshX interface 182 * anycast_mask attribute to be exported per mshX interface
162 * through sysfs (/sys/class/net/mshX/anycast_mask) 183 * through sysfs (/sys/class/net/mshX/anycast_mask)
163 */ 184 */
164static DEVICE_ATTR(anycast_mask, 0644, lbs_anycast_get, lbs_anycast_set); 185static DEVICE_ATTR(anycast_mask, 0644, lbs_anycast_get, lbs_anycast_set);
165 186
166/** 187/*
167 * prb_rsp_limit attribute to be exported per mshX interface 188 * prb_rsp_limit attribute to be exported per mshX interface
168 * through sysfs (/sys/class/net/mshX/prb_rsp_limit) 189 * through sysfs (/sys/class/net/mshX/prb_rsp_limit)
169 */ 190 */
@@ -274,10 +295,10 @@ int lbs_deinit_mesh(struct lbs_private *priv)
274 295
275 296
276/** 297/**
277 * @brief This function closes the mshX interface 298 * lbs_mesh_stop - close the mshX interface
278 * 299 *
279 * @param dev A pointer to net_device structure 300 * @dev: A pointer to &net_device structure
280 * @return 0 301 * returns: 0
281 */ 302 */
282static int lbs_mesh_stop(struct net_device *dev) 303static int lbs_mesh_stop(struct net_device *dev)
283{ 304{
@@ -301,10 +322,10 @@ static int lbs_mesh_stop(struct net_device *dev)
301} 322}
302 323
303/** 324/**
304 * @brief This function opens the mshX interface 325 * lbs_mesh_dev_open - open the mshX interface
305 * 326 *
306 * @param dev A pointer to net_device structure 327 * @dev: A pointer to &net_device structure
307 * @return 0 or -EBUSY if monitor mode active 328 * returns: 0 or -EBUSY if monitor mode active
308 */ 329 */
309static int lbs_mesh_dev_open(struct net_device *dev) 330static int lbs_mesh_dev_open(struct net_device *dev)
310{ 331{
@@ -342,10 +363,10 @@ static const struct net_device_ops mesh_netdev_ops = {
342}; 363};
343 364
344/** 365/**
345 * @brief This function adds mshX interface 366 * lbs_add_mesh - add mshX interface
346 * 367 *
347 * @param priv A pointer to the struct lbs_private structure 368 * @priv: A pointer to the &struct lbs_private structure
348 * @return 0 if successful, -X otherwise 369 * returns: 0 if successful, -X otherwise
349 */ 370 */
350int lbs_add_mesh(struct lbs_private *priv) 371int lbs_add_mesh(struct lbs_private *priv)
351{ 372{
@@ -456,13 +477,13 @@ void lbs_mesh_set_txpd(struct lbs_private *priv,
456 */ 477 */
457 478
458/** 479/**
459 * @brief Add or delete Mesh Blinding Table entries 480 * lbs_mesh_bt_add_del - Add or delete Mesh Blinding Table entries
460 * 481 *
461 * @param priv A pointer to struct lbs_private structure 482 * @priv: A pointer to &struct lbs_private structure
462 * @param add TRUE to add the entry, FALSE to delete it 483 * @add: TRUE to add the entry, FALSE to delete it
463 * @param addr1 Destination address to blind or unblind 484 * @addr1: Destination address to blind or unblind
464 * 485 *
465 * @return 0 on success, error on failure 486 * returns: 0 on success, error on failure
466 */ 487 */
467int lbs_mesh_bt_add_del(struct lbs_private *priv, bool add, u8 *addr1) 488int lbs_mesh_bt_add_del(struct lbs_private *priv, bool add, u8 *addr1)
468{ 489{
@@ -493,11 +514,11 @@ int lbs_mesh_bt_add_del(struct lbs_private *priv, bool add, u8 *addr1)
493} 514}
494 515
495/** 516/**
496 * @brief Reset/clear the mesh blinding table 517 * lbs_mesh_bt_reset - Reset/clear the mesh blinding table
497 * 518 *
498 * @param priv A pointer to struct lbs_private structure 519 * @priv: A pointer to &struct lbs_private structure
499 * 520 *
500 * @return 0 on success, error on failure 521 * returns: 0 on success, error on failure
501 */ 522 */
502int lbs_mesh_bt_reset(struct lbs_private *priv) 523int lbs_mesh_bt_reset(struct lbs_private *priv)
503{ 524{
@@ -517,17 +538,18 @@ int lbs_mesh_bt_reset(struct lbs_private *priv)
517} 538}
518 539
519/** 540/**
520 * @brief Gets the inverted status of the mesh blinding table 541 * lbs_mesh_bt_get_inverted - Gets the inverted status of the mesh
542 * blinding table
521 * 543 *
522 * Normally the firmware "blinds" or ignores traffic from mesh nodes in the 544 * Normally the firmware "blinds" or ignores traffic from mesh nodes in the
523 * table, but an inverted table allows *only* traffic from nodes listed in 545 * table, but an inverted table allows *only* traffic from nodes listed in
524 * the table. 546 * the table.
525 * 547 *
526 * @param priv A pointer to struct lbs_private structure 548 * @priv: A pointer to &struct lbs_private structure
527 * @param invert On success, TRUE if the blinding table is inverted, 549 * @inverted: On success, TRUE if the blinding table is inverted,
528 * FALSE if it is not inverted 550 * FALSE if it is not inverted
529 * 551 *
530 * @return 0 on success, error on failure 552 * returns: 0 on success, error on failure
531 */ 553 */
532int lbs_mesh_bt_get_inverted(struct lbs_private *priv, bool *inverted) 554int lbs_mesh_bt_get_inverted(struct lbs_private *priv, bool *inverted)
533{ 555{
@@ -551,18 +573,19 @@ int lbs_mesh_bt_get_inverted(struct lbs_private *priv, bool *inverted)
551} 573}
552 574
553/** 575/**
554 * @brief Sets the inverted status of the mesh blinding table 576 * lbs_mesh_bt_set_inverted - Sets the inverted status of the mesh
577 * blinding table
555 * 578 *
556 * Normally the firmware "blinds" or ignores traffic from mesh nodes in the 579 * Normally the firmware "blinds" or ignores traffic from mesh nodes in the
557 * table, but an inverted table allows *only* traffic from nodes listed in 580 * table, but an inverted table allows *only* traffic from nodes listed in
558 * the table. 581 * the table.
559 * 582 *
560 * @param priv A pointer to struct lbs_private structure 583 * @priv: A pointer to &struct lbs_private structure
561 * @param invert TRUE to invert the blinding table (only traffic from 584 * @inverted: TRUE to invert the blinding table (only traffic from
562 * listed nodes allowed), FALSE to return it 585 * listed nodes allowed), FALSE to return it
563 * to normal state (listed nodes ignored) 586 * to normal state (listed nodes ignored)
564 * 587 *
565 * @return 0 on success, error on failure 588 * returns: 0 on success, error on failure
566 */ 589 */
567int lbs_mesh_bt_set_inverted(struct lbs_private *priv, bool inverted) 590int lbs_mesh_bt_set_inverted(struct lbs_private *priv, bool inverted)
568{ 591{
@@ -583,13 +606,13 @@ int lbs_mesh_bt_set_inverted(struct lbs_private *priv, bool inverted)
583} 606}
584 607
585/** 608/**
586 * @brief List an entry in the mesh blinding table 609 * lbs_mesh_bt_get_entry - List an entry in the mesh blinding table
587 * 610 *
588 * @param priv A pointer to struct lbs_private structure 611 * @priv: A pointer to &struct lbs_private structure
589 * @param id The ID of the entry to list 612 * @id: The ID of the entry to list
590 * @param addr1 MAC address associated with the table entry 613 * @addr1: MAC address associated with the table entry
591 * 614 *
592 * @return 0 on success, error on failure 615 * returns: 0 on success, error on failure
593 */ 616 */
594int lbs_mesh_bt_get_entry(struct lbs_private *priv, u32 id, u8 *addr1) 617int lbs_mesh_bt_get_entry(struct lbs_private *priv, u32 id, u8 *addr1)
595{ 618{
@@ -614,14 +637,14 @@ int lbs_mesh_bt_get_entry(struct lbs_private *priv, u32 id, u8 *addr1)
614} 637}
615 638
616/** 639/**
617 * @brief Access the mesh forwarding table 640 * lbs_cmd_fwt_access - Access the mesh forwarding table
618 * 641 *
619 * @param priv A pointer to struct lbs_private structure 642 * @priv: A pointer to &struct lbs_private structure
620 * @param cmd_action The forwarding table action to perform 643 * @cmd_action: The forwarding table action to perform
621 * @param cmd The pre-filled FWT_ACCESS command 644 * @cmd: The pre-filled FWT_ACCESS command
622 * 645 *
623 * @return 0 on success and 'cmd' will be filled with the 646 * returns: 0 on success and 'cmd' will be filled with the
624 * firmware's response 647 * firmware's response
625 */ 648 */
626int lbs_cmd_fwt_access(struct lbs_private *priv, u16 cmd_action, 649int lbs_cmd_fwt_access(struct lbs_private *priv, u16 cmd_action,
627 struct cmd_ds_fwt_access *cmd) 650 struct cmd_ds_fwt_access *cmd)
@@ -774,7 +797,10 @@ static int mesh_get_default_parameters(struct device *dev,
774} 797}
775 798
776/** 799/**
777 * @brief Get function for sysfs attribute bootflag 800 * bootflag_get - Get function for sysfs attribute bootflag
801 * @dev: the &struct device
802 * @attr: device attributes
803 * @buf: buffer where data will be returned
778 */ 804 */
779static ssize_t bootflag_get(struct device *dev, 805static ssize_t bootflag_get(struct device *dev,
780 struct device_attribute *attr, char *buf) 806 struct device_attribute *attr, char *buf)
@@ -791,7 +817,11 @@ static ssize_t bootflag_get(struct device *dev,
791} 817}
792 818
793/** 819/**
794 * @brief Set function for sysfs attribute bootflag 820 * bootflag_set - Set function for sysfs attribute bootflag
821 * @dev: the &struct device
822 * @attr: device attributes
823 * @buf: buffer that contains new attribute value
824 * @count: size of buffer
795 */ 825 */
796static ssize_t bootflag_set(struct device *dev, struct device_attribute *attr, 826static ssize_t bootflag_set(struct device *dev, struct device_attribute *attr,
797 const char *buf, size_t count) 827 const char *buf, size_t count)
@@ -817,7 +847,10 @@ static ssize_t bootflag_set(struct device *dev, struct device_attribute *attr,
817} 847}
818 848
819/** 849/**
820 * @brief Get function for sysfs attribute boottime 850 * boottime_get - Get function for sysfs attribute boottime
851 * @dev: the &struct device
852 * @attr: device attributes
853 * @buf: buffer where data will be returned
821 */ 854 */
822static ssize_t boottime_get(struct device *dev, 855static ssize_t boottime_get(struct device *dev,
823 struct device_attribute *attr, char *buf) 856 struct device_attribute *attr, char *buf)
@@ -834,7 +867,11 @@ static ssize_t boottime_get(struct device *dev,
834} 867}
835 868
836/** 869/**
837 * @brief Set function for sysfs attribute boottime 870 * boottime_set - Set function for sysfs attribute boottime
871 * @dev: the &struct device
872 * @attr: device attributes
873 * @buf: buffer that contains new attribute value
874 * @count: size of buffer
838 */ 875 */
839static ssize_t boottime_set(struct device *dev, 876static ssize_t boottime_set(struct device *dev,
840 struct device_attribute *attr, const char *buf, size_t count) 877 struct device_attribute *attr, const char *buf, size_t count)
@@ -869,7 +906,10 @@ static ssize_t boottime_set(struct device *dev,
869} 906}
870 907
871/** 908/**
872 * @brief Get function for sysfs attribute channel 909 * channel_get - Get function for sysfs attribute channel
910 * @dev: the &struct device
911 * @attr: device attributes
912 * @buf: buffer where data will be returned
873 */ 913 */
874static ssize_t channel_get(struct device *dev, 914static ssize_t channel_get(struct device *dev,
875 struct device_attribute *attr, char *buf) 915 struct device_attribute *attr, char *buf)
@@ -886,7 +926,11 @@ static ssize_t channel_get(struct device *dev,
886} 926}
887 927
888/** 928/**
889 * @brief Set function for sysfs attribute channel 929 * channel_set - Set function for sysfs attribute channel
930 * @dev: the &struct device
931 * @attr: device attributes
932 * @buf: buffer that contains new attribute value
933 * @count: size of buffer
890 */ 934 */
891static ssize_t channel_set(struct device *dev, struct device_attribute *attr, 935static ssize_t channel_set(struct device *dev, struct device_attribute *attr,
892 const char *buf, size_t count) 936 const char *buf, size_t count)
@@ -912,7 +956,10 @@ static ssize_t channel_set(struct device *dev, struct device_attribute *attr,
912} 956}
913 957
914/** 958/**
915 * @brief Get function for sysfs attribute mesh_id 959 * mesh_id_get - Get function for sysfs attribute mesh_id
960 * @dev: the &struct device
961 * @attr: device attributes
962 * @buf: buffer where data will be returned
916 */ 963 */
917static ssize_t mesh_id_get(struct device *dev, struct device_attribute *attr, 964static ssize_t mesh_id_get(struct device *dev, struct device_attribute *attr,
918 char *buf) 965 char *buf)
@@ -938,7 +985,11 @@ static ssize_t mesh_id_get(struct device *dev, struct device_attribute *attr,
938} 985}
939 986
940/** 987/**
941 * @brief Set function for sysfs attribute mesh_id 988 * mesh_id_set - Set function for sysfs attribute mesh_id
989 * @dev: the &struct device
990 * @attr: device attributes
991 * @buf: buffer that contains new attribute value
992 * @count: size of buffer
942 */ 993 */
943static ssize_t mesh_id_set(struct device *dev, struct device_attribute *attr, 994static ssize_t mesh_id_set(struct device *dev, struct device_attribute *attr,
944 const char *buf, size_t count) 995 const char *buf, size_t count)
@@ -980,7 +1031,10 @@ static ssize_t mesh_id_set(struct device *dev, struct device_attribute *attr,
980} 1031}
981 1032
982/** 1033/**
983 * @brief Get function for sysfs attribute protocol_id 1034 * protocol_id_get - Get function for sysfs attribute protocol_id
1035 * @dev: the &struct device
1036 * @attr: device attributes
1037 * @buf: buffer where data will be returned
984 */ 1038 */
985static ssize_t protocol_id_get(struct device *dev, 1039static ssize_t protocol_id_get(struct device *dev,
986 struct device_attribute *attr, char *buf) 1040 struct device_attribute *attr, char *buf)
@@ -997,7 +1051,11 @@ static ssize_t protocol_id_get(struct device *dev,
997} 1051}
998 1052
999/** 1053/**
1000 * @brief Set function for sysfs attribute protocol_id 1054 * protocol_id_set - Set function for sysfs attribute protocol_id
1055 * @dev: the &struct device
1056 * @attr: device attributes
1057 * @buf: buffer that contains new attribute value
1058 * @count: size of buffer
1001 */ 1059 */
1002static ssize_t protocol_id_set(struct device *dev, 1060static ssize_t protocol_id_set(struct device *dev,
1003 struct device_attribute *attr, const char *buf, size_t count) 1061 struct device_attribute *attr, const char *buf, size_t count)
@@ -1034,7 +1092,10 @@ static ssize_t protocol_id_set(struct device *dev,
1034} 1092}
1035 1093
1036/** 1094/**
1037 * @brief Get function for sysfs attribute metric_id 1095 * metric_id_get - Get function for sysfs attribute metric_id
1096 * @dev: the &struct device
1097 * @attr: device attributes
1098 * @buf: buffer where data will be returned
1038 */ 1099 */
1039static ssize_t metric_id_get(struct device *dev, 1100static ssize_t metric_id_get(struct device *dev,
1040 struct device_attribute *attr, char *buf) 1101 struct device_attribute *attr, char *buf)
@@ -1051,7 +1112,11 @@ static ssize_t metric_id_get(struct device *dev,
1051} 1112}
1052 1113
1053/** 1114/**
1054 * @brief Set function for sysfs attribute metric_id 1115 * metric_id_set - Set function for sysfs attribute metric_id
1116 * @dev: the &struct device
1117 * @attr: device attributes
1118 * @buf: buffer that contains new attribute value
1119 * @count: size of buffer
1055 */ 1120 */
1056static ssize_t metric_id_set(struct device *dev, struct device_attribute *attr, 1121static ssize_t metric_id_set(struct device *dev, struct device_attribute *attr,
1057 const char *buf, size_t count) 1122 const char *buf, size_t count)
@@ -1088,7 +1153,10 @@ static ssize_t metric_id_set(struct device *dev, struct device_attribute *attr,
1088} 1153}
1089 1154
1090/** 1155/**
1091 * @brief Get function for sysfs attribute capability 1156 * capability_get - Get function for sysfs attribute capability
1157 * @dev: the &struct device
1158 * @attr: device attributes
1159 * @buf: buffer where data will be returned
1092 */ 1160 */
1093static ssize_t capability_get(struct device *dev, 1161static ssize_t capability_get(struct device *dev,
1094 struct device_attribute *attr, char *buf) 1162 struct device_attribute *attr, char *buf)
@@ -1105,7 +1173,11 @@ static ssize_t capability_get(struct device *dev,
1105} 1173}
1106 1174
1107/** 1175/**
1108 * @brief Set function for sysfs attribute capability 1176 * capability_set - Set function for sysfs attribute capability
1177 * @dev: the &struct device
1178 * @attr: device attributes
1179 * @buf: buffer that contains new attribute value
1180 * @count: size of buffer
1109 */ 1181 */
1110static ssize_t capability_set(struct device *dev, struct device_attribute *attr, 1182static ssize_t capability_set(struct device *dev, struct device_attribute *attr,
1111 const char *buf, size_t count) 1183 const char *buf, size_t count)
diff --git a/drivers/net/wireless/libertas/mesh.h b/drivers/net/wireless/libertas/mesh.h
index afb2e8dead3f..ee95c73ed5f4 100644
--- a/drivers/net/wireless/libertas/mesh.h
+++ b/drivers/net/wireless/libertas/mesh.h
@@ -1,6 +1,6 @@
1/** 1/*
2 * Contains all definitions needed for the Libertas' MESH implementation. 2 * Contains all definitions needed for the Libertas' MESH implementation.
3 */ 3 */
4#ifndef _LBS_MESH_H_ 4#ifndef _LBS_MESH_H_
5#define _LBS_MESH_H_ 5#define _LBS_MESH_H_
6 6
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c
index a2b1df21d286..a3f4b55aa41f 100644
--- a/drivers/net/wireless/libertas/rx.c
+++ b/drivers/net/wireless/libertas/rx.c
@@ -1,6 +1,6 @@
1/** 1/*
2 * This file contains the handling of RX in wlan driver. 2 * This file contains the handling of RX in wlan driver.
3 */ 3 */
4#include <linux/etherdevice.h> 4#include <linux/etherdevice.h>
5#include <linux/slab.h> 5#include <linux/slab.h>
6#include <linux/types.h> 6#include <linux/types.h>
@@ -40,12 +40,12 @@ static int process_rxed_802_11_packet(struct lbs_private *priv,
40 struct sk_buff *skb); 40 struct sk_buff *skb);
41 41
42/** 42/**
43 * @brief This function processes received packet and forwards it 43 * lbs_process_rxed_packet - processes received packet and forwards it
44 * to kernel/upper layer 44 * to kernel/upper layer
45 * 45 *
46 * @param priv A pointer to struct lbs_private 46 * @priv: A pointer to &struct lbs_private
47 * @param skb A pointer to skb which includes the received packet 47 * @skb: A pointer to skb which includes the received packet
48 * @return 0 or -1 48 * returns: 0 or -1
49 */ 49 */
50int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb) 50int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
51{ 51{
@@ -156,11 +156,11 @@ done:
156EXPORT_SYMBOL_GPL(lbs_process_rxed_packet); 156EXPORT_SYMBOL_GPL(lbs_process_rxed_packet);
157 157
158/** 158/**
159 * @brief This function converts Tx/Rx rates from the Marvell WLAN format 159 * convert_mv_rate_to_radiotap - converts Tx/Rx rates from Marvell WLAN format
160 * (see Table 2 in Section 3.1) to IEEE80211_RADIOTAP_RATE units (500 Kb/s) 160 * (see Table 2 in Section 3.1) to IEEE80211_RADIOTAP_RATE units (500 Kb/s)
161 * 161 *
162 * @param rate Input rate 162 * @rate: Input rate
163 * @return Output Rate (0 if invalid) 163 * returns: Output Rate (0 if invalid)
164 */ 164 */
165static u8 convert_mv_rate_to_radiotap(u8 rate) 165static u8 convert_mv_rate_to_radiotap(u8 rate)
166{ 166{
@@ -196,12 +196,12 @@ static u8 convert_mv_rate_to_radiotap(u8 rate)
196} 196}
197 197
198/** 198/**
199 * @brief This function processes a received 802.11 packet and forwards it 199 * process_rxed_802_11_packet - processes a received 802.11 packet and forwards
200 * to kernel/upper layer 200 * it to kernel/upper layer
201 * 201 *
202 * @param priv A pointer to struct lbs_private 202 * @priv: A pointer to &struct lbs_private
203 * @param skb A pointer to skb which includes the received packet 203 * @skb: A pointer to skb which includes the received packet
204 * @return 0 or -1 204 * returns: 0 or -1
205 */ 205 */
206static int process_rxed_802_11_packet(struct lbs_private *priv, 206static int process_rxed_802_11_packet(struct lbs_private *priv,
207 struct sk_buff *skb) 207 struct sk_buff *skb)
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c
index 8000ca6165d0..bbb95f88dc01 100644
--- a/drivers/net/wireless/libertas/tx.c
+++ b/drivers/net/wireless/libertas/tx.c
@@ -1,6 +1,6 @@
1/** 1/*
2 * This file contains the handling of TX in wlan driver. 2 * This file contains the handling of TX in wlan driver.
3 */ 3 */
4#include <linux/netdevice.h> 4#include <linux/netdevice.h>
5#include <linux/etherdevice.h> 5#include <linux/etherdevice.h>
6#include <linux/sched.h> 6#include <linux/sched.h>
@@ -13,11 +13,11 @@
13#include "dev.h" 13#include "dev.h"
14 14
15/** 15/**
16 * @brief This function converts Tx/Rx rates from IEEE80211_RADIOTAP_RATE 16 * convert_radiotap_rate_to_mv - converts Tx/Rx rates from IEEE80211_RADIOTAP_RATE
17 * units (500 Kb/s) into Marvell WLAN format (see Table 8 in Section 3.2.1) 17 * units (500 Kb/s) into Marvell WLAN format (see Table 8 in Section 3.2.1)
18 * 18 *
19 * @param rate Input rate 19 * @rate: Input rate
20 * @return Output Rate (0 if invalid) 20 * returns: Output Rate (0 if invalid)
21 */ 21 */
22static u32 convert_radiotap_rate_to_mv(u8 rate) 22static u32 convert_radiotap_rate_to_mv(u8 rate)
23{ 23{
@@ -51,12 +51,12 @@ static u32 convert_radiotap_rate_to_mv(u8 rate)
51} 51}
52 52
53/** 53/**
54 * @brief This function checks the conditions and sends packet to IF 54 * lbs_hard_start_xmit - checks the conditions and sends packet to IF
55 * layer if everything is ok. 55 * layer if everything is ok
56 * 56 *
57 * @param priv A pointer to struct lbs_private structure 57 * @skb: A pointer to skb which includes TX packet
58 * @param skb A pointer to skb which includes TX packet 58 * @dev: A pointer to the &struct net_device
59 * @return 0 or -1 59 * returns: 0 or -1
60 */ 60 */
61netdev_tx_t lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) 61netdev_tx_t lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
62{ 62{
@@ -168,13 +168,13 @@ netdev_tx_t lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
168} 168}
169 169
170/** 170/**
171 * @brief This function sends to the host the last transmitted packet, 171 * lbs_send_tx_feedback - sends to the host the last transmitted packet,
172 * filling the radiotap headers with transmission information. 172 * filling the radiotap headers with transmission information.
173 * 173 *
174 * @param priv A pointer to struct lbs_private structure 174 * @priv: A pointer to &struct lbs_private structure
175 * @param status A 32 bit value containing transmission status. 175 * @try_count: A 32-bit value containing transmission retry status.
176 * 176 *
177 * @returns void 177 * returns: void
178 */ 178 */
179void lbs_send_tx_feedback(struct lbs_private *priv, u32 try_count) 179void lbs_send_tx_feedback(struct lbs_private *priv, u32 try_count)
180{ 180{
diff --git a/drivers/net/wireless/libertas/types.h b/drivers/net/wireless/libertas/types.h
index 462fbb4cb743..cf1d9b047ee6 100644
--- a/drivers/net/wireless/libertas/types.h
+++ b/drivers/net/wireless/libertas/types.h
@@ -1,6 +1,6 @@
1/** 1/*
2 * This header file contains definition for global types 2 * This header file contains definition for global types
3 */ 3 */
4#ifndef _LBS_TYPES_H_ 4#ifndef _LBS_TYPES_H_
5#define _LBS_TYPES_H_ 5#define _LBS_TYPES_H_
6 6
@@ -54,7 +54,7 @@ union ieee_phy_param_set {
54 struct ieee_ie_ds_param_set ds; 54 struct ieee_ie_ds_param_set ds;
55} __packed; 55} __packed;
56 56
57/** TLV type ID definition */ 57/* TLV type ID definition */
58#define PROPRIETARY_TLV_BASE_ID 0x0100 58#define PROPRIETARY_TLV_BASE_ID 0x0100
59 59
60/* Terminating TLV type */ 60/* Terminating TLV type */
@@ -96,7 +96,7 @@ union ieee_phy_param_set {
96#define TLV_TYPE_MESH_ID (PROPRIETARY_TLV_BASE_ID + 37) 96#define TLV_TYPE_MESH_ID (PROPRIETARY_TLV_BASE_ID + 37)
97#define TLV_TYPE_OLD_MESH_ID (PROPRIETARY_TLV_BASE_ID + 291) 97#define TLV_TYPE_OLD_MESH_ID (PROPRIETARY_TLV_BASE_ID + 291)
98 98
99/** TLV related data structures*/ 99/* TLV related data structures */
100struct mrvl_ie_header { 100struct mrvl_ie_header {
101 __le16 type; 101 __le16 type;
102 __le16 len; 102 __le16 len;
@@ -177,7 +177,7 @@ struct mrvl_ie_auth_type {
177 __le16 auth; 177 __le16 auth;
178} __packed; 178} __packed;
179 179
180/** Local Power capability */ 180/* Local Power capability */
181struct mrvl_ie_power_capability { 181struct mrvl_ie_power_capability {
182 struct mrvl_ie_header header; 182 struct mrvl_ie_header header;
183 s8 minpower; 183 s8 minpower;
@@ -235,9 +235,11 @@ struct mrvl_ie_ledbhv {
235 struct led_bhv ledbhv[1]; 235 struct led_bhv ledbhv[1];
236} __packed; 236} __packed;
237 237
238/* Meant to be packed as the value member of a struct ieee80211_info_element. 238/*
239 * Meant to be packed as the value member of a struct ieee80211_info_element.
239 * Note that the len member of the ieee80211_info_element varies depending on 240 * Note that the len member of the ieee80211_info_element varies depending on
240 * the mesh_id_len */ 241 * the mesh_id_len
242 */
241struct mrvl_meshie_val { 243struct mrvl_meshie_val {
242 uint8_t oui[3]; 244 uint8_t oui[3];
243 uint8_t type; 245 uint8_t type;