OSDN Git Service

rtl8723au: Convert __inline and __inline__ to standard inline
authorLarry Finger <Larry.Finger@lwfinger.net>
Fri, 6 Dec 2013 20:04:12 +0000 (14:04 -0600)
committerLarry Finger <Larry.Finger@lwfinger.net>
Fri, 6 Dec 2013 20:04:12 +0000 (14:04 -0600)
In addition, change "inline static" to the preferred "static inline" form.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
12 files changed:
core/rtw_br_ext.c
core/rtw_pwrctrl.c
core/rtw_wlan_util.c
core/rtw_xmit.c
include/drv_types.h
include/ieee80211.h
include/osdep_service.h
include/rtw_mlme.h
include/rtw_recv.h
include/sta_info.h
include/wifi.h
include/wlan_bssdef.h

index 78d0fb1..0bda7d4 100644 (file)
@@ -70,7 +70,7 @@
 -----------------------------------------------------------------*/
 
 /* Find a tag in pppoe frame and return the pointer */
-static __inline__ unsigned char *__nat25_find_pppoe_tag(struct pppoe_hdr *ph, unsigned short type)
+static inline unsigned char *__nat25_find_pppoe_tag(struct pppoe_hdr *ph, unsigned short type)
 {
        unsigned char *cur_ptr, *start_ptr;
        unsigned short tagLen, tagType;
@@ -87,7 +87,7 @@ static __inline__ unsigned char *__nat25_find_pppoe_tag(struct pppoe_hdr *ph, un
        return 0;
 }
 
-static __inline__ int __nat25_add_pppoe_tag(struct sk_buff *skb, struct pppoe_tag *tag)
+static inline int __nat25_add_pppoe_tag(struct sk_buff *skb, struct pppoe_tag *tag)
 {
        struct pppoe_hdr *ph = (struct pppoe_hdr *)(skb->data + ETH_HLEN);
        int data_len;
@@ -127,7 +127,7 @@ static int skb_pull_and_merge(struct sk_buff *skb, unsigned char *src, int len)
        return 0;
 }
 
-static __inline__ unsigned long __nat25_timeout(_adapter *priv)
+static inline unsigned long __nat25_timeout(_adapter *priv)
 {
        unsigned long timeout;
 
@@ -136,7 +136,7 @@ static __inline__ unsigned long __nat25_timeout(_adapter *priv)
        return timeout;
 }
 
-static __inline__ int  __nat25_has_expired(_adapter *priv,
+static inline int  __nat25_has_expired(_adapter *priv,
                                struct nat25_network_db_entry *fdb)
 {
        if(time_before_eq(fdb->ageing_timer, __nat25_timeout(priv)))
@@ -145,7 +145,7 @@ static __inline__ int  __nat25_has_expired(_adapter *priv,
        return 0;
 }
 
-static __inline__ void __nat25_generate_ipv4_network_addr(unsigned char *networkAddr,
+static inline void __nat25_generate_ipv4_network_addr(unsigned char *networkAddr,
                                unsigned int *ipAddr)
 {
        memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
@@ -154,7 +154,7 @@ static __inline__ void __nat25_generate_ipv4_network_addr(unsigned char *network
        memcpy(networkAddr+7, (unsigned char *)ipAddr, 4);
 }
 
-static __inline__ void __nat25_generate_ipx_network_addr_with_node(unsigned char *networkAddr,
+static inline void __nat25_generate_ipx_network_addr_with_node(unsigned char *networkAddr,
                                unsigned int *ipxNetAddr, unsigned char *ipxNodeAddr)
 {
        memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
@@ -164,7 +164,7 @@ static __inline__ void __nat25_generate_ipx_network_addr_with_node(unsigned char
        memcpy(networkAddr+5, ipxNodeAddr, 6);
 }
 
-static __inline__ void __nat25_generate_ipx_network_addr_with_socket(unsigned char *networkAddr,
+static inline void __nat25_generate_ipx_network_addr_with_socket(unsigned char *networkAddr,
                                unsigned int *ipxNetAddr, unsigned short *ipxSocketAddr)
 {
        memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
@@ -174,7 +174,7 @@ static __inline__ void __nat25_generate_ipx_network_addr_with_socket(unsigned ch
        memcpy(networkAddr+5, (unsigned char *)ipxSocketAddr, 2);
 }
 
-static __inline__ void __nat25_generate_apple_network_addr(unsigned char *networkAddr,
+static inline void __nat25_generate_apple_network_addr(unsigned char *networkAddr,
                                unsigned short *network, unsigned char *node)
 {
        memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
@@ -184,7 +184,7 @@ static __inline__ void __nat25_generate_apple_network_addr(unsigned char *networ
        networkAddr[3] = *node;
 }
 
-static __inline__ void __nat25_generate_pppoe_network_addr(unsigned char *networkAddr,
+static inline void __nat25_generate_pppoe_network_addr(unsigned char *networkAddr,
                                unsigned char *ac_mac, unsigned short *sid)
 {
        memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
@@ -302,7 +302,7 @@ static void convert_ipv6_mac_to_mc(struct sk_buff *skb)
 }
 #endif /* CL_IPV6_PASS */
 
-static __inline__ int __nat25_network_hash(unsigned char *networkAddr)
+static inline int __nat25_network_hash(unsigned char *networkAddr)
 {
        if(networkAddr[0] == NAT25_IPV4)
        {
@@ -362,7 +362,7 @@ static __inline__ int __nat25_network_hash(unsigned char *networkAddr)
        }
 }
 
-static __inline__ void __network_hash_link(_adapter *priv,
+static inline void __network_hash_link(_adapter *priv,
                                struct nat25_network_db_entry *ent, int hash)
 {
        /*  Caller must _enter_critical_bh already! */
@@ -378,7 +378,7 @@ static __inline__ void __network_hash_link(_adapter *priv,
        /* spin_unlock_bh(&priv->br_ext_lock); */
 }
 
-static __inline__ void __network_hash_unlink(struct nat25_network_db_entry *ent)
+static inline void __network_hash_unlink(struct nat25_network_db_entry *ent)
 {
        /*  Caller must _enter_critical_bh already! */
        /* _irqL irqL; */
index dd7f685..248db24 100644 (file)
@@ -985,12 +985,12 @@ static void pwr_rpwm_timeout_handler(void *FunctionContext)
 }
 #endif /*  CONFIG_LPS_RPWM_TIMER */
 
-__inline static void register_task_alive(struct pwrctrl_priv *pwrctrl, u32 tag)
+static inline void register_task_alive(struct pwrctrl_priv *pwrctrl, u32 tag)
 {
        pwrctrl->alives |= tag;
 }
 
-__inline static void unregister_task_alive(struct pwrctrl_priv *pwrctrl, u32 tag)
+static inline void unregister_task_alive(struct pwrctrl_priv *pwrctrl, u32 tag)
 {
        pwrctrl->alives &= ~tag;
 }
index c9bf76d..9999636 100644 (file)
@@ -570,7 +570,7 @@ int get_bsstype(unsigned short capability)
        }
 }
 
-__inline u8 *get_my_bssid(WLAN_BSSID_EX *pnetwork)
+inline u8 *get_my_bssid(WLAN_BSSID_EX *pnetwork)
 {
        return (pnetwork->MacAddress);
 }
index 34a6035..3d45d0d 100644 (file)
@@ -2434,7 +2434,7 @@ _func_exit_;
        return ptxservq;
 }
 #else
-__inline static struct tx_servq *rtw_get_sta_pending
+static inline struct tx_servq *rtw_get_sta_pending
        (_adapter *padapter, _queue **ppstapending, struct sta_info *psta, int up)
 {
        struct tx_servq *ptxservq;
index 0e942d4..79eaa7c 100644 (file)
@@ -508,7 +508,7 @@ struct _ADAPTER{
 
 int rtw_handle_dualmac(_adapter *adapter, bool init);
 
-__inline static u8 *myid(struct eeprom_priv *peepriv)
+static inline u8 *myid(struct eeprom_priv *peepriv)
 {
        return (peepriv->mac_addr);
 }
index 3429409..e27fa33 100644 (file)
@@ -923,7 +923,7 @@ enum ieee80211_state {
 #define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
 #define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
 
-extern __inline int is_multicast_mac_addr(const u8 *addr)
+extern inline int is_multicast_mac_addr(const u8 *addr)
 {
         return ((addr[0] != 0xff) && (0x01 & addr[0]));
 }
index f537e54..7323fdd 100644 (file)
@@ -105,13 +105,13 @@ typedef void*     thread_context;
 typedef void timer_hdl_return;
 typedef void* timer_hdl_context;
 
-__inline static struct list_head       *get_list_head(_queue   *queue)
+static inline struct list_head *get_list_head(_queue   *queue)
 {
        return (&(queue->queue));
 }
 
 
-__inline static void _init_timer(_timer *ptimer,_nic_hdl nic_hdl,void *pfunc,void* cntx)
+static inline void _init_timer(_timer *ptimer,_nic_hdl nic_hdl,void *pfunc,void* cntx)
 {
        //setup_timer(ptimer, pfunc,(u32)cntx);
        ptimer->function = pfunc;
@@ -119,12 +119,12 @@ __inline static void _init_timer(_timer *ptimer,_nic_hdl nic_hdl,void *pfunc,voi
        init_timer(ptimer);
 }
 
-__inline static void _set_timer(_timer *ptimer,u32 delay_time)
+static inline void _set_timer(_timer *ptimer,u32 delay_time)
 {
        mod_timer(ptimer , (jiffies+(delay_time*HZ/1000)));
 }
 
-__inline static void _cancel_timer(_timer *ptimer,u8 *bcancelled)
+static inline void _cancel_timer(_timer *ptimer,u8 *bcancelled)
 {
        del_timer_sync(ptimer);
        *bcancelled=  _TRUE;//TRUE ==1; FALSE==0
@@ -267,12 +267,12 @@ extern void       rtw_udelay_os(int us);
 extern void rtw_yield_os(void);
 
 
-__inline static unsigned char _cancel_timer_ex(_timer *ptimer)
+static inline unsigned char _cancel_timer_ex(_timer *ptimer)
 {
        return del_timer_sync(ptimer);
 }
 
-static __inline void thread_enter(char *name)
+static inline void thread_enter(char *name)
 {
 #ifdef daemonize
        daemonize("%s", name);
@@ -280,7 +280,7 @@ static __inline void thread_enter(char *name)
        allow_signal(SIGTERM);
 }
 
-__inline static void flush_signals_thread(void)
+static inline void flush_signals_thread(void)
 {
        if (signal_pending (current))
                flush_signals(current);
@@ -289,7 +289,7 @@ __inline static void flush_signals_thread(void)
 #define _RND(sz, r) ((((sz)+((r)-1))/(r))*(r))
 #define RND4(x)        (((x >> 2) + (((x & 3) == 0) ?  0: 1)) << 2)
 
-__inline static u32 _RND4(u32 sz)
+static inline u32 _RND4(u32 sz)
 {
 
        u32     val;
@@ -300,7 +300,7 @@ __inline static u32 _RND4(u32 sz)
 
 }
 
-__inline static u32 _RND8(u32 sz)
+static inline u32 _RND8(u32 sz)
 {
 
        u32     val;
@@ -311,7 +311,7 @@ __inline static u32 _RND8(u32 sz)
 
 }
 
-__inline static u32 _RND128(u32 sz)
+static inline u32 _RND128(u32 sz)
 {
 
        u32     val;
@@ -322,7 +322,7 @@ __inline static u32 _RND128(u32 sz)
 
 }
 
-__inline static u32 _RND256(u32 sz)
+static inline u32 _RND256(u32 sz)
 {
 
        u32     val;
@@ -333,7 +333,7 @@ __inline static u32 _RND256(u32 sz)
 
 }
 
-__inline static u32 _RND512(u32 sz)
+static inline u32 _RND512(u32 sz)
 {
 
        u32     val;
@@ -344,7 +344,7 @@ __inline static u32 _RND512(u32 sz)
 
 }
 
-__inline static u32 bitshift(u32 bitmask)
+static inline u32 bitshift(u32 bitmask)
 {
        u32 i;
 
index db91a7d..2538e68 100644 (file)
@@ -585,13 +585,13 @@ extern int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv);
 extern int rtw_set_key(_adapter *adapter,struct security_priv *psecuritypriv,int keyid, u8 set_tx);
 extern int rtw_set_auth(_adapter *adapter,struct security_priv *psecuritypriv);
 
-__inline static u8 *get_bssid(struct mlme_priv *pmlmepriv)
+static inline u8 *get_bssid(struct mlme_priv *pmlmepriv)
 {      //if sta_mode:pmlmepriv->cur_network.network.MacAddress=> bssid
        // if adhoc_mode:pmlmepriv->cur_network.network.MacAddress=> ibss mac address
        return pmlmepriv->cur_network.network.MacAddress;
 }
 
-__inline static int check_fwstate(struct mlme_priv *pmlmepriv, int state)
+static inline int check_fwstate(struct mlme_priv *pmlmepriv, int state)
 {
        if (pmlmepriv->fw_state & state)
                return _TRUE;
@@ -599,7 +599,7 @@ __inline static int check_fwstate(struct mlme_priv *pmlmepriv, int state)
        return _FALSE;
 }
 
-__inline static int get_fwstate(struct mlme_priv *pmlmepriv)
+static inline int get_fwstate(struct mlme_priv *pmlmepriv)
 {
        return pmlmepriv->fw_state;
 }
@@ -611,7 +611,7 @@ __inline static int get_fwstate(struct mlme_priv *pmlmepriv)
  * ### NOTE:#### (!!!!)
  * MUST TAKE CARE THAT BEFORE CALLING THIS FUNC, YOU SHOULD HAVE LOCKED pmlmepriv->lock
  */
-__inline static void set_fwstate(struct mlme_priv *pmlmepriv, int state)
+static inline void set_fwstate(struct mlme_priv *pmlmepriv, int state)
 {
        pmlmepriv->fw_state |= state;
        //FOR HW integration
@@ -620,7 +620,7 @@ __inline static void set_fwstate(struct mlme_priv *pmlmepriv, int state)
        }
 }
 
-__inline static void _clr_fwstate_(struct mlme_priv *pmlmepriv, int state)
+static inline void _clr_fwstate_(struct mlme_priv *pmlmepriv, int state)
 {
        pmlmepriv->fw_state &= ~state;
        //FOR HW integration
@@ -633,7 +633,7 @@ __inline static void _clr_fwstate_(struct mlme_priv *pmlmepriv, int state)
  * No Limit on the calling context,
  * therefore set it to be the critical section...
  */
-__inline static void clr_fwstate(struct mlme_priv *pmlmepriv, int state)
+static inline void clr_fwstate(struct mlme_priv *pmlmepriv, int state)
 {
        spin_lock_bh(&pmlmepriv->lock);
        if (check_fwstate(pmlmepriv, state) == _TRUE)
@@ -641,14 +641,14 @@ __inline static void clr_fwstate(struct mlme_priv *pmlmepriv, int state)
        spin_unlock_bh(&pmlmepriv->lock);
 }
 
-__inline static void clr_fwstate_ex(struct mlme_priv *pmlmepriv, int state)
+static inline void clr_fwstate_ex(struct mlme_priv *pmlmepriv, int state)
 {
        spin_lock_bh(&pmlmepriv->lock);
        _clr_fwstate_(pmlmepriv, state);
        spin_unlock_bh(&pmlmepriv->lock);
 }
 
-__inline static void up_scanned_network(struct mlme_priv *pmlmepriv)
+static inline void up_scanned_network(struct mlme_priv *pmlmepriv)
 {
        spin_lock_bh(&pmlmepriv->lock);
        pmlmepriv->num_of_scanned++;
@@ -660,14 +660,14 @@ int rtw_buddy_adapter_up(_adapter *padapter);
 int check_buddy_fwstate(_adapter *padapter, int state);
 #endif //CONFIG_CONCURRENT_MODE
 
-__inline static void down_scanned_network(struct mlme_priv *pmlmepriv)
+static inline void down_scanned_network(struct mlme_priv *pmlmepriv)
 {
        spin_lock_bh(&pmlmepriv->lock);
        pmlmepriv->num_of_scanned--;
        spin_unlock_bh(&pmlmepriv->lock);
 }
 
-__inline static void set_scanned_network_val(struct mlme_priv *pmlmepriv, int val)
+static inline void set_scanned_network_val(struct mlme_priv *pmlmepriv, int val)
 {
        spin_lock_bh(&pmlmepriv->lock);
        pmlmepriv->num_of_scanned = val;
index e1b8963..73728cb 100644 (file)
@@ -432,7 +432,7 @@ struct recv_buf *rtw_dequeue_recvbuf (_queue *queue);
 
 void rtw_reordering_ctrl_timeout_handler(void *pcontext);
 
-__inline static u8 *get_rxmem(union recv_frame *precvframe)
+static inline u8 *get_rxmem(union recv_frame *precvframe)
 {
        //always return rx_head...
        if(precvframe==NULL)
@@ -441,14 +441,14 @@ __inline static u8 *get_rxmem(union recv_frame *precvframe)
        return precvframe->u.hdr.rx_head;
 }
 
-__inline static u8 *get_rx_status(union recv_frame *precvframe)
+static inline u8 *get_rx_status(union recv_frame *precvframe)
 {
 
        return get_rxmem(precvframe);
 
 }
 
-__inline static u8 *get_recvframe_data(union recv_frame *precvframe)
+static inline u8 *get_recvframe_data(union recv_frame *precvframe)
 {
 
        //alwasy return rx_data
@@ -459,7 +459,7 @@ __inline static u8 *get_recvframe_data(union recv_frame *precvframe)
 
 }
 
-__inline static u8 *recvframe_push(union recv_frame *precvframe, int sz)
+static inline u8 *recvframe_push(union recv_frame *precvframe, int sz)
 {
        // append data before rx_data
 
@@ -487,7 +487,7 @@ __inline static u8 *recvframe_push(union recv_frame *precvframe, int sz)
 }
 
 
-__inline static u8 *recvframe_pull(union recv_frame *precvframe, int sz)
+static inline u8 *recvframe_pull(union recv_frame *precvframe, int sz)
 {
        // rx_data += sz; move rx_data sz bytes  hereafter
 
@@ -512,7 +512,7 @@ __inline static u8 *recvframe_pull(union recv_frame *precvframe, int sz)
 
 }
 
-__inline static u8 *recvframe_put(union recv_frame *precvframe, int sz)
+static inline u8 *recvframe_put(union recv_frame *precvframe, int sz)
 {
        // rx_tai += sz; move rx_tail sz bytes  hereafter
 
@@ -541,7 +541,7 @@ __inline static u8 *recvframe_put(union recv_frame *precvframe, int sz)
 
 
 
-__inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, int sz)
+static inline u8 *recvframe_pull_tail(union recv_frame *precvframe, int sz)
 {
        // rmv data from rx_tail (by yitsen)
 
@@ -567,7 +567,7 @@ __inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, int sz)
 
 
 
-__inline static _buffer * get_rxbuf_desc(union recv_frame *precvframe)
+static inline _buffer * get_rxbuf_desc(union recv_frame *precvframe)
 {
        _buffer * buf_desc;
 
@@ -578,7 +578,7 @@ __inline static _buffer * get_rxbuf_desc(union recv_frame *precvframe)
 }
 
 
-__inline static union recv_frame *rxmem_to_recvframe(u8 *rxmem)
+static inline union recv_frame *rxmem_to_recvframe(u8 *rxmem)
 {
        //due to the design of 2048 bytes alignment of recv_frame, we can reference the union recv_frame
        //from any given member of recv_frame.
@@ -588,7 +588,7 @@ __inline static union recv_frame *rxmem_to_recvframe(u8 *rxmem)
 
 }
 
-__inline static union recv_frame *pkt_to_recvframe(_pkt *pkt)
+static inline union recv_frame *pkt_to_recvframe(_pkt *pkt)
 {
 
        u8 * buf_star;
@@ -598,7 +598,7 @@ __inline static union recv_frame *pkt_to_recvframe(_pkt *pkt)
        return precv_frame;
 }
 
-__inline static u8 *pkt_to_recvmem(_pkt *pkt)
+static inline u8 *pkt_to_recvmem(_pkt *pkt)
 {
        // return the rx_head
 
@@ -608,7 +608,7 @@ __inline static u8 *pkt_to_recvmem(_pkt *pkt)
 
 }
 
-__inline static u8 *pkt_to_recvdata(_pkt *pkt)
+static inline u8 *pkt_to_recvdata(_pkt *pkt)
 {
        // return the rx_data
 
@@ -619,13 +619,13 @@ __inline static u8 *pkt_to_recvdata(_pkt *pkt)
 }
 
 
-__inline static int get_recvframe_len(union recv_frame *precvframe)
+static inline int get_recvframe_len(union recv_frame *precvframe)
 {
        return precvframe->u.hdr.len;
 }
 
 
-__inline static s32 translate_percentage_to_dbm(u32 SignalStrengthIndex)
+static inline s32 translate_percentage_to_dbm(u32 SignalStrengthIndex)
 {
        s32     SignalPower; // in dBm.
 
index 9e0c0fe..756f417 100644 (file)
@@ -419,7 +419,7 @@ struct      sta_priv {
 };
 
 
-__inline static u32 wifi_mac_hash(u8 *mac)
+static inline u32 wifi_mac_hash(u8 *mac)
 {
         u32 x;
 
index 81fc148..e86ff91 100644 (file)
@@ -337,7 +337,7 @@ enum WIFI_REG_DOMAIN {
 
 #define GetAddr4Ptr(pbuf)      ((unsigned char *)((unsigned long)(pbuf) + 24))
 
-__inline static unsigned char * get_da(unsigned char *pframe)
+static inline unsigned char * get_da(unsigned char *pframe)
 {
        unsigned char   *da;
        unsigned int    to_fr_ds        = (GetToDs(pframe) << 1) | GetFrDs(pframe);
@@ -361,7 +361,7 @@ __inline static unsigned char * get_da(unsigned char *pframe)
 }
 
 
-__inline static unsigned char * get_sa(unsigned char *pframe)
+static inline unsigned char * get_sa(unsigned char *pframe)
 {
        unsigned char   *sa;
        unsigned int    to_fr_ds        = (GetToDs(pframe) << 1) | GetFrDs(pframe);
@@ -384,7 +384,7 @@ __inline static unsigned char * get_sa(unsigned char *pframe)
        return sa;
 }
 
-__inline static unsigned char * get_hdr_bssid(unsigned char *pframe)
+static inline unsigned char * get_hdr_bssid(unsigned char *pframe)
 {
        unsigned char   *sa;
        unsigned int    to_fr_ds        = (GetToDs(pframe) << 1) | GetFrDs(pframe);
@@ -411,7 +411,7 @@ __inline static unsigned char * get_hdr_bssid(unsigned char *pframe)
 }
 
 
-__inline static int IsFrameTypeCtrl(unsigned char *pframe)
+static inline int IsFrameTypeCtrl(unsigned char *pframe)
 {
        if(WIFI_CTRL_TYPE == GetFrameType(pframe))
                return _TRUE;
index ba4b4d8..1bc3649 100644 (file)
@@ -330,7 +330,7 @@ typedef struct _WLAN_BSSID_EX
 }__attribute__((packed))
 WLAN_BSSID_EX, *PWLAN_BSSID_EX;
 
-__inline  static uint get_WLAN_BSSID_EX_sz(WLAN_BSSID_EX *bss)
+inline  static uint get_WLAN_BSSID_EX_sz(WLAN_BSSID_EX *bss)
 {
 #if 0
        uint t_len;