Commit f8d8f6f2 authored by Matthias Wirth's avatar Matthias Wirth Committed by Greg Kroah-Hartman

rtl8188eu: fix whitespace and indentation

Signed-off-by: default avatarMatthias Wirth <matthias.wirth@gmail.com>
Signed-off-by: default avatarLukas Senger <lukas@fridolin.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9340e9dc
...@@ -109,7 +109,8 @@ static inline void _exit_critical_bh(spinlock_t *plock, unsigned long *pirqL) ...@@ -109,7 +109,8 @@ static inline void _exit_critical_bh(spinlock_t *plock, unsigned long *pirqL)
spin_unlock_bh(plock); spin_unlock_bh(plock);
} }
static inline int _enter_critical_mutex(struct mutex *pmutex, unsigned long *pirqL) static inline int _enter_critical_mutex(struct mutex *pmutex,
unsigned long *pirqL)
{ {
int ret; int ret;
...@@ -118,7 +119,8 @@ static inline int _enter_critical_mutex(struct mutex *pmutex, unsigned long *pir ...@@ -118,7 +119,8 @@ static inline int _enter_critical_mutex(struct mutex *pmutex, unsigned long *pir
} }
static inline void _exit_critical_mutex(struct mutex *pmutex, unsigned long *pirqL) static inline void _exit_critical_mutex(struct mutex *pmutex,
unsigned long *pirqL)
{ {
mutex_unlock(pmutex); mutex_unlock(pmutex);
} }
...@@ -128,29 +130,33 @@ static inline void rtw_list_delete(struct list_head *plist) ...@@ -128,29 +130,33 @@ static inline void rtw_list_delete(struct list_head *plist)
list_del_init(plist); list_del_init(plist);
} }
static inline void _init_timer(struct timer_list *ptimer,struct net_device *nic_hdl,void *pfunc,void* cntx) static inline void _init_timer(struct timer_list *ptimer,
struct net_device *nic_hdl,
void *pfunc, void *cntx)
{ {
ptimer->function = pfunc; ptimer->function = pfunc;
ptimer->data = (unsigned long)cntx; ptimer->data = (unsigned long)cntx;
init_timer(ptimer); init_timer(ptimer);
} }
static inline void _set_timer(struct timer_list *ptimer,u32 delay_time) static inline void _set_timer(struct timer_list *ptimer, u32 delay_time)
{ {
mod_timer(ptimer , (jiffies+(delay_time*HZ/1000))); mod_timer(ptimer , (jiffies+(delay_time*HZ/1000)));
} }
static inline void _cancel_timer(struct timer_list *ptimer,u8 *bcancelled) static inline void _cancel_timer(struct timer_list *ptimer, u8 *bcancelled)
{ {
del_timer_sync(ptimer); del_timer_sync(ptimer);
*bcancelled= true;/* true ==1; false==0 */ *bcancelled = true;/* true ==1; false==0 */
} }
#define RTW_TIMER_HDL_ARGS void *FunctionContext #define RTW_TIMER_HDL_ARGS void *FunctionContext
#define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl #define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl
#define RTW_DECLARE_TIMER_HDL(name) void RTW_TIMER_HDL_NAME(name)(RTW_TIMER_HDL_ARGS) #define RTW_DECLARE_TIMER_HDL(name) \
void RTW_TIMER_HDL_NAME(name)(RTW_TIMER_HDL_ARGS)
static inline void _init_workitem(struct work_struct *pwork, void *pfunc, void * cntx) static inline void _init_workitem(struct work_struct *pwork, void *pfunc,
void *cntx)
{ {
INIT_WORK(pwork, pfunc); INIT_WORK(pwork, pfunc);
} }
...@@ -206,7 +212,7 @@ static inline void rtw_netif_stop_queue(struct net_device *pnetdev) ...@@ -206,7 +212,7 @@ static inline void rtw_netif_stop_queue(struct net_device *pnetdev)
} }
#ifndef BIT #ifndef BIT
#define BIT(x) ( 1 << (x)) #define BIT(x) (1 << (x))
#endif #endif
#define BIT0 0x00000001 #define BIT0 0x00000001
...@@ -311,7 +317,8 @@ void _rtw_spinlock_free(spinlock_t *plock); ...@@ -311,7 +317,8 @@ void _rtw_spinlock_free(spinlock_t *plock);
void _rtw_init_queue(struct __queue *pqueue); void _rtw_init_queue(struct __queue *pqueue);
u32 _rtw_queue_empty(struct __queue *pqueue); u32 _rtw_queue_empty(struct __queue *pqueue);
u32 rtw_end_of_queue_search(struct list_head *queue, struct list_head *pelement); u32 rtw_end_of_queue_search(struct list_head *queue,
struct list_head *pelement);
u32 rtw_get_current_time(void); u32 rtw_get_current_time(void);
u32 rtw_systime_to_ms(u32 systime); u32 rtw_systime_to_ms(u32 systime);
...@@ -346,7 +353,7 @@ static __inline void thread_enter(char *name) ...@@ -346,7 +353,7 @@ static __inline void thread_enter(char *name)
static inline void flush_signals_thread(void) static inline void flush_signals_thread(void)
{ {
if (signal_pending (current)) if (signal_pending(current))
flush_signals(current); flush_signals(current);
} }
...@@ -356,13 +363,13 @@ static inline int res_to_status(int res) ...@@ -356,13 +363,13 @@ static inline int res_to_status(int res)
} }
#define _RND(sz, r) ((((sz)+((r)-1))/(r))*(r)) #define _RND(sz, r) ((((sz)+((r)-1))/(r))*(r))
#define RND4(x) (((x >> 2) + (((x & 3) == 0) ? 0: 1)) << 2) #define RND4(x) (((x >> 2) + (((x & 3) == 0) ? 0 : 1)) << 2)
static inline u32 _RND4(u32 sz) static inline u32 _RND4(u32 sz)
{ {
u32 val; u32 val;
val = ((sz >> 2) + ((sz & 3) ? 1: 0)) << 2; val = ((sz >> 2) + ((sz & 3) ? 1 : 0)) << 2;
return val; return val;
} }
...@@ -370,7 +377,7 @@ static inline u32 _RND8(u32 sz) ...@@ -370,7 +377,7 @@ static inline u32 _RND8(u32 sz)
{ {
u32 val; u32 val;
val = ((sz >> 3) + ((sz & 7) ? 1: 0)) << 3; val = ((sz >> 3) + ((sz & 7) ? 1 : 0)) << 3;
return val; return val;
} }
...@@ -378,7 +385,7 @@ static inline u32 _RND128(u32 sz) ...@@ -378,7 +385,7 @@ static inline u32 _RND128(u32 sz)
{ {
u32 val; u32 val;
val = ((sz >> 7) + ((sz & 127) ? 1: 0)) << 7; val = ((sz >> 7) + ((sz & 127) ? 1 : 0)) << 7;
return val; return val;
} }
...@@ -386,7 +393,7 @@ static inline u32 _RND256(u32 sz) ...@@ -386,7 +393,7 @@ static inline u32 _RND256(u32 sz)
{ {
u32 val; u32 val;
val = ((sz >> 8) + ((sz & 255) ? 1: 0)) << 8; val = ((sz >> 8) + ((sz & 255) ? 1 : 0)) << 8;
return val; return val;
} }
...@@ -394,7 +401,7 @@ static inline u32 _RND512(u32 sz) ...@@ -394,7 +401,7 @@ static inline u32 _RND512(u32 sz)
{ {
u32 val; u32 val;
val = ((sz >> 9) + ((sz & 511) ? 1: 0)) << 9; val = ((sz >> 9) + ((sz & 511) ? 1 : 0)) << 9;
return val; return val;
} }
...@@ -403,7 +410,8 @@ static inline u32 bitshift(u32 bitmask) ...@@ -403,7 +410,8 @@ static inline u32 bitshift(u32 bitmask)
u32 i; u32 i;
for (i = 0; i <= 31; i++) for (i = 0; i <= 31; i++)
if (((bitmask>>i) & 0x1) == 1) break; if (((bitmask>>i) & 0x1) == 1)
break;
return i; return i;
} }
...@@ -450,7 +458,7 @@ void rtw_free_netdev(struct net_device *netdev); ...@@ -450,7 +458,7 @@ void rtw_free_netdev(struct net_device *netdev);
#define FUNC_ADPT_FMT "%s(%s)" #define FUNC_ADPT_FMT "%s(%s)"
#define FUNC_ADPT_ARG(adapter) __func__, adapter->pnetdev->name #define FUNC_ADPT_ARG(adapter) __func__, adapter->pnetdev->name
#define rtw_signal_process(pid, sig) kill_pid(find_vpid((pid)),(sig), 1) #define rtw_signal_process(pid, sig) kill_pid(find_vpid((pid)), (sig), 1)
u64 rtw_modular64(u64 x, u64 y); u64 rtw_modular64(u64 x, u64 y);
u64 rtw_division64(u64 x, u64 y); u64 rtw_division64(u64 x, u64 y);
......
...@@ -478,8 +478,7 @@ struct getrfintfs_parm { ...@@ -478,8 +478,7 @@ struct getrfintfs_parm {
u8 rfintfs; u8 rfintfs;
}; };
struct Tx_Beacon_param struct Tx_Beacon_param {
{
struct wlan_bssid_ex network; struct wlan_bssid_ex network;
}; };
...@@ -715,26 +714,22 @@ struct set_ch_parm { ...@@ -715,26 +714,22 @@ struct set_ch_parm {
}; };
/*H2C Handler index: 59 */ /*H2C Handler index: 59 */
struct SetChannelPlan_param struct SetChannelPlan_param {
{
u8 channel_plan; u8 channel_plan;
}; };
/*H2C Handler index: 60 */ /*H2C Handler index: 60 */
struct LedBlink_param struct LedBlink_param {
{
struct LED_871x *pLed; struct LED_871x *pLed;
}; };
/*H2C Handler index: 61 */ /*H2C Handler index: 61 */
struct SetChannelSwitch_param struct SetChannelSwitch_param {
{
u8 new_ch_no; u8 new_ch_no;
}; };
/*H2C Handler index: 62 */ /*H2C Handler index: 62 */
struct TDLSoption_param struct TDLSoption_param {
{
u8 addr[ETH_ALEN]; u8 addr[ETH_ALEN];
u8 option; u8 option;
}; };
...@@ -773,42 +768,47 @@ u8 rtw_createbss_cmd_ex(struct adapter *padapter, unsigned char *pbss, ...@@ -773,42 +768,47 @@ u8 rtw_createbss_cmd_ex(struct adapter *padapter, unsigned char *pbss,
unsigned int sz); unsigned int sz);
u8 rtw_setphy_cmd(struct adapter *padapter, u8 modem, u8 ch); u8 rtw_setphy_cmd(struct adapter *padapter, u8 modem, u8 ch);
u8 rtw_setstakey_cmd(struct adapter *padapter, u8 *psta, u8 unicast_key); u8 rtw_setstakey_cmd(struct adapter *padapter, u8 *psta, u8 unicast_key);
u8 rtw_clearstakey_cmd(struct adapter *padapter, u8 *psta, u8 entry, u8 enqueue); u8 rtw_clearstakey_cmd(struct adapter *padapter, u8 *psta, u8 entry,
u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network* pnetwork); u8 enqueue);
u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, bool enqueue); u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork);
u8 rtw_setopmode_cmd(struct adapter *padapter, enum ndis_802_11_network_infra networktype); u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms,
bool enqueue);
u8 rtw_setopmode_cmd(struct adapter *padapter,
enum ndis_802_11_network_infra networktype);
u8 rtw_setdatarate_cmd(struct adapter *padapter, u8 *rateset); u8 rtw_setdatarate_cmd(struct adapter *padapter, u8 *rateset);
u8 rtw_setbasicrate_cmd(struct adapter *padapter, u8 *rateset); u8 rtw_setbasicrate_cmd(struct adapter *padapter, u8 *rateset);
u8 rtw_setbbreg_cmd(struct adapter * padapter, u8 offset, u8 val); u8 rtw_setbbreg_cmd(struct adapter *padapter, u8 offset, u8 val);
u8 rtw_setrfreg_cmd(struct adapter * padapter, u8 offset, u32 val); u8 rtw_setrfreg_cmd(struct adapter *padapter, u8 offset, u32 val);
u8 rtw_getbbreg_cmd(struct adapter * padapter, u8 offset, u8 * pval); u8 rtw_getbbreg_cmd(struct adapter *padapter, u8 offset, u8 *pval);
u8 rtw_getrfreg_cmd(struct adapter * padapter, u8 offset, u8 * pval); u8 rtw_getrfreg_cmd(struct adapter *padapter, u8 offset, u8 *pval);
u8 rtw_setrfintfs_cmd(struct adapter *padapter, u8 mode); u8 rtw_setrfintfs_cmd(struct adapter *padapter, u8 mode);
u8 rtw_setrttbl_cmd(struct adapter *padapter, struct setratable_parm *prate_table); u8 rtw_setrttbl_cmd(struct adapter *padapter,
struct setratable_parm *prate_table);
u8 rtw_getrttbl_cmd(struct adapter *padapter, struct getratable_rsp *pval); u8 rtw_getrttbl_cmd(struct adapter *padapter, struct getratable_rsp *pval);
u8 rtw_gettssi_cmd(struct adapter *padapter, u8 offset,u8 *pval); u8 rtw_gettssi_cmd(struct adapter *padapter, u8 offset, u8 *pval);
u8 rtw_setfwdig_cmd(struct adapter*padapter, u8 type); u8 rtw_setfwdig_cmd(struct adapter *padapter, u8 type);
u8 rtw_setfwra_cmd(struct adapter*padapter, u8 type); u8 rtw_setfwra_cmd(struct adapter *padapter, u8 type);
u8 rtw_addbareq_cmd(struct adapter*padapter, u8 tid, u8 *addr); u8 rtw_addbareq_cmd(struct adapter *padapter, u8 tid, u8 *addr);
u8 rtw_dynamic_chk_wk_cmd(struct adapter *adapter); u8 rtw_dynamic_chk_wk_cmd(struct adapter *adapter);
u8 rtw_lps_ctrl_wk_cmd(struct adapter*padapter, u8 lps_ctrl_type, u8 enqueue); u8 rtw_lps_ctrl_wk_cmd(struct adapter *padapter, u8 lps_ctrl_type, u8 enqueue);
u8 rtw_rpt_timer_cfg_cmd(struct adapter*padapter, u16 minRptTime); u8 rtw_rpt_timer_cfg_cmd(struct adapter *padapter, u16 minRptTime);
u8 rtw_antenna_select_cmd(struct adapter*padapter, u8 antenna,u8 enqueue); u8 rtw_antenna_select_cmd(struct adapter *padapter, u8 antenna, u8 enqueue);
u8 rtw_ps_cmd(struct adapter*padapter); u8 rtw_ps_cmd(struct adapter *padapter);
#ifdef CONFIG_88EU_AP_MODE #ifdef CONFIG_88EU_AP_MODE
u8 rtw_chk_hi_queue_cmd(struct adapter*padapter); u8 rtw_chk_hi_queue_cmd(struct adapter *padapter);
#endif #endif
u8 rtw_set_ch_cmd(struct adapter*padapter, u8 ch, u8 bw, u8 ch_offset, u8 enqueue); u8 rtw_set_ch_cmd(struct adapter *padapter, u8 ch, u8 bw, u8 ch_offset,
u8 rtw_set_chplan_cmd(struct adapter*padapter, u8 chplan, u8 enqueue); u8 enqueue);
u8 rtw_led_blink_cmd(struct adapter*padapter, struct LED_871x * pLed); u8 rtw_set_chplan_cmd(struct adapter *padapter, u8 chplan, u8 enqueue);
u8 rtw_set_csa_cmd(struct adapter*padapter, u8 new_ch_no); u8 rtw_led_blink_cmd(struct adapter *padapter, struct LED_871x *pLed);
u8 rtw_set_csa_cmd(struct adapter *padapter, u8 new_ch_no);
u8 rtw_tdls_cmd(struct adapter *padapter, u8 *addr, u8 option); u8 rtw_tdls_cmd(struct adapter *padapter, u8 *addr, u8 option);
u8 rtw_c2h_wk_cmd(struct adapter *padapter, u8 *c2h_evt); u8 rtw_c2h_wk_cmd(struct adapter *padapter, u8 *c2h_evt);
...@@ -913,8 +913,7 @@ enum rtw_h2c_cmd { ...@@ -913,8 +913,7 @@ enum rtw_h2c_cmd {
#define _SetRFReg_CMD_ _Write_RFREG_CMD_ #define _SetRFReg_CMD_ _Write_RFREG_CMD_
#ifdef _RTW_CMD_C_ #ifdef _RTW_CMD_C_
static struct _cmd_callback rtw_cmd_callback[] = static struct _cmd_callback rtw_cmd_callback[] = {
{
{GEN_CMD_CODE(_Read_MACREG), NULL}, /*0*/ {GEN_CMD_CODE(_Read_MACREG), NULL}, /*0*/
{GEN_CMD_CODE(_Write_MACREG), NULL}, {GEN_CMD_CODE(_Write_MACREG), NULL},
{GEN_CMD_CODE(_Read_BBREG), &rtw_getbbrfreg_cmdrsp_callback}, {GEN_CMD_CODE(_Read_BBREG), &rtw_getbbrfreg_cmdrsp_callback},
......
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