Skip to content

Commit

Permalink
staging: vt6656: fixed C99 // comments in two headers
Browse files Browse the repository at this point in the history
Cleared 'do not use C99 // comments' checkpatch error in device.h and
device_cfg.h

Signed-off-by: Andres More <more.andres@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Andres More authored and Greg Kroah-Hartman committed Feb 4, 2013
1 parent 84cf5fc commit d3e2395
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 48 deletions.
87 changes: 41 additions & 46 deletions drivers/staging/vt6656/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@
#undef DEVICE_ETHTOOL_IOCTL_SUPPORT
#endif

//please copy below macro to driver_event.c for API
/* please copy below macro to driver_event.c for API */
#define RT_INSMOD_EVENT_FLAG 0x0101
#define RT_UPDEV_EVENT_FLAG 0x0102
#define RT_DISCONNECTED_EVENT_FLAG 0x0103
#define RT_WPACONNECTED_EVENT_FLAG 0x0104
#define RT_DOWNDEV_EVENT_FLAG 0x0105
#define RT_RMMOD_EVENT_FLAG 0x0106

//
// device specific
//
/*
* device specific
*/

#include "device_cfg.h"
#include "ttype.h"
Expand Down Expand Up @@ -110,7 +110,7 @@
#define FB_RATE0 0
#define FB_RATE1 1

// Antenna Mode
/* Antenna Mode */
#define ANT_A 0
#define ANT_B 1
#define ANT_DIVERSITY 2
Expand All @@ -125,7 +125,7 @@

#define MAXCHECKHANGCNT 4

//Packet type
/* Packet type */
#define TX_PKT_UNI 0x00
#define TX_PKT_MULTI 0x01
#define TX_PKT_BROAD 0x02
Expand All @@ -137,7 +137,7 @@
#define RUN_AT(x) (jiffies+(x))
#endif

// DMA related
/* DMA related */
#define RESERV_AC0DMA 4

#define PRIVATE_Message 0
Expand All @@ -161,17 +161,17 @@ typedef enum __device_init_type {
DEVICE_INIT_DXPL /* Dx to D0 power lost init */
} DEVICE_INIT_TYPE, *PDEVICE_INIT_TYPE;

//USB
/* USB */

//
// Enum of context types for SendPacket
//
/*
* Enum of context types for SendPacket
*/
typedef enum _CONTEXT_TYPE {
CONTEXT_DATA_PACKET = 1,
CONTEXT_MGMT_PACKET
} CONTEXT_TYPE;

// RCB (Receive Control Block)
/* RCB (Receive Control Block) */
typedef struct _RCB
{
void *Next;
Expand All @@ -184,7 +184,7 @@ typedef struct _RCB

} RCB, *PRCB;

// used to track bulk out irps
/* used to track bulk out irps */
typedef struct _USB_SEND_CONTEXT {
void *pDevice;
struct sk_buff *pPacket;
Expand All @@ -207,25 +207,25 @@ typedef struct _DEFAULT_CONFIG {
signed int eEncryptionStatus;
} DEFAULT_CONFIG, *PDEFAULT_CONFIG;

//
// Structure to keep track of usb interrupt packets
//
/*
* Structure to keep track of USB interrupt packets
*/
typedef struct {
unsigned int uDataLen;
PBYTE pDataBuf;
// struct urb *pUrb;
/* struct urb *pUrb; */
BOOL bInUse;
} INT_BUFFER, *PINT_BUFFER;

//0:11A 1:11B 2:11G
/* 0:11A 1:11B 2:11G */
typedef enum _VIA_BB_TYPE
{
BB_TYPE_11A = 0,
BB_TYPE_11B,
BB_TYPE_11G
} VIA_BB_TYPE, *PVIA_BB_TYPE;

//0:11a,1:11b,2:11gb(only CCK in BasicRate),3:11ga(OFDM in Basic Rate)
/* 0:11a, 1:11b, 2:11gb (only CCK in BasicRate), 3:11ga(OFDM in BasicRate) */
typedef enum _VIA_PKT_TYPE
{
PK_TYPE_11A = 0,
Expand All @@ -234,7 +234,7 @@ typedef enum _VIA_PKT_TYPE
PK_TYPE_11GA
} VIA_PKT_TYPE, *PVIA_PKT_TYPE;

//++ NDIS related
/*++ NDIS related */

typedef enum __DEVICE_NDIS_STATUS {
STATUS_SUCCESS = 0,
Expand All @@ -245,10 +245,10 @@ typedef enum __DEVICE_NDIS_STATUS {

#define MAX_BSSIDINFO_4_PMKID 16
#define MAX_PMKIDLIST 5
//Flags for PMKID Candidate list structure
/* flags for PMKID Candidate list structure */
#define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED 0x01

// PMKID Structures
/* PMKID Structures */
typedef unsigned char NDIS_802_11_PMKID_VALUE[16];


Expand All @@ -272,13 +272,13 @@ typedef enum _NDIS_802_11_WEP_STATUS

typedef enum _NDIS_802_11_STATUS_TYPE
{
Ndis802_11StatusType_Authentication,
Ndis802_11StatusType_MediaStreamMode,
Ndis802_11StatusType_PMKID_CandidateList,
Ndis802_11StatusTypeMax // not a real type, defined as an upper bound
Ndis802_11StatusType_Authentication,
Ndis802_11StatusType_MediaStreamMode,
Ndis802_11StatusType_PMKID_CandidateList,
Ndis802_11StatusTypeMax, /* not a real type, defined as upper bound */
} NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;

//Added new types for PMKID Candidate lists.
/* added new types for PMKID Candidate lists */
typedef struct _PMKID_CANDIDATE {
NDIS_802_11_MAC_ADDRESS BSSID;
unsigned long Flags;
Expand All @@ -304,9 +304,7 @@ typedef struct tagSPMKIDCandidateEvent {
PMKID_CANDIDATE CandidateList[MAX_PMKIDLIST];
} SPMKIDCandidateEvent, *PSPMKIDCandidateEvent;

//--

//++ 802.11h related
/*++ 802.11h related */
#define MAX_QUIET_COUNT 8

typedef struct tagSQuietControl {
Expand All @@ -316,10 +314,7 @@ typedef struct tagSQuietControl {
WORD wDuration;
} SQuietControl, *PSQuietControl;

//--


// The receive duplicate detection cache entry
/* The receive duplicate detection cache entry */
typedef struct tagSCacheEntry{
WORD wFmSequence;
BYTE abyAddr2[ETH_ALEN];
Expand All @@ -329,13 +324,15 @@ typedef struct tagSCacheEntry{
typedef struct tagSCache{
/* The receive cache is updated circularly. The next entry to be written is
* indexed by the "InPtr".
*/
*/
unsigned int uInPtr; /* Place to use next */
SCacheEntry asCacheEntry[DUPLICATE_RX_CACHE_LENGTH];
} SCache, *PSCache;

#define CB_MAX_RX_FRAG 64
// DeFragment Control Block, used for collecting fragments prior to reassembly
/*
* DeFragment Control Block, used for collecting fragments prior to reassembly
*/
typedef struct tagSDeFragControlBlock
{
WORD wSequence;
Expand All @@ -348,39 +345,37 @@ typedef struct tagSDeFragControlBlock
BOOL bInUse;
} SDeFragControlBlock, *PSDeFragControlBlock;



//flags for options
/* flags for options */
#define DEVICE_FLAGS_UNPLUG 0x00000001UL
#define DEVICE_FLAGS_PREAMBLE_TYPE 0x00000002UL
#define DEVICE_FLAGS_OP_MODE 0x00000004UL
#define DEVICE_FLAGS_PS_MODE 0x00000008UL
#define DEVICE_FLAGS_80211h_MODE 0x00000010UL

//flags for driver status
/* flags for driver status */
#define DEVICE_FLAGS_OPENED 0x00010000UL
#define DEVICE_FLAGS_WOL_ENABLED 0x00080000UL
//flags for capbilities
/* flags for capabilities */
#define DEVICE_FLAGS_TX_ALIGN 0x01000000UL
#define DEVICE_FLAGS_HAVE_CAM 0x02000000UL
#define DEVICE_FLAGS_FLOW_CTRL 0x04000000UL

//flags for MII status
/* flags for MII status */
#define DEVICE_LINK_FAIL 0x00000001UL
#define DEVICE_SPEED_10 0x00000002UL
#define DEVICE_SPEED_100 0x00000004UL
#define DEVICE_SPEED_1000 0x00000008UL
#define DEVICE_DUPLEX_FULL 0x00000010UL
#define DEVICE_AUTONEG_ENABLE 0x00000020UL
#define DEVICE_FORCED_BY_EEPROM 0x00000040UL
//for device_set_media_duplex
/* for device_set_media_duplex */
#define DEVICE_LINK_CHANGE 0x00000001UL


typedef struct __device_opt {
int nRxDescs0; //Number of RX descriptors0
int nTxDescs0; //Number of TX descriptors 0, 1, 2, 3
int rts_thresh; //rts threshold
int nRxDescs0; /* number of RX descriptors 0 */
int nTxDescs0; /* number of TX descriptors 0, 1, 2, 3 */
int rts_thresh; /* RTS threshold */
int frag_thresh;
int OpMode;
int data_rate;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/vt6656/device_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ struct _version {
#define DEVICE_VERSION "1.19_12"
#endif

//config file
/* config file */
#include <linux/fs.h>
#include <linux/fcntl.h>
#ifndef CONFIG_PATH
#define CONFIG_PATH "/etc/vntconfiguration.dat"
#endif

//Max: 2378=2312Payload + 30HD +4CRC + 2Padding + 4Len + 8TSF + 4RSR
/* Max: 2378 = 2312 Payload + 30HD + 4CRC + 2Padding + 4Len + 8TSF + 4RSR */
#define PKT_BUF_SZ 2390

#define MAX_UINTS 8
Expand Down

0 comments on commit d3e2395

Please sign in to comment.