staging: rtl8192u: fix macros in r8192U.h
This patch fixes the macros in r8192U.h. More specifically: 1) removes the ';' from the end of the macro definition and changes according the files that are affected by this change by adding ';' at the end of the macro call 2) replaces printk with pr_debug, when applicable 3) replaces __FUNCTION__ with __func__ 4) fixes the framing when the macro contains complex expressions 5) renames macro 'assert' as 'RTL9192U_ASSERT', so that it cannot be confused with the c function assert(), and changes accordingly the files affected by this change Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
631edcdc45
commit
4a8d113554
|
@ -85,10 +85,10 @@
|
||||||
#define DMESGE(x, a...)
|
#define DMESGE(x, a...)
|
||||||
extern u32 rt_global_debug_component;
|
extern u32 rt_global_debug_component;
|
||||||
#define RT_TRACE(component, x, args...) \
|
#define RT_TRACE(component, x, args...) \
|
||||||
do { if (rt_global_debug_component & component) \
|
do { \
|
||||||
printk(KERN_DEBUG RTL819xU_MODULE_NAME ":" x "\n" , \
|
if (rt_global_debug_component & component) \
|
||||||
##args);\
|
pr_debug("RTL8192U: " x "\n", ##args); \
|
||||||
} while (0);
|
} while (0)
|
||||||
|
|
||||||
#define COMP_TRACE BIT0 /* Function call tracing. */
|
#define COMP_TRACE BIT0 /* Function call tracing. */
|
||||||
#define COMP_DBG BIT1
|
#define COMP_DBG BIT1
|
||||||
|
@ -131,30 +131,34 @@ do { if (rt_global_debug_component & component) \
|
||||||
|
|
||||||
#define RTL819x_DEBUG
|
#define RTL819x_DEBUG
|
||||||
#ifdef RTL819x_DEBUG
|
#ifdef RTL819x_DEBUG
|
||||||
#define assert(expr) \
|
#define RTL8192U_ASSERT(expr) \
|
||||||
if (!(expr)) { \
|
do { \
|
||||||
printk("Assertion failed! %s,%s,%s,line=%d\n", \
|
if (!(expr)) { \
|
||||||
#expr, __FILE__, __FUNCTION__, __LINE__); \
|
pr_debug("Assertion failed! %s, %s, %s, line = %d\n", \
|
||||||
}
|
#expr, __FILE__, __func__, __LINE__); \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
/*
|
/*
|
||||||
* Debug out data buf.
|
* Debug out data buf.
|
||||||
* If you want to print DATA buffer related BA,
|
* If you want to print DATA buffer related BA,
|
||||||
* please set ieee80211_debug_level to DATA|BA
|
* please set ieee80211_debug_level to DATA|BA
|
||||||
*/
|
*/
|
||||||
#define RT_DEBUG_DATA(level, data, datalen) \
|
#define RT_DEBUG_DATA(level, data, datalen) \
|
||||||
do { if ((rt_global_debug_component & (level)) == (level)) { \
|
do { \
|
||||||
int i; \
|
if ((rt_global_debug_component & (level)) == (level)) { \
|
||||||
u8 *pdata = (u8 *) data; \
|
int i; \
|
||||||
printk(KERN_DEBUG RTL819xU_MODULE_NAME ": %s()\n", __FUNCTION__); \
|
u8 *pdata = (u8 *) data; \
|
||||||
for (i = 0; i < (int)(datalen); i++) { \
|
pr_debug("RTL8192U: %s()\n", __func__); \
|
||||||
|
for (i = 0; i < (int)(datalen); i++) { \
|
||||||
printk("%2x ", pdata[i]); \
|
printk("%2x ", pdata[i]); \
|
||||||
if ((i+1)%16 == 0) printk("\n"); \
|
if ((i+1)%16 == 0) \
|
||||||
} \
|
printk("\n"); \
|
||||||
printk("\n"); \
|
} \
|
||||||
} \
|
printk("\n"); \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
#else
|
#else
|
||||||
#define assert(expr) do {} while (0)
|
#define RTL8192U_ASSERT(expr) do {} while (0)
|
||||||
#define RT_DEBUG_DATA(level, data, datalen) do {} while (0)
|
#define RT_DEBUG_DATA(level, data, datalen) do {} while (0)
|
||||||
#endif /* RTL8169_DEBUG */
|
#endif /* RTL8169_DEBUG */
|
||||||
|
|
||||||
|
@ -539,7 +543,7 @@ typedef enum _WIRELESS_MODE {
|
||||||
} WIRELESS_MODE;
|
} WIRELESS_MODE;
|
||||||
|
|
||||||
|
|
||||||
#define RTL_IOCTL_WPA_SUPPLICANT SIOCIWFIRSTPRIV+30
|
#define RTL_IOCTL_WPA_SUPPLICANT (SIOCIWFIRSTPRIV + 30)
|
||||||
|
|
||||||
typedef struct buffer {
|
typedef struct buffer {
|
||||||
struct buffer *next;
|
struct buffer *next;
|
||||||
|
|
|
@ -1034,7 +1034,7 @@ void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, int rat
|
||||||
u8 queue_index = tcb_desc->queue_index;
|
u8 queue_index = tcb_desc->queue_index;
|
||||||
|
|
||||||
/* shall not be referred by command packet */
|
/* shall not be referred by command packet */
|
||||||
assert(queue_index != TXCMD_QUEUE);
|
RTL8192U_ASSERT(queue_index != TXCMD_QUEUE);
|
||||||
|
|
||||||
spin_lock_irqsave(&priv->tx_lock, flags);
|
spin_lock_irqsave(&priv->tx_lock, flags);
|
||||||
|
|
||||||
|
|
|
@ -1519,7 +1519,7 @@ void rtl8192_SetBWModeWorkItem(struct net_device *dev)
|
||||||
u8 regBwOpMode;
|
u8 regBwOpMode;
|
||||||
|
|
||||||
RT_TRACE(COMP_SWBW, "==>rtl8192_SetBWModeWorkItem() Switch to %s bandwidth\n", \
|
RT_TRACE(COMP_SWBW, "==>rtl8192_SetBWModeWorkItem() Switch to %s bandwidth\n", \
|
||||||
priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20?"20MHz":"40MHz")
|
priv->CurrentChannelBW == HT_CHANNEL_WIDTH_20?"20MHz":"40MHz");
|
||||||
|
|
||||||
|
|
||||||
if(priv->rf_chip == RF_PSEUDO_11N)
|
if(priv->rf_chip == RF_PSEUDO_11N)
|
||||||
|
|
Loading…
Reference in New Issue