Commit fabdbdb2 authored by Ana Rey's avatar Ana Rey Committed by Peter P Waskiewicz Jr

staging: rtl8192u: make in ieee80211/ieee80211_softmac.c some local functions static

Make some local functions static and fix coding style in these function
declarations when It is necessary

These are the local functions that were made static:

ieee80211_MFIE_rate_len, ieee80211_MFIE_Brate, ieee80211_MFIE_Grate,
ieee80211_WMM_Info, enqueue_mgmt, dequeue_mgmt, init_mgmt_queue,
MgntQuery_MgntFrameTxRate, ieee80211_send_beacon,
ieee80211_send_beacon_cb, ieee80211_softmac_scan_wq,
ieee80211_beacons_start, ieee80211_beacons_stop,
ieee80211_softmac_stop_scan, ieee80211_auth_resp, ieee80211_null_func,
ieee80211_resp_to_assoc_rq, ieee80211_resp_to_auth,
ieee80211_resp_to_probe, ieee80211_associate_abort_cb,
ieee80211_associate_step1, ieee80211_auth_challenge,
ieee80211_associate_step2, ieee80211_associate_complete_wq,
ieee80211_associate_complete, ieee80211_associate_procedure_wq,
auth_rq_parse, assoc_rq_parse, ieee80211_sta_ps_send_null_frame,
ieee80211_sta_ps_sleep, ieee80211_process_action, ieee80211_resume_tx,
ieee80211_start_monitor_mode, ieee80211_start_ibss_wq,
ieee80211_associate_retry_wq, ieee80211_wpa_assoc_frame,
ieee80211_sta_ps, ieee80211_send_probe, ieee80211_start_scan
and ieee80211_assoc_resp

Fix the following sparse warnings in ieee80211/ieee80211_softmac.c

drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:41:14: warning: symbol 'ieee80211_MFIE_rate_len' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:59:6: warning: symbol 'ieee80211_MFIE_Brate' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:76:6: warning: symbol 'ieee80211_MFIE_Grate' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:100:6: warning: symbol 'ieee80211_WMM_Info' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:142:6: warning: symbol 'enqueue_mgmt' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:160:16: warning: symbol 'dequeue_mgmt' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:175:6: warning: symbol 'init_mgmt_queue' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:180:4: warning: symbol 'MgntQuery_MgntFrameTxRate' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:359:6: warning: symbol 'ieee80211_send_beacon' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:385:6: warning: symbol 'ieee80211_send_beacon_cb' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:488:6: warning: symbol 'ieee80211_softmac_scan_wq' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:532:6: warning: symbol 'ieee80211_beacons_start' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:543:6: warning: symbol 'ieee80211_beacons_stop' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:575:6: warning: symbol 'ieee80211_softmac_stop_scan' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:890:16: warning: symbol 'ieee80211_auth_resp' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:918:16: warning: symbol 'ieee80211_null_func' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:944:6: warning: symbol 'ieee80211_resp_to_assoc_rq' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:953:6: warning: symbol 'ieee80211_resp_to_auth' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:962:6: warning: symbol 'ieee80211_resp_to_probe' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1244:6: warning: symbol 'ieee80211_associate_abort_cb' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1250:6: warning: symbol 'ieee80211_associate_step1' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1276:6: warning: symbol 'ieee80211_auth_challenge' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1306:6: warning: symbol 'ieee80211_associate_step2' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1325:6: warning: symbol 'ieee80211_associate_complete_wq' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1372:6: warning: symbol 'ieee80211_associate_complete' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1383:6: warning: symbol 'ieee80211_associate_procedure_wq' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1556:5: warning: symbol 'auth_rq_parse' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1612:5: warning: symbol 'assoc_rq_parse' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1706:6: warning: symbol 'ieee80211_sta_ps_send_null_frame' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1717:7: warning: symbol 'ieee80211_sta_ps_sleep' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1882:6: warning: symbol 'ieee80211_process_action' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2185:6: warning: symbol 'ieee80211_resume_tx' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2314:6: warning: symbol 'ieee80211_start_monitor_mode' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2324:6: warning: symbol 'ieee80211_start_ibss_wq' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2497:6: warning: symbol 'ieee80211_associate_retry_wq' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2768:6: warning: symbol 'ieee80211_wpa_assoc_frame' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1765:13: warning: symbol 'ieee80211_sta_ps' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:398:6: warning: symbol 'ieee80211_send_probe' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:604:6: warning: symbol 'ieee80211_start_scan' was not declared. Should it be static?
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:836:16: warning: symbol 'ieee80211_assoc_resp' was not declared. Should it be static?
Signed-off-by: default avatarAna Rey <anarey@gmail.com>
Signed-off-by: default avatarPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
parent a5ac48ac
......@@ -38,7 +38,7 @@ short ieee80211_is_shortslot(const struct ieee80211_network *net)
* tag and the EXTENDED RATE MFIE tag if needed.
* It encludes two bytes per tag for the tag itself and its len
*/
unsigned int ieee80211_MFIE_rate_len(struct ieee80211_device *ieee)
static unsigned int ieee80211_MFIE_rate_len(struct ieee80211_device *ieee)
{
unsigned int rate_len = 0;
......@@ -56,7 +56,7 @@ unsigned int ieee80211_MFIE_rate_len(struct ieee80211_device *ieee)
* Then it updates the pointer so that
* it points after the new MFIE tag added.
*/
void ieee80211_MFIE_Brate(struct ieee80211_device *ieee, u8 **tag_p)
static void ieee80211_MFIE_Brate(struct ieee80211_device *ieee, u8 **tag_p)
{
u8 *tag = *tag_p;
......@@ -73,7 +73,7 @@ void ieee80211_MFIE_Brate(struct ieee80211_device *ieee, u8 **tag_p)
*tag_p = tag;
}
void ieee80211_MFIE_Grate(struct ieee80211_device *ieee, u8 **tag_p)
static void ieee80211_MFIE_Grate(struct ieee80211_device *ieee, u8 **tag_p)
{
u8 *tag = *tag_p;
......@@ -97,7 +97,8 @@ void ieee80211_MFIE_Grate(struct ieee80211_device *ieee, u8 **tag_p)
}
void ieee80211_WMM_Info(struct ieee80211_device *ieee, u8 **tag_p) {
static void ieee80211_WMM_Info(struct ieee80211_device *ieee, u8 **tag_p)
{
u8 *tag = *tag_p;
*tag++ = MFIE_TYPE_GENERIC; //0
......@@ -139,7 +140,7 @@ void ieee80211_TURBO_Info(struct ieee80211_device *ieee, u8 **tag_p) {
}
#endif
void enqueue_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb)
static void enqueue_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb)
{
int nh;
nh = (ieee->mgmt_queue_head +1) % MGMT_QUEUE_NUM;
......@@ -157,7 +158,7 @@ void enqueue_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb)
//return 0;
}
struct sk_buff *dequeue_mgmt(struct ieee80211_device *ieee)
static struct sk_buff *dequeue_mgmt(struct ieee80211_device *ieee)
{
struct sk_buff *ret;
......@@ -172,12 +173,12 @@ struct sk_buff *dequeue_mgmt(struct ieee80211_device *ieee)
return ret;
}
void init_mgmt_queue(struct ieee80211_device *ieee)
static void init_mgmt_queue(struct ieee80211_device *ieee)
{
ieee->mgmt_queue_tail = ieee->mgmt_queue_head = 0;
}
u8 MgntQuery_MgntFrameTxRate(struct ieee80211_device *ieee)
static u8 MgntQuery_MgntFrameTxRate(struct ieee80211_device *ieee)
{
PRT_HIGH_THROUGHPUT pHTInfo = ieee->pHTInfo;
u8 rate;
......@@ -356,7 +357,8 @@ inline struct sk_buff *ieee80211_probe_req(struct ieee80211_device *ieee)
}
struct sk_buff *ieee80211_get_beacon_(struct ieee80211_device *ieee);
void ieee80211_send_beacon(struct ieee80211_device *ieee)
static void ieee80211_send_beacon(struct ieee80211_device *ieee)
{
struct sk_buff *skb;
if(!ieee->ieee_up)
......@@ -382,7 +384,7 @@ void ieee80211_send_beacon(struct ieee80211_device *ieee)
}
void ieee80211_send_beacon_cb(unsigned long _ieee)
static void ieee80211_send_beacon_cb(unsigned long _ieee)
{
struct ieee80211_device *ieee =
(struct ieee80211_device *) _ieee;
......@@ -394,7 +396,7 @@ void ieee80211_send_beacon_cb(unsigned long _ieee)
}
void ieee80211_send_probe(struct ieee80211_device *ieee)
static void ieee80211_send_probe(struct ieee80211_device *ieee)
{
struct sk_buff *skb;
......@@ -485,7 +487,7 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
}
void ieee80211_softmac_scan_wq(struct work_struct *work)
static void ieee80211_softmac_scan_wq(struct work_struct *work)
{
struct delayed_work *dwork = container_of(work, struct delayed_work, work);
struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, softmac_scan_wq);
......@@ -529,7 +531,7 @@ void ieee80211_softmac_scan_wq(struct work_struct *work)
void ieee80211_beacons_start(struct ieee80211_device *ieee)
static void ieee80211_beacons_start(struct ieee80211_device *ieee)
{
unsigned long flags;
spin_lock_irqsave(&ieee->beacon_lock,flags);
......@@ -540,7 +542,7 @@ void ieee80211_beacons_start(struct ieee80211_device *ieee)
spin_unlock_irqrestore(&ieee->beacon_lock,flags);
}
void ieee80211_beacons_stop(struct ieee80211_device *ieee)
static void ieee80211_beacons_stop(struct ieee80211_device *ieee)
{
unsigned long flags;
......@@ -572,7 +574,7 @@ void ieee80211_start_send_beacons(struct ieee80211_device *ieee)
}
void ieee80211_softmac_stop_scan(struct ieee80211_device *ieee)
static void ieee80211_softmac_stop_scan(struct ieee80211_device *ieee)
{
// unsigned long flags;
......@@ -600,7 +602,7 @@ void ieee80211_stop_scan(struct ieee80211_device *ieee)
}
/* called with ieee->lock held */
void ieee80211_start_scan(struct ieee80211_device *ieee)
static void ieee80211_start_scan(struct ieee80211_device *ieee)
{
if(IS_DOT11D_ENABLE(ieee) )
{
......@@ -832,7 +834,8 @@ static struct sk_buff *ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d
}
struct sk_buff *ieee80211_assoc_resp(struct ieee80211_device *ieee, u8 *dest)
static struct sk_buff *ieee80211_assoc_resp(struct ieee80211_device *ieee,
u8 *dest)
{
struct sk_buff *skb;
u8 *tag;
......@@ -887,7 +890,8 @@ struct sk_buff *ieee80211_assoc_resp(struct ieee80211_device *ieee, u8 *dest)
return skb;
}
struct sk_buff *ieee80211_auth_resp(struct ieee80211_device *ieee,int status, u8 *dest)
static struct sk_buff *ieee80211_auth_resp(struct ieee80211_device *ieee,
int status, u8 *dest)
{
struct sk_buff *skb;
struct ieee80211_authentication *auth;
......@@ -915,7 +919,8 @@ struct sk_buff *ieee80211_auth_resp(struct ieee80211_device *ieee,int status, u8
}
struct sk_buff *ieee80211_null_func(struct ieee80211_device *ieee,short pwr)
static struct sk_buff *ieee80211_null_func(struct ieee80211_device *ieee,
short pwr)
{
struct sk_buff *skb;
struct ieee80211_hdr_3addr *hdr;
......@@ -941,7 +946,7 @@ struct sk_buff *ieee80211_null_func(struct ieee80211_device *ieee,short pwr)
}
void ieee80211_resp_to_assoc_rq(struct ieee80211_device *ieee, u8 *dest)
static void ieee80211_resp_to_assoc_rq(struct ieee80211_device *ieee, u8 *dest)
{
struct sk_buff *buf = ieee80211_assoc_resp(ieee, dest);
......@@ -950,7 +955,8 @@ void ieee80211_resp_to_assoc_rq(struct ieee80211_device *ieee, u8 *dest)
}
void ieee80211_resp_to_auth(struct ieee80211_device *ieee, int s, u8 *dest)
static void ieee80211_resp_to_auth(struct ieee80211_device *ieee, int s,
u8 *dest)
{
struct sk_buff *buf = ieee80211_auth_resp(ieee, s, dest);
......@@ -959,7 +965,7 @@ void ieee80211_resp_to_auth(struct ieee80211_device *ieee, int s, u8 *dest)
}
void ieee80211_resp_to_probe(struct ieee80211_device *ieee, u8 *dest)
static void ieee80211_resp_to_probe(struct ieee80211_device *ieee, u8 *dest)
{
......@@ -1241,13 +1247,13 @@ void ieee80211_associate_abort(struct ieee80211_device *ieee)
spin_unlock_irqrestore(&ieee->lock, flags);
}
void ieee80211_associate_abort_cb(unsigned long dev)
static void ieee80211_associate_abort_cb(unsigned long dev)
{
ieee80211_associate_abort((struct ieee80211_device *) dev);
}
void ieee80211_associate_step1(struct ieee80211_device *ieee)
static void ieee80211_associate_step1(struct ieee80211_device *ieee)
{
struct ieee80211_network *beacon = &ieee->current_network;
struct sk_buff *skb;
......@@ -1273,7 +1279,9 @@ void ieee80211_associate_step1(struct ieee80211_device *ieee)
}
}
void ieee80211_auth_challenge(struct ieee80211_device *ieee, u8 *challenge, int chlen)
static void ieee80211_auth_challenge(struct ieee80211_device *ieee,
u8 *challenge,
int chlen)
{
u8 *c;
struct sk_buff *skb;
......@@ -1303,7 +1311,7 @@ void ieee80211_auth_challenge(struct ieee80211_device *ieee, u8 *challenge, int
kfree(challenge);
}
void ieee80211_associate_step2(struct ieee80211_device *ieee)
static void ieee80211_associate_step2(struct ieee80211_device *ieee)
{
struct sk_buff *skb;
struct ieee80211_network *beacon = &ieee->current_network;
......@@ -1322,7 +1330,7 @@ void ieee80211_associate_step2(struct ieee80211_device *ieee)
//dev_kfree_skb_any(skb);//edit by thomas
}
}
void ieee80211_associate_complete_wq(struct work_struct *work)
static void ieee80211_associate_complete_wq(struct work_struct *work)
{
struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, associate_complete_wq);
printk(KERN_INFO "Associated successfully\n");
......@@ -1369,7 +1377,7 @@ void ieee80211_associate_complete_wq(struct work_struct *work)
netif_carrier_on(ieee->dev);
}
void ieee80211_associate_complete(struct ieee80211_device *ieee)
static void ieee80211_associate_complete(struct ieee80211_device *ieee)
{
// int i;
// struct net_device* dev = ieee->dev;
......@@ -1380,7 +1388,7 @@ void ieee80211_associate_complete(struct ieee80211_device *ieee)
queue_work(ieee->wq, &ieee->associate_complete_wq);
}
void ieee80211_associate_procedure_wq(struct work_struct *work)
static void ieee80211_associate_procedure_wq(struct work_struct *work)
{
struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, associate_procedure_wq);
ieee->sync_scan_hurryup = 1;
......@@ -1553,7 +1561,7 @@ static inline u16 auth_parse(struct sk_buff *skb, u8 **challenge, int *chlen)
}
int auth_rq_parse(struct sk_buff *skb,u8 *dest)
static int auth_rq_parse(struct sk_buff *skb, u8 *dest)
{
struct ieee80211_authentication *a;
......@@ -1609,7 +1617,7 @@ static short probe_rq_parse(struct ieee80211_device *ieee, struct sk_buff *skb,
}
int assoc_rq_parse(struct sk_buff *skb,u8 *dest)
static int assoc_rq_parse(struct sk_buff *skb, u8 *dest)
{
struct ieee80211_assoc_request_frame *a;
......@@ -1703,7 +1711,8 @@ ieee80211_rx_assoc_rq(struct ieee80211_device *ieee, struct sk_buff *skb)
void ieee80211_sta_ps_send_null_frame(struct ieee80211_device *ieee, short pwr)
static void ieee80211_sta_ps_send_null_frame(struct ieee80211_device *ieee,
short pwr)
{
struct sk_buff *buf = ieee80211_null_func(ieee, pwr);
......@@ -1714,7 +1723,8 @@ void ieee80211_sta_ps_send_null_frame(struct ieee80211_device *ieee, short pwr)
}
short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h, u32 *time_l)
static short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h,
u32 *time_l)
{
int timeout = ieee->ps_timeout;
u8 dtim;
......@@ -1762,7 +1772,7 @@ short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h, u32 *ti
}
inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
static inline void ieee80211_sta_ps(struct ieee80211_device *ieee)
{
u32 th,tl;
......@@ -1879,7 +1889,8 @@ void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success)
}
spin_unlock_irqrestore(&ieee->lock, flags);
}
void ieee80211_process_action(struct ieee80211_device *ieee, struct sk_buff *skb)
static void ieee80211_process_action(struct ieee80211_device *ieee,
struct sk_buff *skb)
{
struct ieee80211_hdr *header = (struct ieee80211_hdr *)skb->data;
u8 *act = ieee80211_get_payload(header);
......@@ -2182,7 +2193,7 @@ void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *
}
/* called with ieee->lock acquired */
void ieee80211_resume_tx(struct ieee80211_device *ieee)
static void ieee80211_resume_tx(struct ieee80211_device *ieee)
{
int i;
for(i = ieee->tx_pending.frag; i < ieee->tx_pending.txb->nr_frags; i++) {
......@@ -2311,7 +2322,7 @@ void ieee80211_start_master_bss(struct ieee80211_device *ieee)
netif_carrier_on(ieee->dev);
}
void ieee80211_start_monitor_mode(struct ieee80211_device *ieee)
static void ieee80211_start_monitor_mode(struct ieee80211_device *ieee)
{
if(ieee->raw_tx){
......@@ -2321,7 +2332,7 @@ void ieee80211_start_monitor_mode(struct ieee80211_device *ieee)
netif_carrier_on(ieee->dev);
}
}
void ieee80211_start_ibss_wq(struct work_struct *work)
static void ieee80211_start_ibss_wq(struct work_struct *work)
{
struct delayed_work *dwork = container_of(work, struct delayed_work, work);
......@@ -2494,7 +2505,7 @@ void ieee80211_disassociate(struct ieee80211_device *ieee)
notify_wx_assoc_event(ieee);
}
void ieee80211_associate_retry_wq(struct work_struct *work)
static void ieee80211_associate_retry_wq(struct work_struct *work)
{
struct delayed_work *dwork = container_of(work, struct delayed_work, work);
struct ieee80211_device *ieee = container_of(dwork, struct ieee80211_device, associate_retry_wq);
......@@ -2765,7 +2776,8 @@ static int ieee80211_wpa_enable(struct ieee80211_device *ieee, int value)
}
void ieee80211_wpa_assoc_frame(struct ieee80211_device *ieee, char *wpa_ie, int wpa_ie_len)
static void ieee80211_wpa_assoc_frame(struct ieee80211_device *ieee,
char *wpa_ie, int wpa_ie_len)
{
/* make sure WPA is enabled */
ieee80211_wpa_enable(ieee, 1);
......
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