Merge pull request #1 from lwfinger/master

Update from main fork
This commit is contained in:
Alessandro Miceli 2015-05-01 13:55:10 +02:00
commit 8914ec520b
5 changed files with 27 additions and 10 deletions

View file

@ -1,3 +1,4 @@
SHELL := /bin/bash
EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS) EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
EXTRA_CFLAGS += -O1 EXTRA_CFLAGS += -O1

View file

@ -1601,6 +1601,7 @@ struct recv_frame *recvframe_chk_defrag(struct adapter *padapter, struct recv_fr
prtnframe = NULL; prtnframe = NULL;
} else { } else {
/* can't find this ta's defrag_queue, so free this recv_frame */ /* can't find this ta's defrag_queue, so free this recv_frame */
if (precv_frame && pfree_recv_queue)
rtw_free_recvframe(precv_frame, pfree_recv_queue); rtw_free_recvframe(precv_frame, pfree_recv_queue);
prtnframe = NULL; prtnframe = NULL;
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("Free because pdefrag_q==NULL: ismfrag=%d, fragnum=%d\n", ismfrag, fragnum)); RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("Free because pdefrag_q==NULL: ismfrag=%d, fragnum=%d\n", ismfrag, fragnum));
@ -1620,6 +1621,7 @@ struct recv_frame *recvframe_chk_defrag(struct adapter *padapter, struct recv_fr
prtnframe = precv_frame; prtnframe = precv_frame;
} else { } else {
/* can't find this ta's defrag_queue, so free this recv_frame */ /* can't find this ta's defrag_queue, so free this recv_frame */
if (precv_frame && pfree_recv_queue)
rtw_free_recvframe(precv_frame, pfree_recv_queue); rtw_free_recvframe(precv_frame, pfree_recv_queue);
prtnframe = NULL; prtnframe = NULL;
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("Free because pdefrag_q==NULL: ismfrag=%d, fragnum=%d\n", ismfrag, fragnum)); RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("Free because pdefrag_q==NULL: ismfrag=%d, fragnum=%d\n", ismfrag, fragnum));
@ -1630,6 +1632,7 @@ struct recv_frame *recvframe_chk_defrag(struct adapter *padapter, struct recv_fr
/* after defrag we must check tkip mic code */ /* after defrag we must check tkip mic code */
if (recvframe_chkmic(padapter, prtnframe) == _FAIL) { if (recvframe_chkmic(padapter, prtnframe) == _FAIL) {
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("recvframe_chkmic(padapter, prtnframe)==_FAIL\n")); RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("recvframe_chkmic(padapter, prtnframe)==_FAIL\n"));
if (precv_frame && pfree_recv_queue)
rtw_free_recvframe(prtnframe, pfree_recv_queue); rtw_free_recvframe(prtnframe, pfree_recv_queue);
prtnframe = NULL; prtnframe = NULL;
} }

View file

@ -936,6 +936,8 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
} }
bssid = (struct wlan_bssid_ex *)rtw_zmalloc(sizeof(struct wlan_bssid_ex)); bssid = (struct wlan_bssid_ex *)rtw_zmalloc(sizeof(struct wlan_bssid_ex));
if (!bssid)
return _FAIL;
subtype = GetFrameSubType(pframe) >> 4; subtype = GetFrameSubType(pframe) >> 4;

View file

@ -20,6 +20,8 @@
#ifndef _WIFI_H_ #ifndef _WIFI_H_
#define _WIFI_H_ #define _WIFI_H_
#include <linux/ieee80211.h>
#ifdef BIT #ifdef BIT
/* error "BIT define occurred earlier elsewhere!\n" */ /* error "BIT define occurred earlier elsewhere!\n" */
#undef BIT #undef BIT
@ -631,11 +633,14 @@ struct rtw_ieee80211_bar {
struct rtw_ieee80211_ht_cap { struct rtw_ieee80211_ht_cap {
__le16 cap_info; __le16 cap_info;
unsigned char ampdu_params_info; u8 ampdu_params_info;
unsigned char supp_mcs_set[16]; union {
struct ieee80211_mcs_info mcs;
u8 supp_mcs_set[16];
};
__le16 extended_ht_cap_info; __le16 extended_ht_cap_info;
__le16 tx_BF_cap_info; __le32 tx_BF_cap_info;
unsigned char antenna_selection_info; u8 antenna_selection_info;
} __packed; } __packed;
/** /**

View file

@ -20,6 +20,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/version.h>
#include <rtw_android.h> #include <rtw_android.h>
#include <osdep_service.h> #include <osdep_service.h>
@ -79,9 +80,14 @@ static int g_wifi_on = true;
int rtw_android_cmdstr_to_num(char *cmdstr) int rtw_android_cmdstr_to_num(char *cmdstr)
{ {
int cmd_num; int cmd_num;
for (cmd_num = 0; cmd_num < ANDROID_WIFI_CMD_MAX; cmd_num++) for(cmd_num=0; cmd_num < ANDROID_WIFI_CMD_MAX; cmd_num++)
if (0 == strnicmp(cmdstr , android_wifi_cmd_str[cmd_num], #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0))
if (!strncasecmp(cmdstr, android_wifi_cmd_str[cmd_num],
strlen(android_wifi_cmd_str[cmd_num]))) strlen(android_wifi_cmd_str[cmd_num])))
#else
if(0 == strnicmp(cmdstr, android_wifi_cmd_str[cmd_num],
strlen(android_wifi_cmd_str[cmd_num])))
#endif
break; break;
return cmd_num; return cmd_num;
} }