rtl8188eu: Fix all W=1 warnings

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-06-21 13:41:29 -05:00
parent 5c8ff88003
commit fb786d0283
29 changed files with 217 additions and 507 deletions

View file

@ -1140,23 +1140,16 @@ enum ieee80211_state {
#define DEFAULT_MAX_SCAN_AGE (15 * HZ)
#define DEFAULT_FTS 2346
#ifdef PLATFORM_FREEBSD //Baron change func to macro
#define is_multicast_mac_addr(Addr) ((((Addr[0]) & 0x01) == 0x01) && ((Addr[0]) != 0xff))
#define is_broadcast_mac_addr(Addr) ((((Addr[0]) & 0xff) == 0xff) && (((Addr[1]) & 0xff) == 0xff) && \
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
(((Addr[5]) & 0xff) == 0xff))
#else
extern __inline int is_multicast_mac_addr(const u8 *addr)
static __inline int is_multicast_mac_addr(const u8 *addr)
{
return ((addr[0] != 0xff) && (0x01 & addr[0]));
}
extern __inline int is_broadcast_mac_addr(const u8 *addr)
static __inline int is_broadcast_mac_addr(const u8 *addr)
{
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
}
#endif //PLATFORM_FREEBSD
#define CFG_IEEE80211_RESERVE_FCS (1<<0)
#define CFG_IEEE80211_COMPUTE_FCS (1<<1)

View file

@ -460,8 +460,8 @@ typedef struct _ODM_Phy_Dbg_Info_
typedef struct _ODM_Per_Pkt_Info_
{
u1Byte Rate;
u1Byte StationID;
s8 Rate;
u8 StationID;
bool bPacketMatchBSSID;
bool bPacketToSelf;
bool bPacketBeacon;

View file

@ -595,33 +595,22 @@ __inline static u8 *recvframe_pull(union recv_frame *precvframe, sint sz)
__inline static u8 *recvframe_put(union recv_frame *precvframe, sint sz)
{
// rx_tai += sz; move rx_tail sz bytes hereafter
//used for append sz bytes from ptr to rx_tail, update rx_tail and return the updated rx_tail to the caller
//after putting, rx_tail must be still larger than rx_end.
unsigned char * prev_rx_tail;
if (precvframe==NULL)
return NULL;
prev_rx_tail = precvframe->u.hdr.rx_tail;
precvframe->u.hdr.rx_tail += sz;
if (precvframe->u.hdr.rx_tail > precvframe->u.hdr.rx_end)
{
if (precvframe->u.hdr.rx_tail > precvframe->u.hdr.rx_end) {
precvframe->u.hdr.rx_tail -= sz;
return NULL;
}
precvframe->u.hdr.len +=sz;
return precvframe->u.hdr.rx_tail;
}
__inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz)
{
// rmv data from rx_tail (by yitsen)