Commit 8973a6e7 authored by Randy Dunlap's avatar Randy Dunlap Committed by John W. Linville

libertas: use kernel-doc notation, fix comment style

Convert all libertas/ files to use kernel-doc notation instead
of whatever it was (doxygen?).

Add or fix function parameters in several places.

Use expected style for multi-line comments in lots of places.

Remove erroneous /** in multiple places.
Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Acked-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 47684808
......@@ -122,8 +122,10 @@ static u8 lbs_auth_to_authtype(enum nl80211_auth_type auth_type)
}
/* Various firmware commands need the list of supported rates, but with
the hight-bit set for basic rates */
/*
* Various firmware commands need the list of supported rates, but with
* the hight-bit set for basic rates
*/
static int lbs_add_rates(u8 *rates)
{
size_t i;
......@@ -425,7 +427,7 @@ static int lbs_add_wpa_tlv(u8 *tlv, const u8 *ie, u8 ie_len)
return ie_len + 2;
}
/***************************************************************************
/*
* Set Channel
*/
......@@ -452,7 +454,7 @@ static int lbs_cfg_set_channel(struct wiphy *wiphy,
/***************************************************************************
/*
* Scanning
*/
......@@ -538,8 +540,10 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy,
goto done;
}
/* Validity check: the TLV holds TSF values with 8 bytes each, so
* the size in the TLV must match the nr_sets value */
/*
* Validity check: the TLV holds TSF values with 8 bytes each, so
* the size in the TLV must match the nr_sets value
*/
i = get_unaligned_le16(tsfdesc);
tsfdesc += 2;
if (i / 8 != scanresp->nr_sets) {
......@@ -581,8 +585,10 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy,
/* To find out the channel, we must parse the IEs */
ie = pos;
/* 6+1+8+2+2: size of BSSID, RSSI, time stamp, beacon
interval, capabilities */
/*
* 6+1+8+2+2: size of BSSID, RSSI, time stamp, beacon
* interval, capabilities
*/
ielen = left = len - (6 + 1 + 8 + 2 + 2);
while (left >= 2) {
u8 id, elen;
......@@ -790,7 +796,7 @@ static int lbs_cfg_scan(struct wiphy *wiphy,
/***************************************************************************
/*
* Events
*/
......@@ -825,7 +831,7 @@ void lbs_send_mic_failureevent(struct lbs_private *priv, u32 event)
/***************************************************************************
/*
* Connect/disconnect
*/
......@@ -950,8 +956,10 @@ static int lbs_enable_rsn(struct lbs_private *priv, int enable)
* Set WPA/WPA key material
*/
/* like "struct cmd_ds_802_11_key_material", but with cmd_header. Once we
* get rid of WEXT, this should go into host.h */
/*
* like "struct cmd_ds_802_11_key_material", but with cmd_header. Once we
* get rid of WEXT, this should go into host.h
*/
struct cmd_key_material {
struct cmd_header hdr;
......@@ -1536,7 +1544,7 @@ static int lbs_cfg_del_key(struct wiphy *wiphy, struct net_device *netdev,
}
/***************************************************************************
/*
* Get station
*/
......@@ -1581,7 +1589,7 @@ static int lbs_cfg_get_station(struct wiphy *wiphy, struct net_device *dev,
/***************************************************************************
/*
* "Site survey", here just current channel and noise level
*/
......@@ -1614,7 +1622,7 @@ static int lbs_get_survey(struct wiphy *wiphy, struct net_device *dev,
/***************************************************************************
/*
* Change interface
*/
......@@ -1656,11 +1664,12 @@ static int lbs_change_intf(struct wiphy *wiphy, struct net_device *dev,
/***************************************************************************
/*
* IBSS (Ad-Hoc)
*/
/* The firmware needs the following bits masked out of the beacon-derived
/*
* The firmware needs the following bits masked out of the beacon-derived
* capability field when associating/joining to a BSS:
* 9 (QoS), 11 (APSD), 12 (unused), 14 (unused), 15 (unused)
*/
......@@ -1999,7 +2008,7 @@ static int lbs_leave_ibss(struct wiphy *wiphy, struct net_device *dev)
/***************************************************************************
/*
* Initialization
*/
......
This diff is collapsed.
/**
* This file contains the handling of command
* responses as well as events generated by firmware.
*/
/*
* This file contains the handling of command
* responses as well as events generated by firmware.
*/
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/sched.h>
......@@ -12,12 +12,13 @@
#include "cmd.h"
/**
* @brief This function handles disconnect event. it
* reports disconnect to upper layer, clean tx/rx packets,
* reset link state etc.
* lbs_mac_event_disconnected - handles disconnect event. It
* reports disconnect to upper layer, clean tx/rx packets,
* reset link state etc.
*
* @priv: A pointer to struct lbs_private structure
*
* @param priv A pointer to struct lbs_private structure
* @return n/a
* returns: n/a
*/
void lbs_mac_event_disconnected(struct lbs_private *priv)
{
......
......@@ -849,15 +849,14 @@ static struct debug_data items[] = {
static int num_of_items = ARRAY_SIZE(items);
/**
* @brief proc read function
* lbs_debugfs_read - proc read function
*
* @param page pointer to buffer
* @param s read data starting position
* @param off offset
* @param cnt counter
* @param eof end of file flag
* @param data data to output
* @return number of output data
* @file: file to read
* @userbuf: pointer to buffer
* @count: number of bytes to read
* @ppos: read data starting position
*
* returns: amount of data read or negative error code
*/
static ssize_t lbs_debugfs_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
......@@ -897,13 +896,14 @@ static ssize_t lbs_debugfs_read(struct file *file, char __user *userbuf,
}
/**
* @brief proc write function
* lbs_debugfs_write - proc write function
*
* @f: file pointer
* @buf: pointer to data buffer
* @cnt: data number to write
* @ppos: file position
*
* @param f file pointer
* @param buf pointer to data buffer
* @param cnt data number to write
* @param data data to write
* @return number of data
* returns: amount of data written
*/
static ssize_t lbs_debugfs_write(struct file *f, const char __user *buf,
size_t cnt, loff_t *ppos)
......@@ -966,11 +966,11 @@ static const struct file_operations lbs_debug_fops = {
};
/**
* @brief create debug proc file
* lbs_debug_init - create debug proc file
*
* @priv: pointer to &struct lbs_private
*
* @param priv pointer struct lbs_private
* @param dev pointer net_device
* @return N/A
* returns: N/A
*/
static void lbs_debug_init(struct lbs_private *priv)
{
......
/**
* This file contains declaration referring to
* functions defined in other source files
*/
/*
* This file contains declaration referring to
* functions defined in other source files
*/
#ifndef _LBS_DECL_H_
#define _LBS_DECL_H_
......
/**
* This header file contains global constant/enum definitions,
* global variable declaration.
*/
/*
* This header file contains global constant/enum definitions,
* global variable declaration.
*/
#ifndef _LBS_DEFS_H_
#define _LBS_DEFS_H_
......@@ -123,19 +123,19 @@ static inline void lbs_deb_hex(unsigned int grp, const char *prompt, u8 *buf, in
/** Buffer Constants */
/* Buffer Constants */
/* The size of SQ memory PPA, DPA are 8 DWORDs, that keep the physical
* addresses of TxPD buffers. Station has only 8 TxPD available, Whereas
* driver has more local TxPDs. Each TxPD on the host memory is associated
* with a Tx control node. The driver maintains 8 RxPD descriptors for
* station firmware to store Rx packet information.
*
* Current version of MAC has a 32x6 multicast address buffer.
*
* 802.11b can have up to 14 channels, the driver keeps the
* BSSID(MAC address) of each APs or Ad hoc stations it has sensed.
*/
* addresses of TxPD buffers. Station has only 8 TxPD available, Whereas
* driver has more local TxPDs. Each TxPD on the host memory is associated
* with a Tx control node. The driver maintains 8 RxPD descriptors for
* station firmware to store Rx packet information.
*
* Current version of MAC has a 32x6 multicast address buffer.
*
* 802.11b can have up to 14 channels, the driver keeps the
* BSSID(MAC address) of each APs or Ad hoc stations it has sensed.
*/
#define MRVDRV_MAX_MULTICAST_LIST_SIZE 32
#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
#define WOL_RESULT_NOSPC_ERR 1
#define WOL_RESULT_EEXIST_ERR 2
/** Misc constants */
/* Misc constants */
/* This section defines 802.11 specific contants */
#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
#define MARVELL_MESH_IE_LENGTH 9
/* Values used to populate the struct mrvl_mesh_ie. The only time you need this
/*
* Values used to populate the struct mrvl_mesh_ie. The only time you need this
* is when enabling the mesh using CMD_MESH_CONFIG.
*/
#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
#define MARVELL_MESH_METRIC_ID 0
#define MARVELL_MESH_CAPABILITY 0
/** INT status Bit Definition*/
/* INT status Bit Definition */
#define MRVDRV_TX_DNLD_RDY 0x0001
#define MRVDRV_RX_UPLD_RDY 0x0002
#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
#define TPC_DEFAULT_P1 10
#define TPC_DEFAULT_P2 13
/** TxPD status */
/* TxPD status */
/* Station firmware use TxPD status field to report final Tx transmit
* result, Bit masks are used to present combined situations.
*/
/*
* Station firmware use TxPD status field to report final Tx transmit
* result, Bit masks are used to present combined situations.
*/
#define MRVDRV_TxPD_POWER_MGMT_NULL_PACKET 0x01
#define MRVDRV_TxPD_POWER_MGMT_LAST_PACKET 0x08
/** Tx mesh flag */
/* Currently we are using normal WDS flag as mesh flag.
/* Tx mesh flag */
/*
* Currently we are using normal WDS flag as mesh flag.
* TODO: change to proper mesh flag when MAC understands it.
*/
#define TxPD_CONTROL_WDS_FRAME (1<<17)
#define TxPD_MESH_FRAME TxPD_CONTROL_WDS_FRAME
/** Mesh interface ID */
/* Mesh interface ID */
#define MESH_IFACE_ID 0x0001
/** Mesh id should be in bits 14-13-12 */
/* Mesh id should be in bits 14-13-12 */
#define MESH_IFACE_BIT_OFFSET 0x000c
/** Mesh enable bit in FW capability */
/* Mesh enable bit in FW capability */
#define MESH_CAPINFO_ENABLE_MASK (1<<16)
/** FW definition from Marvell v4 */
/* FW definition from Marvell v4 */
#define MRVL_FW_V4 (0x04)
/** FW definition from Marvell v5 */
/* FW definition from Marvell v5 */
#define MRVL_FW_V5 (0x05)
/** FW definition from Marvell v10 */
/* FW definition from Marvell v10 */
#define MRVL_FW_V10 (0x0a)
/** FW major revision definition */
/* FW major revision definition */
#define MRVL_FW_MAJOR_REV(x) ((x)>>24)
/** RxPD status */
/* RxPD status */
#define MRVDRV_RXPD_STATUS_OK 0x0001
/** RxPD status - Received packet types */
/** Rx mesh flag */
/* Currently we are using normal WDS flag as mesh flag.
/* RxPD status - Received packet types */
/* Rx mesh flag */
/*
* Currently we are using normal WDS flag as mesh flag.
* TODO: change to proper mesh flag when MAC understands it.
*/
#define RxPD_CONTROL_WDS_FRAME (0x40)
#define RxPD_MESH_FRAME RxPD_CONTROL_WDS_FRAME
/** RSSI-related defines */
/* RSSI constants are used to implement 802.11 RSSI threshold
* indication. if the Rx packet signal got too weak for 5 consecutive
* times, miniport driver (driver) will report this event to wrapper
*/
/* RSSI-related defines */
/*
* RSSI constants are used to implement 802.11 RSSI threshold
* indication. if the Rx packet signal got too weak for 5 consecutive
* times, miniport driver (driver) will report this event to wrapper
*/
#define MRVDRV_NF_DEFAULT_SCAN_VALUE (-96)
/** RTS/FRAG related defines */
/* RTS/FRAG related defines */
#define MRVDRV_RTS_MIN_VALUE 0
#define MRVDRV_RTS_MAX_VALUE 2347
#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
#define MAX_LEDS 8
/** Global Variable Declaration */
/* Global Variable Declaration */
extern const char lbs_driver_version[];
extern u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE];
/** ENUM definition*/
/** SNRNF_TYPE */
/* ENUM definition */
/* SNRNF_TYPE */
enum SNRNF_TYPE {
TYPE_BEACON = 0,
TYPE_RXPD,
MAX_TYPE_B
};
/** SNRNF_DATA*/
/* SNRNF_DATA */
enum SNRNF_DATA {
TYPE_NOAVG = 0,
TYPE_AVG,
MAX_TYPE_AVG
};
/** LBS_802_11_POWER_MODE */
/* LBS_802_11_POWER_MODE */
enum LBS_802_11_POWER_MODE {
LBS802_11POWERMODECAM,
LBS802_11POWERMODEMAX_PSP,
LBS802_11POWERMODEFAST_PSP,
/*not a real mode, defined as an upper bound */
/* not a real mode, defined as an upper bound */
LBS802_11POWEMODEMAX
};
/** PS_STATE */
/* PS_STATE */
enum PS_STATE {
PS_STATE_FULL_POWER,
PS_STATE_AWAKE,
......@@ -337,7 +342,7 @@ enum PS_STATE {
PS_STATE_SLEEP
};
/** DNLD_STATE */
/* DNLD_STATE */
enum DNLD_STATE {
DNLD_RES_RECEIVED,
DNLD_DATA_SENT,
......@@ -345,19 +350,19 @@ enum DNLD_STATE {
DNLD_BOOTCMD_SENT,
};
/** LBS_MEDIA_STATE */
/* LBS_MEDIA_STATE */
enum LBS_MEDIA_STATE {
LBS_CONNECTED,
LBS_DISCONNECTED
};
/** LBS_802_11_PRIVACY_FILTER */
/* LBS_802_11_PRIVACY_FILTER */
enum LBS_802_11_PRIVACY_FILTER {
LBS802_11PRIVFILTERACCEPTALL,
LBS802_11PRIVFILTER8021XWEP
};
/** mv_ms_type */
/* mv_ms_type */
enum mv_ms_type {
MVMS_DAT = 0,
MVMS_CMD = 1,
......@@ -365,14 +370,14 @@ enum mv_ms_type {
MVMS_EVENT
};
/** KEY_TYPE_ID */
/* KEY_TYPE_ID */
enum KEY_TYPE_ID {
KEY_TYPE_ID_WEP = 0,
KEY_TYPE_ID_TKIP,
KEY_TYPE_ID_AES
};
/** KEY_INFO_WPA (applies to both TKIP and AES/CCMP) */
/* KEY_INFO_WPA (applies to both TKIP and AES/CCMP) */
enum KEY_INFO_WPA {
KEY_INFO_WPA_MCAST = 0x01,
KEY_INFO_WPA_UNICAST = 0x02,
......
/**
* This file contains definitions and data structures specific
* to Marvell 802.11 NIC. It contains the Device Information
* structure struct lbs_private..
*/
/*
* This file contains definitions and data structures specific
* to Marvell 802.11 NIC. It contains the Device Information
* structure struct lbs_private..
*/
#ifndef _LBS_DEV_H_
#define _LBS_DEV_H_
......@@ -12,7 +12,7 @@
#include <linux/kfifo.h>
/** sleep_params */
/* sleep_params */
struct sleep_params {
uint16_t sp_error;
uint16_t sp_offset;
......@@ -23,7 +23,7 @@ struct sleep_params {
};
/** Private structure for the MV device */
/* Private structure for the MV device */
struct lbs_private {
/* Basic networking */
......@@ -125,12 +125,12 @@ struct lbs_private {
/* Events sent from hardware to driver */
struct kfifo event_fifo;
/** thread to service interrupts */
/* thread to service interrupts */
struct task_struct *main_thread;
wait_queue_head_t waitq;
struct workqueue_struct *work_thread;
/** Encryption stuff */
/* Encryption stuff */
u8 authtype_auto;
u8 wep_tx_key;
u8 wep_key[4][WLAN_KEY_LEN_WEP104];
......@@ -162,7 +162,7 @@ struct lbs_private {
s16 txpower_min;
s16 txpower_max;
/** Scanning */
/* Scanning */
struct delayed_work scan_work;
int scan_channel;
/* Queue of things waiting for scan completion */
......
......@@ -20,7 +20,8 @@ static void lbs_ethtool_get_drvinfo(struct net_device *dev,
strcpy(info->version, lbs_driver_version);
}
/* All 8388 parts have 16KiB EEPROM size at the time of writing.
/*
* All 8388 parts have 16KiB EEPROM size at the time of writing.
* In case that changes this needs fixing.
*/
#define LBS_EEPROM_LEN 16384
......
/**
* This file function prototypes, data structure
* and definitions for all the host/station commands
*/
/*
* This file function prototypes, data structure
* and definitions for all the host/station commands
*/
#ifndef _LBS_HOST_H_
#define _LBS_HOST_H_
......@@ -13,9 +13,10 @@
#define CMD_OPTION_WAITFORRSP 0x0002
/** Host command IDs */
/* Host command IDs */
/* Return command are almost always the same as the host command, but with
/*
* Return command are almost always the same as the host command, but with
* bit 15 set high. There are a few exceptions, though...
*/
#define CMD_RET(cmd) (0x8000 | cmd)
......@@ -251,7 +252,7 @@ enum cmd_mesh_config_types {
CMD_TYPE_MESH_GET_MESH_IE, /* GET_DEFAULTS is superset of GET_MESHIE */
};
/** Card Event definition */
/* Card Event definition */
#define MACREG_INT_CODE_TX_PPA_FREE 0
#define MACREG_INT_CODE_TX_DMA_DONE 1
#define MACREG_INT_CODE_LINK_LOST_W_SCAN 2
......@@ -624,12 +625,14 @@ struct cmd_ds_802_11_rf_channel {
struct cmd_ds_802_11_rssi {
struct cmd_header hdr;
/* request: number of beacons (N) to average the SNR and NF over
/*
* request: number of beacons (N) to average the SNR and NF over
* response: SNR of most recent beacon
*/
__le16 n_or_snr;
/* The following fields are only set in the response.
/*
* The following fields are only set in the response.
* In the request these are reserved and should be set to 0.
*/
__le16 nf; /* most recent beacon noise floor */
......@@ -680,14 +683,16 @@ struct cmd_ds_802_11_ps_mode {
__le16 action;
/* Interval for keepalive in PS mode:
/*
* Interval for keepalive in PS mode:
* 0x0000 = don't change
* 0x001E = firmware default
* 0xFFFF = disable
*/
__le16 nullpktinterval;
/* Number of DTIM intervals to wake up for:
/*
* Number of DTIM intervals to wake up for:
* 0 = don't change
* 1 = firmware default
* 5 = max
......@@ -697,7 +702,8 @@ struct cmd_ds_802_11_ps_mode {
__le16 reserved;
__le16 locallisteninterval;
/* AdHoc awake period (FW v9+ only):
/*
* AdHoc awake period (FW v9+ only):
* 0 = don't change
* 1 = always awake (IEEE standard behavior)
* 2 - 31 = sleep for (n - 1) periods and awake for 1 period
......@@ -771,7 +777,8 @@ struct adhoc_bssdesc {
__le16 capability;
u8 rates[MAX_RATES];
/* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
/*
* DO NOT ADD ANY FIELDS TO THIS STRUCTURE. It is used below in the
* Adhoc join command and will cause a binary layout mismatch with
* the firmware
*/
......
......@@ -312,7 +312,8 @@ static int if_cs_poll_while_fw_download(struct if_cs_card *card, uint addr, u8 r
#define CF8385_MANFID 0x02df
#define CF8385_CARDID 0x8103
/* FIXME: just use the 'driver_info' field of 'struct pcmcia_device_id' when
/*
* FIXME: just use the 'driver_info' field of 'struct pcmcia_device_id' when
* that gets fixed. Currently there's no way to access it from the probe hook.
*/
static 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)
if (remain < count)
count = remain;
/* "write the number of bytes to be sent to the I/O Command
* write length register" */
/*
* "write the number of bytes to be sent to the I/O Command
* write length register"
*/
if_cs_write16(card, IF_CS_CMD_LEN, count);
/* "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)
&fw->data[sent],
count >> 1);
/* "Assert the download over interrupt command in the Host
* status register" */
/*
* "Assert the download over interrupt command in the Host
* status register"
*/
if_cs_write8(card, IF_CS_HOST_STATUS, IF_CS_BIT_COMMAND);
/* "Assert the download over interrupt command in the Card
* interrupt case register" */
/*
* "Assert the download over interrupt command in the Card
* interrupt case register"
*/
if_cs_write16(card, IF_CS_HOST_INT_CAUSE, IF_CS_BIT_COMMAND);
/* "The host polls the Card Status register ... for 50 ms before
declaring a failure */
/*
* "The host polls the Card Status register ... for 50 ms before
* declaring a failure"
*/
ret = if_cs_poll_while_fw_download(card, IF_CS_CARD_STATUS,
IF_CS_BIT_COMMAND);
if (ret < 0) {
......@@ -841,7 +850,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
/*
* Most of the libertas cards can do unaligned register access, but some
* weird ones can not. That's especially true for the CF8305 card.
* weird ones cannot. That's especially true for the CF8305 card.
*/
card->align_regs = 0;
......@@ -913,8 +922,10 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
goto out3;
}
/* Clear any interrupt cause that happend while sending
* firmware/initializing card */
/*
* Clear any interrupt cause that happened while sending
* firmware/initializing card
*/
if_cs_write16(card, IF_CS_CARD_INT_CAUSE, IF_CS_BIT_MASK);
if_cs_enable_ints(card);
......
This diff is collapsed.
......@@ -86,34 +86,34 @@
#define IF_SPI_DEVICEID_CTRL_REG_TO_CARD_REV(dc) (dc & 0x000000ff)
/***************** IF_SPI_HOST_INT_CTRL_REG *****************/
/** Host Interrupt Control bit : Wake up */
/* Host Interrupt Control bit : Wake up */
#define IF_SPI_HICT_WAKE_UP (1<<0)
/** Host Interrupt Control bit : WLAN ready */
/* Host Interrupt Control bit : WLAN ready */
#define IF_SPI_HICT_WLAN_READY (1<<1)
/*#define IF_SPI_HICT_FIFO_FIRST_HALF_EMPTY (1<<2) */
/*#define IF_SPI_HICT_FIFO_SECOND_HALF_EMPTY (1<<3) */
/*#define IF_SPI_HICT_IRQSRC_WLAN (1<<4) */
/** Host Interrupt Control bit : Tx auto download */
/* Host Interrupt Control bit : Tx auto download */
#define IF_SPI_HICT_TX_DOWNLOAD_OVER_AUTO (1<<5)
/** Host Interrupt Control bit : Rx auto upload */
/* Host Interrupt Control bit : Rx auto upload */
#define IF_SPI_HICT_RX_UPLOAD_OVER_AUTO (1<<6)
/** Host Interrupt Control bit : Command auto download */
/* Host Interrupt Control bit : Command auto download */
#define IF_SPI_HICT_CMD_DOWNLOAD_OVER_AUTO (1<<7)
/** Host Interrupt Control bit : Command auto upload */
/* Host Interrupt Control bit : Command auto upload */
#define IF_SPI_HICT_CMD_UPLOAD_OVER_AUTO (1<<8)
/***************** IF_SPI_CARD_INT_CAUSE_REG *****************/
/** Card Interrupt Case bit : Tx download over */
/* Card Interrupt Case bit : Tx download over */
#define IF_SPI_CIC_TX_DOWNLOAD_OVER (1<<0)
/** Card Interrupt Case bit : Rx upload over */
/* Card Interrupt Case bit : Rx upload over */
#define IF_SPI_CIC_RX_UPLOAD_OVER (1<<1)
/** Card Interrupt Case bit : Command download over */
/* Card Interrupt Case bit : Command download over */
#define IF_SPI_CIC_CMD_DOWNLOAD_OVER (1<<2)
/** Card Interrupt Case bit : Host event */
/* Card Interrupt Case bit : Host event */
#define IF_SPI_CIC_HOST_EVENT (1<<3)
/** Card Interrupt Case bit : Command upload over */
/* Card Interrupt Case bit : Command upload over */
#define IF_SPI_CIC_CMD_UPLOAD_OVER (1<<4)
/** Card Interrupt Case bit : Power down */
/* Card Interrupt Case bit : Power down */
#define IF_SPI_CIC_POWER_DOWN (1<<5)
/***************** IF_SPI_CARD_INT_STATUS_REG *****************/
......@@ -138,51 +138,51 @@
#define IF_SPI_HICU_CMD_RD_FIFO_UNDERFLOW (1<<10)
/***************** IF_SPI_HOST_INT_STATUS_REG *****************/
/** Host Interrupt Status bit : Tx download ready */
/* Host Interrupt Status bit : Tx download ready */
#define IF_SPI_HIST_TX_DOWNLOAD_RDY (1<<0)
/** Host Interrupt Status bit : Rx upload ready */
/* Host Interrupt Status bit : Rx upload ready */
#define IF_SPI_HIST_RX_UPLOAD_RDY (1<<1)
/** Host Interrupt Status bit : Command download ready */
/* Host Interrupt Status bit : Command download ready */
#define IF_SPI_HIST_CMD_DOWNLOAD_RDY (1<<2)
/** Host Interrupt Status bit : Card event */
/* Host Interrupt Status bit : Card event */
#define IF_SPI_HIST_CARD_EVENT (1<<3)
/** Host Interrupt Status bit : Command upload ready */
/* Host Interrupt Status bit : Command upload ready */
#define IF_SPI_HIST_CMD_UPLOAD_RDY (1<<4)
/** Host Interrupt Status bit : I/O write FIFO overflow */
/* Host Interrupt Status bit : I/O write FIFO overflow */
#define IF_SPI_HIST_IO_WR_FIFO_OVERFLOW (1<<5)
/** Host Interrupt Status bit : I/O read FIFO underflow */
/* Host Interrupt Status bit : I/O read FIFO underflow */
#define IF_SPI_HIST_IO_RD_FIFO_UNDRFLOW (1<<6)
/** Host Interrupt Status bit : Data write FIFO overflow */
/* Host Interrupt Status bit : Data write FIFO overflow */
#define IF_SPI_HIST_DATA_WR_FIFO_OVERFLOW (1<<7)
/** Host Interrupt Status bit : Data read FIFO underflow */
/* Host Interrupt Status bit : Data read FIFO underflow */
#define IF_SPI_HIST_DATA_RD_FIFO_UNDERFLOW (1<<8)
/** Host Interrupt Status bit : Command write FIFO overflow */
/* Host Interrupt Status bit : Command write FIFO overflow */
#define IF_SPI_HIST_CMD_WR_FIFO_OVERFLOW (1<<9)
/** Host Interrupt Status bit : Command read FIFO underflow */
/* Host Interrupt Status bit : Command read FIFO underflow */
#define IF_SPI_HIST_CMD_RD_FIFO_UNDERFLOW (1<<10)
/***************** IF_SPI_HOST_INT_STATUS_MASK_REG *****************/
/** Host Interrupt Status Mask bit : Tx download ready */
/* Host Interrupt Status Mask bit : Tx download ready */
#define IF_SPI_HISM_TX_DOWNLOAD_RDY (1<<0)
/** Host Interrupt Status Mask bit : Rx upload ready */
/* Host Interrupt Status Mask bit : Rx upload ready */
#define IF_SPI_HISM_RX_UPLOAD_RDY (1<<1)
/** Host Interrupt Status Mask bit : Command download ready */
/* Host Interrupt Status Mask bit : Command download ready */
#define IF_SPI_HISM_CMD_DOWNLOAD_RDY (1<<2)
/** Host Interrupt Status Mask bit : Card event */
/* Host Interrupt Status Mask bit : Card event */
#define IF_SPI_HISM_CARDEVENT (1<<3)
/** Host Interrupt Status Mask bit : Command upload ready */
/* Host Interrupt Status Mask bit : Command upload ready */
#define IF_SPI_HISM_CMD_UPLOAD_RDY (1<<4)
/** Host Interrupt Status Mask bit : I/O write FIFO overflow */
/* Host Interrupt Status Mask bit : I/O write FIFO overflow */
#define IF_SPI_HISM_IO_WR_FIFO_OVERFLOW (1<<5)
/** Host Interrupt Status Mask bit : I/O read FIFO underflow */
/* Host Interrupt Status Mask bit : I/O read FIFO underflow */
#define IF_SPI_HISM_IO_RD_FIFO_UNDERFLOW (1<<6)
/** Host Interrupt Status Mask bit : Data write FIFO overflow */
/* Host Interrupt Status Mask bit : Data write FIFO overflow */
#define IF_SPI_HISM_DATA_WR_FIFO_OVERFLOW (1<<7)
/** Host Interrupt Status Mask bit : Data write FIFO underflow */
/* Host Interrupt Status Mask bit : Data write FIFO underflow */
#define IF_SPI_HISM_DATA_RD_FIFO_UNDERFLOW (1<<8)
/** Host Interrupt Status Mask bit : Command write FIFO overflow */
/* Host Interrupt Status Mask bit : Command write FIFO overflow */
#define IF_SPI_HISM_CMD_WR_FIFO_OVERFLOW (1<<9)
/** Host Interrupt Status Mask bit : Command write FIFO underflow */
/* Host Interrupt Status Mask bit : Command write FIFO underflow */
#define IF_SPI_HISM_CMD_RD_FIFO_UNDERFLOW (1<<10)
/***************** IF_SPI_SPU_BUS_MODE_REG *****************/
......
/**
* This file contains functions used in USB interface module.
*/
/*
* This file contains functions used in USB interface module.
*/
#include <linux/delay.h>
#include <linux/moduleparam.h>
#include <linux/firmware.h>
......@@ -66,7 +66,7 @@ static int if_usb_reset_device(struct if_usb_card *cardp);
/* sysfs hooks */
/**
/*
* Set function to write firmware to device's persistent memory
*/
static ssize_t if_usb_firmware_set(struct device *dev,
......@@ -85,7 +85,7 @@ static ssize_t if_usb_firmware_set(struct device *dev,
return ret;
}
/**
/*
* lbs_flash_fw attribute to be exported per ethX interface through sysfs
* (/sys/class/net/ethX/lbs_flash_fw). Use this like so to write firmware to
* the device's persistent memory:
......@@ -94,7 +94,14 @@ static ssize_t if_usb_firmware_set(struct device *dev,
static DEVICE_ATTR(lbs_flash_fw, 0200, NULL, if_usb_firmware_set);
/**
* Set function to write firmware to device's persistent memory
* if_usb_boot2_set - write firmware to device's persistent memory
*
* @dev: target device
* @attr: device attributes
* @buf: firmware buffer to write
* @count: number of bytes to write
*
* returns: number of bytes written or negative error code
*/
static ssize_t if_usb_boot2_set(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
......@@ -112,7 +119,7 @@ static ssize_t if_usb_boot2_set(struct device *dev,
return ret;
}
/**
/*
* lbs_flash_boot2 attribute to be exported per ethX interface through sysfs
* (/sys/class/net/ethX/lbs_flash_boot2). Use this like so to write firmware
* to the device's persistent memory:
......@@ -121,9 +128,10 @@ static ssize_t if_usb_boot2_set(struct device *dev,
static DEVICE_ATTR(lbs_flash_boot2, 0200, NULL, if_usb_boot2_set);
/**
* @brief call back function to handle the status of the URB
* @param urb pointer to urb structure
* @return N/A
* if_usb_write_bulk_callback - callback function to handle the status
* of the URB
* @urb: pointer to &urb structure
* returns: N/A
*/
static void if_usb_write_bulk_callback(struct urb *urb)
{
......@@ -150,9 +158,9 @@ static void if_usb_write_bulk_callback(struct urb *urb)
}
/**
* @brief free tx/rx urb, skb and rx buffer
* @param cardp pointer if_usb_card
* @return N/A
* if_usb_free - free tx/rx urb, skb and rx buffer
* @cardp: pointer to &if_usb_card
* returns: N/A
*/
static void if_usb_free(struct if_usb_card *cardp)
{
......@@ -231,10 +239,10 @@ static void if_usb_reset_olpc_card(struct lbs_private *priv)
#endif
/**
* @brief sets the configuration values
* @param ifnum interface number
* @param id pointer to usb_device_id
* @return 0 on success, error code on failure
* if_usb_probe - sets the configuration values
* @intf: &usb_interface pointer
* @id: pointer to usb_device_id
* returns: 0 on success, error code on failure
*/
static int if_usb_probe(struct usb_interface *intf,
const struct usb_device_id *id)
......@@ -366,9 +374,9 @@ static int if_usb_probe(struct usb_interface *intf,
}
/**
* @brief free resource and cleanup
* @param intf USB interface structure
* @return N/A
* if_usb_disconnect - free resource and cleanup
* @intf: USB interface structure
* returns: N/A
*/
static void if_usb_disconnect(struct usb_interface *intf)
{
......@@ -398,9 +406,9 @@ static void if_usb_disconnect(struct usb_interface *intf)
}
/**
* @brief This function download FW
* @param priv pointer to struct lbs_private
* @return 0
* if_usb_send_fw_pkt - download FW
* @cardp: pointer to &struct if_usb_card
* returns: 0
*/
static int if_usb_send_fw_pkt(struct if_usb_card *cardp)
{
......@@ -486,11 +494,11 @@ static int if_usb_reset_device(struct if_usb_card *cardp)
}
/**
* @brief This function transfer the data to the device.
* @param priv pointer to struct lbs_private
* @param payload pointer to payload data
* @param nb data length
* @return 0 or -1
* usb_tx_block - transfer the data to the device
* @cardp: pointer to &struct if_usb_card
* @payload: pointer to payload data
* @nb: data length
* returns: 0 for success or negative error code
*/
static int usb_tx_block(struct if_usb_card *cardp, uint8_t *payload, uint16_t nb)
{
......@@ -727,11 +735,11 @@ static inline void process_cmdrequest(int recvlength, uint8_t *recvbuff,
}
/**
* @brief This function reads of the packet into the upload buff,
* wake up the main thread and initialise the Rx callack.
* if_usb_receive - read the packet into the upload buffer,
* wake up the main thread and initialise the Rx callack
*
* @param urb pointer to struct urb
* @return N/A
* @urb: pointer to &struct urb
* returns: N/A
*/
static void if_usb_receive(struct urb *urb)
{
......@@ -802,12 +810,12 @@ static void if_usb_receive(struct urb *urb)
}
/**
* @brief This function downloads data to FW
* @param priv pointer to struct lbs_private structure
* @param type type of data
* @param buf pointer to data buffer
* @param len number of bytes
* @return 0 or -1
* if_usb_host_to_card - downloads data to FW
* @priv: pointer to &struct lbs_private structure
* @type: type of data
* @payload: pointer to data buffer
* @nb: number of bytes
* returns: 0 for success or negative error code
*/
static int if_usb_host_to_card(struct lbs_private *priv, uint8_t type,
uint8_t *payload, uint16_t nb)
......@@ -831,10 +839,11 @@ static int if_usb_host_to_card(struct lbs_private *priv, uint8_t type,
}
/**
* @brief This function issues Boot command to the Boot2 code
* @param ivalue 1:Boot from FW by USB-Download
* 2:Boot from FW in EEPROM
* @return 0
* if_usb_issue_boot_command - issues Boot command to the Boot2 code
* @cardp: pointer to &if_usb_card
* @ivalue: 1:Boot from FW by USB-Download
* 2:Boot from FW in EEPROM
* returns: 0 for success or negative error code
*/
static int if_usb_issue_boot_command(struct if_usb_card *cardp, int ivalue)
{
......@@ -853,11 +862,11 @@ static int if_usb_issue_boot_command(struct if_usb_card *cardp, int ivalue)
/**
* @brief This function checks the validity of Boot2/FW image.
* check_fwfile_format - check the validity of Boot2/FW image
*
* @param data pointer to image
* len image length
* @return 0 or -1
* @data: pointer to image
* @totlen: image length
* returns: 0 (good) or 1 (failure)
*/
static int check_fwfile_format(const uint8_t *data, uint32_t totlen)
{
......@@ -901,13 +910,13 @@ static int check_fwfile_format(const uint8_t *data, uint32_t totlen)
/**
* @brief This function programs the firmware subject to cmd
* if_usb_prog_firmware - programs the firmware subject to cmd
*
* @param cardp the if_usb_card descriptor
* fwname firmware or boot2 image file name
* cmd either BOOT_CMD_FW_BY_USB, BOOT_CMD_UPDATE_FW,
* or BOOT_CMD_UPDATE_BOOT2.
* @return 0 or error code
* @cardp: the if_usb_card descriptor
* @fwname: firmware or boot2 image file name
* @cmd: either BOOT_CMD_FW_BY_USB, BOOT_CMD_UPDATE_FW,
* or BOOT_CMD_UPDATE_BOOT2.
* returns: 0 or error code
*/
static int if_usb_prog_firmware(struct if_usb_card *cardp,
const char *fwname, int cmd)
......
......@@ -6,9 +6,9 @@
struct lbs_private;
/**
* This file contains definition for USB interface.
*/
/*
* This file contains definition for USB interface.
*/
#define CMD_TYPE_REQUEST 0xF00DFACE
#define CMD_TYPE_DATA 0xBEADC0DE
#define CMD_TYPE_INDICATION 0xBEEFFACE
......@@ -40,7 +40,7 @@ struct bootcmdresp
uint8_t pad[2];
};
/** USB card description structure*/
/* USB card description structure*/
struct if_usb_card {
struct usb_device *udev;
uint32_t model; /* MODEL_* */
......@@ -77,7 +77,7 @@ struct if_usb_card {
__le16 boot2_version;
};
/** fwheader */
/* fwheader */
struct fwheader {
__le32 dnldcmd;
__le32 baseaddr;
......@@ -86,14 +86,14 @@ struct fwheader {
};
#define FW_MAX_DATA_BLK_SIZE 600
/** FWData */
/* FWData */
struct fwdata {
struct fwheader hdr;
__le32 seqnum;
uint8_t data[0];
};
/** fwsyncheader */
/* fwsyncheader */
struct fwsyncheader {
__le32 cmd;
__le32 seqnum;
......
/**
* This file contains the major functions in WLAN
* driver. It includes init, exit, open, close and main
* thread etc..
*/
/*
* This file contains the major functions in WLAN
* driver. It includes init, exit, open, close and main
* thread etc..
*/
#include <linux/moduleparam.h>
#include <linux/delay.h>
......@@ -35,18 +35,20 @@ EXPORT_SYMBOL_GPL(lbs_debug);
module_param_named(libertas_debug, lbs_debug, int, 0644);
/* This global structure is used to send the confirm_sleep command as
* fast as possible down to the firmware. */
/*
* This global structure is used to send the confirm_sleep command as
* fast as possible down to the firmware.
*/
struct cmd_confirm_sleep confirm_sleep;
/**
/*
* the table to keep region code
*/
u16 lbs_region_code_to_index[MRVDRV_MAX_REGION_CODE] =
{ 0x10, 0x20, 0x30, 0x31, 0x32, 0x40 };
/**
/*
* FW rate table. FW refers to rates by their index in this table, not by the
* rate value itself. Values of 0x00 are
* reserved positions.
......@@ -57,10 +59,10 @@ static u8 fw_data_rates[MAX_RATES] =
};
/**
* @brief use index to get the data rate
* lbs_fw_index_to_data_rate - use index to get the data rate
*
* @param idx The index of data rate
* @return data rate or 0
* @idx: The index of data rate
* returns: data rate or 0
*/
u32 lbs_fw_index_to_data_rate(u8 idx)
{
......@@ -70,10 +72,10 @@ u32 lbs_fw_index_to_data_rate(u8 idx)
}
/**
* @brief use rate to get the index
* lbs_data_rate_to_fw_index - use rate to get the index
*
* @param rate data rate
* @return index or 0
* @rate: data rate
* returns: index or 0
*/
u8 lbs_data_rate_to_fw_index(u32 rate)
{
......@@ -91,10 +93,10 @@ u8 lbs_data_rate_to_fw_index(u32 rate)
/**
* @brief This function opens the ethX interface
* lbs_dev_open - open the ethX interface
*
* @param dev A pointer to net_device structure
* @return 0 or -EBUSY if monitor mode active
* @dev: A pointer to &net_device structure
* returns: 0 or -EBUSY if monitor mode active
*/
static int lbs_dev_open(struct net_device *dev)
{
......@@ -120,10 +122,10 @@ static int lbs_dev_open(struct net_device *dev)
}
/**
* @brief This function closes the ethX interface
* lbs_eth_stop - close the ethX interface
*
* @param dev A pointer to net_device structure
* @return 0
* @dev: A pointer to &net_device structure
* returns: 0
*/
static int lbs_eth_stop(struct net_device *dev)
{
......@@ -336,12 +338,12 @@ void lbs_set_multicast_list(struct net_device *dev)
}
/**
* @brief This function handles the major jobs in the LBS driver.
* lbs_thread - handles the major jobs in the LBS driver.
* It handles all events generated by firmware, RX data received
* from firmware and TX data sent from kernel.
*
* @param data A pointer to lbs_thread structure
* @return 0
* @data: A pointer to &lbs_thread structure
* returns: 0
*/
static int lbs_thread(void *data)
{
......@@ -540,11 +542,11 @@ static int lbs_thread(void *data)
}
/**
* @brief This function gets the HW spec from the firmware and sets
* some basic parameters.
* lbs_setup_firmware - gets the HW spec from the firmware and sets
* some basic parameters
*
* @param priv A pointer to struct lbs_private structure
* @return 0 or -1
* @priv: A pointer to &struct lbs_private structure
* returns: 0 or -1
*/
static int lbs_setup_firmware(struct lbs_private *priv)
{
......@@ -630,8 +632,10 @@ int lbs_resume(struct lbs_private *priv)
EXPORT_SYMBOL_GPL(lbs_resume);
/**
* This function handles the timeout of command sending.
* It will re-send the same command again.
* lbs_cmd_timeout_handler - handles the timeout of command sending.
* It will re-send the same command again.
*
* @data: &struct lbs_private pointer
*/
static void lbs_cmd_timeout_handler(unsigned long data)
{
......@@ -655,8 +659,10 @@ static void lbs_cmd_timeout_handler(unsigned long data)
}
/**
* This function put the device back to deep sleep mode when timer expires
* and no activity (command, event, data etc.) is detected.
* auto_deepsleep_timer_fn - put the device back to deep sleep mode when
* timer expires and no activity (command, event, data etc.) is detected.
* @data: &struct lbs_private pointer
* returns: N/A
*/
static void auto_deepsleep_timer_fn(unsigned long data)
{
......@@ -792,11 +798,12 @@ static const struct net_device_ops lbs_netdev_ops = {
};
/**
* @brief This function adds the card. it will probe the
* lbs_add_card - adds the card. It will probe the
* card, allocate the lbs_priv and initialize the device.
*
* @param card A pointer to card
* @return A pointer to struct lbs_private structure
* @card: A pointer to card
* @dmdev: A pointer to &struct device
* returns: A pointer to &struct lbs_private structure
*/
struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
{
......@@ -1057,19 +1064,19 @@ void lbs_notify_command_response(struct lbs_private *priv, u8 resp_idx)
EXPORT_SYMBOL_GPL(lbs_notify_command_response);
/**
* @brief Retrieves two-stage firmware
* lbs_get_firmware - Retrieves two-stage firmware
*
* @param dev A pointer to device structure
* @param user_helper User-defined helper firmware file
* @param user_mainfw User-defined main firmware file
* @param card_model Bus-specific card model ID used to filter firmware table
* elements
* @param fw_table Table of firmware file names and device model numbers
* terminated by an entry with a NULL helper name
* @param helper On success, the helper firmware; caller must free
* @param mainfw On success, the main firmware; caller must free
* @dev: A pointer to &device structure
* @user_helper: User-defined helper firmware file
* @user_mainfw: User-defined main firmware file
* @card_model: Bus-specific card model ID used to filter firmware table
* elements
* @fw_table: Table of firmware file names and device model numbers
* terminated by an entry with a NULL helper name
* @helper: On success, the helper firmware; caller must free
* @mainfw: On success, the main firmware; caller must free
*
* @return 0 on success, non-zero on failure
* returns: 0 on success, non-zero on failure
*/
int lbs_get_firmware(struct device *dev, const char *user_helper,
const char *user_mainfw, u32 card_model,
......
This diff is collapsed.
/**
* Contains all definitions needed for the Libertas' MESH implementation.
*/
/*
* Contains all definitions needed for the Libertas' MESH implementation.
*/
#ifndef _LBS_MESH_H_
#define _LBS_MESH_H_
......
/**
* This file contains the handling of RX in wlan driver.
*/
/*
* This file contains the handling of RX in wlan driver.
*/
#include <linux/etherdevice.h>
#include <linux/slab.h>
#include <linux/types.h>
......@@ -40,12 +40,12 @@ static int process_rxed_802_11_packet(struct lbs_private *priv,
struct sk_buff *skb);
/**
* @brief This function processes received packet and forwards it
* to kernel/upper layer
* lbs_process_rxed_packet - processes received packet and forwards it
* to kernel/upper layer
*
* @param priv A pointer to struct lbs_private
* @param skb A pointer to skb which includes the received packet
* @return 0 or -1
* @priv: A pointer to &struct lbs_private
* @skb: A pointer to skb which includes the received packet
* returns: 0 or -1
*/
int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
{
......@@ -156,11 +156,11 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
EXPORT_SYMBOL_GPL(lbs_process_rxed_packet);
/**
* @brief This function converts Tx/Rx rates from the Marvell WLAN format
* (see Table 2 in Section 3.1) to IEEE80211_RADIOTAP_RATE units (500 Kb/s)
* convert_mv_rate_to_radiotap - converts Tx/Rx rates from Marvell WLAN format
* (see Table 2 in Section 3.1) to IEEE80211_RADIOTAP_RATE units (500 Kb/s)
*
* @param rate Input rate
* @return Output Rate (0 if invalid)
* @rate: Input rate
* returns: Output Rate (0 if invalid)
*/
static u8 convert_mv_rate_to_radiotap(u8 rate)
{
......@@ -196,12 +196,12 @@ static u8 convert_mv_rate_to_radiotap(u8 rate)
}
/**
* @brief This function processes a received 802.11 packet and forwards it
* to kernel/upper layer
* process_rxed_802_11_packet - processes a received 802.11 packet and forwards
* it to kernel/upper layer
*
* @param priv A pointer to struct lbs_private
* @param skb A pointer to skb which includes the received packet
* @return 0 or -1
* @priv: A pointer to &struct lbs_private
* @skb: A pointer to skb which includes the received packet
* returns: 0 or -1
*/
static int process_rxed_802_11_packet(struct lbs_private *priv,
struct sk_buff *skb)
......
/**
* This file contains the handling of TX in wlan driver.
*/
/*
* This file contains the handling of TX in wlan driver.
*/
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/sched.h>
......@@ -13,11 +13,11 @@
#include "dev.h"
/**
* @brief This function converts Tx/Rx rates from IEEE80211_RADIOTAP_RATE
* units (500 Kb/s) into Marvell WLAN format (see Table 8 in Section 3.2.1)
* convert_radiotap_rate_to_mv - converts Tx/Rx rates from IEEE80211_RADIOTAP_RATE
* units (500 Kb/s) into Marvell WLAN format (see Table 8 in Section 3.2.1)
*
* @param rate Input rate
* @return Output Rate (0 if invalid)
* @rate: Input rate
* returns: Output Rate (0 if invalid)
*/
static u32 convert_radiotap_rate_to_mv(u8 rate)
{
......@@ -51,12 +51,12 @@ static u32 convert_radiotap_rate_to_mv(u8 rate)
}
/**
* @brief This function checks the conditions and sends packet to IF
* layer if everything is ok.
* lbs_hard_start_xmit - checks the conditions and sends packet to IF
* layer if everything is ok
*
* @param priv A pointer to struct lbs_private structure
* @param skb A pointer to skb which includes TX packet
* @return 0 or -1
* @skb: A pointer to skb which includes TX packet
* @dev: A pointer to the &struct net_device
* returns: 0 or -1
*/
netdev_tx_t lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
......@@ -168,13 +168,13 @@ netdev_tx_t lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
}
/**
* @brief This function sends to the host the last transmitted packet,
* filling the radiotap headers with transmission information.
* lbs_send_tx_feedback - sends to the host the last transmitted packet,
* filling the radiotap headers with transmission information.
*
* @param priv A pointer to struct lbs_private structure
* @param status A 32 bit value containing transmission status.
* @priv: A pointer to &struct lbs_private structure
* @try_count: A 32-bit value containing transmission retry status.
*
* @returns void
* returns: void
*/
void lbs_send_tx_feedback(struct lbs_private *priv, u32 try_count)
{
......
/**
* This header file contains definition for global types
*/
/*
* This header file contains definition for global types
*/
#ifndef _LBS_TYPES_H_
#define _LBS_TYPES_H_
......@@ -54,7 +54,7 @@ union ieee_phy_param_set {
struct ieee_ie_ds_param_set ds;
} __packed;
/** TLV type ID definition */
/* TLV type ID definition */
#define PROPRIETARY_TLV_BASE_ID 0x0100
/* Terminating TLV type */
......@@ -96,7 +96,7 @@ union ieee_phy_param_set {
#define TLV_TYPE_MESH_ID (PROPRIETARY_TLV_BASE_ID + 37)
#define TLV_TYPE_OLD_MESH_ID (PROPRIETARY_TLV_BASE_ID + 291)
/** TLV related data structures*/
/* TLV related data structures */
struct mrvl_ie_header {
__le16 type;
__le16 len;
......@@ -177,7 +177,7 @@ struct mrvl_ie_auth_type {
__le16 auth;
} __packed;
/** Local Power capability */
/* Local Power capability */
struct mrvl_ie_power_capability {
struct mrvl_ie_header header;
s8 minpower;
......@@ -235,9 +235,11 @@ struct mrvl_ie_ledbhv {
struct led_bhv ledbhv[1];
} __packed;
/* Meant to be packed as the value member of a struct ieee80211_info_element.
/*
* Meant to be packed as the value member of a struct ieee80211_info_element.
* Note that the len member of the ieee80211_info_element varies depending on
* the mesh_id_len */
* the mesh_id_len
*/
struct mrvl_meshie_val {
uint8_t oui[3];
uint8_t type;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment