Staging: otus : checkpatch.pl cleanup for header files

Fix for checkpatch.pl errors and warnings in header files of otus driver.
(There is a typedef which still remains. Plan to clean it up in next set
of patches)

Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Mithlesh Thukral 2009-10-26 21:21:39 -07:00 committed by Greg Kroah-Hartman
parent 3001fa0522
commit dba0da373d
5 changed files with 123 additions and 119 deletions

View file

@ -68,7 +68,7 @@
#define ZM_WAPI_KEY_SIZE 32 #define ZM_WAPI_KEY_SIZE 32
#define ZM_WAPI_IV_LEN 16 #define ZM_WAPI_IV_LEN 16
#endif //ZM_ENALBE_WAPI #endif /* ZM_ENALBE_WAPI */
/* structure definition */ /* structure definition */
struct athr_wlan_param { struct athr_wlan_param {
@ -137,5 +137,5 @@ struct athr_wapi_sta_info
u8 gsn[ZM_WAPI_IV_LEN]; u8 gsn[ZM_WAPI_IV_LEN];
u8 wie[256]; u8 wie[256];
}; };
#endif //ZM_ENALBE_WAPI #endif /* ZM_ENALBE_WAPI */
#endif #endif

View file

@ -34,17 +34,19 @@
/***** Critical section *****/ /***** Critical section *****/
/* Declare for critical section */ /* Declare for critical section */
#ifndef ZM_HALPLUS_LOCK #ifndef ZM_HALPLUS_LOCK
#define zmw_get_wlan_dev(dev) struct zsWlanDev *wd = (struct zsWlanDev*) ((((struct usbdrv_private*)dev->priv)->wd)) #define zmw_get_wlan_dev(dev) struct zsWlanDev *wd = (struct zsWlanDev *) \
((((struct usbdrv_private *)dev->priv)->wd))
#define zmw_declare_for_critical_section() unsigned long irqFlag; #define zmw_declare_for_critical_section() unsigned long irqFlag;
/* Enter critical section */ /* Enter critical section */
#define zmw_enter_critical_section(dev) \ #define zmw_enter_critical_section(dev) spin_lock_irqsave( \
spin_lock_irqsave(&(((struct usbdrv_private *)(dev->priv))->cs_lock), irqFlag); &(((struct usbdrv_private *)(dev->priv))->cs_lock), irqFlag);
/* leave critical section */ /* leave critical section */
#define zmw_leave_critical_section(dev) \ #define zmw_leave_critical_section(dev) \
spin_unlock_irqrestore(&(((struct usbdrv_private *)(dev->priv))->cs_lock), irqFlag); spin_unlock_irqrestore(&(((struct usbdrv_private *) \
(dev->priv))->cs_lock), irqFlag);
#else #else
#define zmw_get_wlan_dev(dev) struct zsWlanDev *wd = zfwGetWlanDev(dev); #define zmw_get_wlan_dev(dev) struct zsWlanDev *wd = zfwGetWlanDev(dev);
@ -52,12 +54,10 @@
#define zmw_declare_for_critical_section() #define zmw_declare_for_critical_section()
/* Enter critical section */ /* Enter critical section */
#define zmw_enter_critical_section(dev) \ #define zmw_enter_critical_section(dev) zfwEnterCriticalSection(dev);
zfwEnterCriticalSection(dev);
/* leave critical section */ /* leave critical section */
#define zmw_leave_critical_section(dev) \ #define zmw_leave_critical_section(dev) zfwLeaveCriticalSection(dev);
zfwLeaveCriticalSection(dev);
#endif #endif
/***** Byte order converting *****/ /***** Byte order converting *****/
@ -88,33 +88,41 @@
/* Called to read/write buffer */ /* Called to read/write buffer */
#ifndef ZM_HALPLUS_LOCK #ifndef ZM_HALPLUS_LOCK
#define zmw_buf_readb(dev, buf, offset) *(u8_t*)((u8_t*)buf->data+offset) #define zmw_buf_readb(dev, buf, offset) (*(u8_t *)((u8_t *)buf->data+offset))
#define zmw_buf_readh(dev, buf, offset) zmw_cpu_to_le16(*(u16_t*)((u8_t*)buf->data+offset)) #define zmw_buf_readh(dev, buf, offset) zmw_cpu_to_le16(*(u16_t *) \
#define zmw_buf_writeb(dev, buf, offset, value) *(u8_t*)((u8_t*)buf->data+offset) = value ((u8_t *)buf->data+offset))
#define zmw_buf_writeh(dev, buf, offset, value) *(u16_t*)((u8_t*)buf->data+offset) = zmw_cpu_to_le16(value) #define zmw_buf_writeb(dev, buf, offset, value) (*(u8_t *) \
((u8_t *)buf->data+offset) = value)
#define zmw_buf_writeh(dev, buf, offset, value) (*(u16_t *) \
((u8_t *)buf->data+offset) = zmw_cpu_to_le16(value))
#define zmw_buf_get_buffer(dev, buf) (u8_t *)(buf->data) #define zmw_buf_get_buffer(dev, buf) (u8_t *)(buf->data)
#else #else
#define zmw_buf_readb(dev, buf, offset) zfwBufReadByte(dev, buf, offset) #define zmw_buf_readb(dev, buf, offset) zfwBufReadByte(dev, buf, offset)
#define zmw_buf_readh(dev, buf, offset) zfwBufReadHalfWord(dev, buf, offset) #define zmw_buf_readh(dev, buf, offset) zfwBufReadHalfWord(dev, buf, offset)
#define zmw_buf_writeb(dev, buf, offset, value) zfwBufWriteByte(dev, buf, offset, value) #define zmw_buf_writeb(dev, buf, offset, value) \
#define zmw_buf_writeh(dev, buf, offset, value) zfwBufWriteHalfWord(dev, buf, offset, value) zfwBufWriteByte(dev, buf, offset, value)
#define zmw_buf_writeh(dev, buf, offset, value) \
zfwBufWriteHalfWord(dev, buf, offset, value)
#define zmw_buf_get_buffer(dev, buf) zfwGetBuffer(dev, buf) #define zmw_buf_get_buffer(dev, buf) zfwGetBuffer(dev, buf)
#endif #endif
/***** Debug message *****/ /***** Debug message *****/
#if 0 #if 0
#define zm_debug_msg0(msg) printk("%s:%s\n", __func__, msg); #define zm_debug_msg0(msg) printk(KERN_DEBUG "%s:%s\n", __func__, msg);
#define zm_debug_msg1(msg, val) printk("%s:%s%ld\n", __func__, \ #define zm_debug_msg1(msg, val) printk(KERN_DEBUG "%s:%s%ld\n", __func__, \
msg, (u32_t)val); msg, (u32_t)val);
#define zm_debug_msg2(msg, val) printk("%s:%s%lxh\n", __func__, \ #define zm_debug_msg2(msg, val) printk(KERN_DEBUG "%s:%s%lxh\n", __func__, \
msg, (u32_t)val); msg, (u32_t)val);
#define zm_debug_msg_s(msg, val) printk("%s:%s%s\n", __func__, \ #define zm_debug_msg_s(msg, val) printk(KERN_DEBUG "%s:%s%s\n", __func__, \
msg, val); msg, val);
#define zm_debug_msg_p(msg, val1, val2) printk("%s:%s%01ld.%02ld\n", __func__, \ #define zm_debug_msg_p(msg, val1, val2) do { \
printk(KERN_DEBUG "%s:%s%01ld.%02ld\n", \
__func__, \
msg, (val1/val2), (((val1*100)/val2)%100)); msg, (val1/val2), (((val1*100)/val2)%100));
} while (0)
#define zm_dbg(S) printk S #define zm_dbg(S) printk S
#else #else
#define zm_debug_msg0(msg) #define zm_debug_msg0(msg)
@ -126,7 +134,7 @@
#endif #endif
#define zm_assert(expr) if (!(expr)) { \ #define zm_assert(expr) if (!(expr)) { \
printk( "Atheors Assertion failed! %s,%s,%s,line=%d\n", \ printk(KERN_ERR "Atheors Assertion failed! %s, %s, %s,line=%d\n",\
#expr, __FILE__, __func__, __LINE__); \ #expr, __FILE__, __func__, __LINE__); \
} }

View file

@ -45,7 +45,7 @@
#include "oal_dt.h" #include "oal_dt.h"
#include "oal_marc.h" #include "oal_marc.h"
#include "80211core/pub_zfi.h" #include "80211core/pub_zfi.h"
//#include "pub_zfw.h" /* #include "pub_zfw.h" */
#include "80211core/pub_usb.h" #include "80211core/pub_usb.h"
#include <linux/usb.h> #include <linux/usb.h>
@ -86,8 +86,7 @@ struct driver_stats {
#define ZM_MAX_RX_URB_NUM 16 #define ZM_MAX_RX_URB_NUM 16
#define ZM_MAX_TX_BUF_NUM 128 #define ZM_MAX_TX_BUF_NUM 128
typedef struct UsbTxQ typedef struct UsbTxQ {
{
zbuf_t *buf; zbuf_t *buf;
u8_t hdr[80]; u8_t hdr[80];
u16_t hdrlen; u16_t hdrlen;
@ -108,9 +107,8 @@ struct zdap_ioctl {
#define ZM_OAL_MAX_STA_SUPPORT 16 #define ZM_OAL_MAX_STA_SUPPORT 16
struct usbdrv_private struct usbdrv_private {
{ /* linux used */
//linux used
struct net_device *device; struct net_device *device;
#if (WLAN_HOSTIF == WLAN_PCI) #if (WLAN_HOSTIF == WLAN_PCI)
struct pci_dev *pdev; struct pci_dev *pdev;
@ -165,7 +163,7 @@ struct usbdrv_private
struct athr_wlan_param athr_wpa_req; struct athr_wlan_param athr_wpa_req;
#endif #endif
struct sock *netlink_sk; struct sock *netlink_sk;
u8_t DeviceOpened; //CWYang(+) u8_t DeviceOpened; /* CWYang(+) */
u8_t supIe[50]; u8_t supIe[50];
u8_t supLen; u8_t supLen;
struct ieee80211req_wpaie stawpaie[ZM_OAL_MAX_STA_SUPPORT]; struct ieee80211req_wpaie stawpaie[ZM_OAL_MAX_STA_SUPPORT];
@ -190,8 +188,7 @@ struct usbdrv_private
/* WDS */ /* WDS */
#define ZM_WDS_PORT_NUMBER 6 #define ZM_WDS_PORT_NUMBER 6
struct zsWdsStruct struct zsWdsStruct {
{
struct net_device *dev; struct net_device *dev;
u16_t openFlag; u16_t openFlag;
}; };
@ -199,8 +196,7 @@ struct zsWdsStruct
/* VAP */ /* VAP */
#define ZM_VAP_PORT_NUMBER 7 #define ZM_VAP_PORT_NUMBER 7
struct zsVapStruct struct zsVapStruct {
{
struct net_device *dev; struct net_device *dev;
u16_t openFlag; u16_t openFlag;
}; };
@ -218,7 +214,7 @@ struct zsVapStruct
#define ZM_IOCTL_DMA_TEST 0x10 #define ZM_IOCTL_DMA_TEST 0x10
#define ZM_IOCTL_REG_TEST 0x11 #define ZM_IOCTL_REG_TEST 0x11
#define ZM_IOCTL_TEST 0x80 #define ZM_IOCTL_TEST 0x80
#define ZM_IOCTL_TALLY 0x81 //CWYang(+) #define ZM_IOCTL_TALLY 0x81 /* CWYang(+) */
#define ZM_IOCTL_RTS 0xA0 #define ZM_IOCTL_RTS 0xA0
#define ZM_IOCTL_MIX_MODE 0xA1 #define ZM_IOCTL_MIX_MODE 0xA1
#define ZM_IOCTL_FRAG 0xA2 #define ZM_IOCTL_FRAG 0xA2
@ -231,8 +227,8 @@ struct zsVapStruct
#define ZM_IOCTL_DURATION_MODE 0xA9 #define ZM_IOCTL_DURATION_MODE 0xA9
#define ZM_IOCTL_SET_AES_KEY 0xAA #define ZM_IOCTL_SET_AES_KEY 0xAA
#define ZM_IOCTL_SET_AES_MODE 0xAB #define ZM_IOCTL_SET_AES_MODE 0xAB
#define ZM_IOCTL_SIGNAL_STRENGTH 0xAC //CWYang(+) #define ZM_IOCTL_SIGNAL_STRENGTH 0xAC /* CWYang(+) */
#define ZM_IOCTL_SIGNAL_QUALITY 0xAD //CWYang(+) #define ZM_IOCTL_SIGNAL_QUALITY 0xAD /* CWYang(+) */
#define ZM_IOCTL_SET_PIBSS_MODE 0xAE #define ZM_IOCTL_SET_PIBSS_MODE 0xAE
#define ZDAPIOCTL SIOCDEVPRIVATE #define ZDAPIOCTL SIOCDEVPRIVATE

View file

@ -34,10 +34,10 @@
#define VERSIONID "0.0.0.999" #define VERSIONID "0.0.0.999"
/* Define these values to match your device */ /* Define these values to match your device */
#define VENDOR_ATHR 0x0CF3 //Atheros #define VENDOR_ATHR 0x0CF3 /* Atheros */
#define PRODUCT_AR9170 0x9170 #define PRODUCT_AR9170 0x9170
#define VENDOR_DLINK 0x07D1 //Dlink #define VENDOR_DLINK 0x07D1 /* Dlink */
#define PRODUCT_DWA160A 0x3C10 #define PRODUCT_DWA160A 0x3C10
#define VENDOR_NETGEAR 0x0846 /* NetGear */ #define VENDOR_NETGEAR 0x0846 /* NetGear */