mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
rtl8188eu: Fix most sparse warnings other than endedness problems
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
925510ff1a
commit
327817d32a
47 changed files with 667 additions and 1771 deletions
|
@ -30,6 +30,7 @@
|
|||
#include <rtw_ioctl.h>
|
||||
#include <rtw_ioctl_set.h>
|
||||
#include <rtw_ioctl_query.h>
|
||||
#include <rtw_mp_ioctl.h>
|
||||
|
||||
//#ifdef CONFIG_MP_INCLUDED
|
||||
#include <rtw_mp_ioctl.h>
|
||||
|
@ -74,10 +75,6 @@
|
|||
#define MAX_CUSTOM_LEN 64
|
||||
#define RATE_COUNT 4
|
||||
|
||||
#ifdef CONFIG_GLOBAL_UI_PID
|
||||
extern int ui_pid[3];
|
||||
#endif
|
||||
|
||||
// combo scan
|
||||
#define WEXT_CSCAN_AMOUNT 9
|
||||
#define WEXT_CSCAN_BUF_LEN 360
|
||||
|
@ -91,10 +88,10 @@ extern int ui_pid[3];
|
|||
#define WEXT_CSCAN_HOME_DWELL_SECTION 'H'
|
||||
#define WEXT_CSCAN_TYPE_SECTION 'T'
|
||||
|
||||
|
||||
extern u8 key_2char2num(u8 hch, u8 lch);
|
||||
extern u8 str_2char2num(u8 hch, u8 lch);
|
||||
extern u8 convert_ip_addr(u8 hch, u8 mch, u8 lch);
|
||||
static u8 convert_ip_addr(u8 hch, u8 mch, u8 lch)
|
||||
{
|
||||
return ((key_char2num(hch) * 100) + (key_char2num(mch) * 10 ) + key_char2num(lch));
|
||||
}
|
||||
|
||||
static u32 rtw_rates[] = {1000000,2000000,5500000,11000000,
|
||||
6000000,9000000,12000000,18000000,24000000,36000000,48000000,54000000};
|
||||
|
@ -336,7 +333,7 @@ static char *translate_scan(_adapter *padapter,
|
|||
// If not, the driver should ignore this AP and go to the next AP.
|
||||
|
||||
// Verifying the SSID
|
||||
if (_rtw_memcmp(pnetwork->network.Ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN))
|
||||
if (!memcmp(pnetwork->network.Ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN))
|
||||
{
|
||||
u32 p2pielen = 0;
|
||||
|
||||
|
@ -981,7 +978,7 @@ _func_enter_;
|
|||
if (param->u.crypt.set_tx == 1)
|
||||
{
|
||||
list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) {
|
||||
if (_rtw_memcmp(pWapiSta->PeerMacAddr,param->sta_addr,6))
|
||||
if (!memcmp(pWapiSta->PeerMacAddr,param->sta_addr,6))
|
||||
{
|
||||
_rtw_memcpy(pWapiSta->lastTxUnicastPN,WapiASUEPNInitialValueSrc,16);
|
||||
|
||||
|
@ -1010,7 +1007,7 @@ _func_enter_;
|
|||
else
|
||||
{
|
||||
list_for_each_entry(pWapiSta, &pWapiInfo->wapiSTAUsedList, list) {
|
||||
if (_rtw_memcmp(pWapiSta->PeerMacAddr,get_bssid(pmlmepriv),6))
|
||||
if (!memcmp(pWapiSta->PeerMacAddr,get_bssid(pmlmepriv),6))
|
||||
{
|
||||
pWapiSta->wapiMsk.bSet = true;
|
||||
_rtw_memcpy(pWapiSta->wapiMsk.dataKey,param->u.crypt.key,16);
|
||||
|
@ -1160,7 +1157,7 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen)
|
|||
{
|
||||
eid = buf[cnt];
|
||||
|
||||
if ((eid==_VENDOR_SPECIFIC_IE_)&&(_rtw_memcmp(&buf[cnt+2], wps_oui, 4)==true))
|
||||
if ((eid==_VENDOR_SPECIFIC_IE_)&&(!memcmp(&buf[cnt+2], wps_oui, 4)==true))
|
||||
{
|
||||
DBG_88E("SET WPS_IE\n");
|
||||
|
||||
|
@ -1446,7 +1443,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
|
|||
if (pPMK->cmd == IW_PMKSA_ADD)
|
||||
{
|
||||
DBG_88E("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n");
|
||||
if (_rtw_memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN) == true)
|
||||
if (!memcmp(strIssueBssid, strZeroMacAddress, ETH_ALEN) == true)
|
||||
{
|
||||
return(intReturn);
|
||||
}
|
||||
|
@ -1459,7 +1456,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
|
|||
//overwrite PMKID
|
||||
for (j=0 ; j<NUM_PMKID_CACHE; j++)
|
||||
{
|
||||
if (_rtw_memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN) ==true)
|
||||
if (!memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN) ==true)
|
||||
{ // BSSID is matched, the same AP => rewrite with new PMKID.
|
||||
|
||||
DBG_88E("[rtw_wx_set_pmkid] BSSID exists in the PMKList.\n");
|
||||
|
@ -1495,7 +1492,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
|
|||
intReturn = true;
|
||||
for (j=0 ; j<NUM_PMKID_CACHE; j++)
|
||||
{
|
||||
if (_rtw_memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN) ==true)
|
||||
if (!memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN) ==true)
|
||||
{ // BSSID is matched, the same AP => Remove this PMKID information and reset it.
|
||||
_rtw_memset(psecuritypriv->PMKIDList[ j ].Bssid, 0x00, ETH_ALEN);
|
||||
psecuritypriv->PMKIDList[ j ].bUsed = false;
|
||||
|
@ -1753,7 +1750,7 @@ static int rtw_wx_set_wap(struct net_device *dev,
|
|||
|
||||
src_bssid = temp->sa_data;
|
||||
|
||||
if ((_rtw_memcmp(dst_bssid, src_bssid, ETH_ALEN)) == true)
|
||||
if ((!memcmp(dst_bssid, src_bssid, ETH_ALEN)) == true)
|
||||
{
|
||||
if (!rtw_set_802_11_infrastructure_mode(padapter, pnetwork->network.InfrastructureMode))
|
||||
{
|
||||
|
@ -2035,7 +2032,7 @@ if (padapter->registrypriv.mp_mode == 1)
|
|||
#endif
|
||||
|
||||
if ( wrqu->data.length >= WEXT_CSCAN_HEADER_SIZE
|
||||
&& _rtw_memcmp(extra, WEXT_CSCAN_HEADER, WEXT_CSCAN_HEADER_SIZE) == true
|
||||
&& !memcmp(extra, WEXT_CSCAN_HEADER, WEXT_CSCAN_HEADER_SIZE) == true
|
||||
)
|
||||
{
|
||||
int len = wrqu->data.length -WEXT_CSCAN_HEADER_SIZE;
|
||||
|
@ -2407,7 +2404,7 @@ static int rtw_wx_set_essid(struct net_device *dev,
|
|||
("rtw_wx_set_essid: dst_ssid=%s\n",
|
||||
pnetwork->network.Ssid.Ssid));
|
||||
|
||||
if ((_rtw_memcmp(dst_ssid, src_ssid, ndis_ssid.SsidLength) == true) &&
|
||||
if ((!memcmp(dst_ssid, src_ssid, ndis_ssid.SsidLength) == true) &&
|
||||
(pnetwork->network.Ssid.SsidLength==ndis_ssid.SsidLength))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_,
|
||||
|
@ -3406,7 +3403,6 @@ static int rtw_wx_set_channel_plan(struct net_device *dev,
|
|||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct registry_priv *pregistrypriv = &padapter->registrypriv;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
extern int rtw_channel_plan;
|
||||
u8 channel_plan_req = (u8) (*((int *)wrqu));
|
||||
|
||||
if (_SUCCESS == rtw_set_chplan_cmd(padapter, channel_plan_req, 1)) {
|
||||
|
@ -3864,7 +3860,7 @@ static int rtw_get_ap_info(struct net_device *dev,
|
|||
}
|
||||
|
||||
|
||||
if (_rtw_memcmp(bssid, pnetwork->network.MacAddress, ETH_ALEN) == true)//BSSID match, then check if supporting wpa/wpa2
|
||||
if (!memcmp(bssid, pnetwork->network.MacAddress, ETH_ALEN) == true)//BSSID match, then check if supporting wpa/wpa2
|
||||
{
|
||||
DBG_88E("BSSID:%pM\n", (bssid));
|
||||
|
||||
|
@ -4530,7 +4526,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
|
|||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
if (_rtw_memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN))
|
||||
if (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN))
|
||||
{
|
||||
u8 *wpsie;
|
||||
uint wpsie_len = 0;
|
||||
|
@ -4681,7 +4677,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev,
|
|||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
if (_rtw_memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN))
|
||||
if (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN))
|
||||
{
|
||||
// Commented by Albert 2011/05/18
|
||||
// Match the device address located in the P2P IE
|
||||
|
@ -4787,18 +4783,18 @@ static int rtw_p2p_get_device_type(struct net_device *dev,
|
|||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
if (_rtw_memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN))
|
||||
if (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN))
|
||||
{
|
||||
u8 *wpsie;
|
||||
uint wpsie_len = 0;
|
||||
|
||||
// The mac address is matched.
|
||||
|
||||
if ((wpsie=rtw_get_wps_ie(&pnetwork->network.IEs[ 12 ], pnetwork->network.IELength - 12, NULL, &wpsie_len)))
|
||||
{
|
||||
if ((wpsie=rtw_get_wps_ie(&pnetwork->network.IEs[ 12 ],
|
||||
pnetwork->network.IELength - 12,
|
||||
NULL, &wpsie_len))) {
|
||||
rtw_get_wps_attr_content(wpsie, wpsie_len, WPS_ATTR_PRIMARY_DEV_TYPE, dev_type, &dev_type_len);
|
||||
if (dev_type_len)
|
||||
{
|
||||
if (dev_type_len) {
|
||||
u16 type = 0;
|
||||
|
||||
memcpy(&type, dev_type, 2);
|
||||
|
@ -4877,7 +4873,7 @@ static int rtw_p2p_get_device_name(struct net_device *dev,
|
|||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
if (_rtw_memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN))
|
||||
if (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN))
|
||||
{
|
||||
u8 *wpsie;
|
||||
uint wpsie_len = 0;
|
||||
|
@ -4965,7 +4961,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev,
|
|||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
if (_rtw_memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN))
|
||||
if (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN))
|
||||
{
|
||||
// Commented by Albert 20121226
|
||||
// Match the device address located in the P2P IE
|
||||
|
@ -5076,7 +5072,7 @@ static int rtw_p2p_connect(struct net_device *dev,
|
|||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
if (_rtw_memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN))
|
||||
if (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN))
|
||||
{
|
||||
uintPeerChannel = pnetwork->network.Configuration.DSConfig;
|
||||
break;
|
||||
|
@ -5241,7 +5237,7 @@ static int rtw_p2p_invite_req(struct net_device *dev,
|
|||
if (rtw_get_p2p_attr_content(p2pie, p2pielen, P2P_ATTR_DEVICE_ID, attr_content, &attr_contentlen))
|
||||
{
|
||||
// Handle the P2P Device ID attribute of Beacon first
|
||||
if (_rtw_memcmp(attr_content, pinvite_req_info->peer_macaddr, ETH_ALEN))
|
||||
if (!memcmp(attr_content, pinvite_req_info->peer_macaddr, ETH_ALEN))
|
||||
{
|
||||
uintPeerChannel = pnetwork->network.Configuration.DSConfig;
|
||||
break;
|
||||
|
@ -5250,7 +5246,7 @@ static int rtw_p2p_invite_req(struct net_device *dev,
|
|||
else if (rtw_get_p2p_attr_content(p2pie, p2pielen, P2P_ATTR_DEVICE_INFO, attr_content, &attr_contentlen))
|
||||
{
|
||||
// Handle the P2P Device Info attribute of probe response
|
||||
if (_rtw_memcmp(attr_content, pinvite_req_info->peer_macaddr, ETH_ALEN))
|
||||
if (!memcmp(attr_content, pinvite_req_info->peer_macaddr, ETH_ALEN))
|
||||
{
|
||||
uintPeerChannel = pnetwork->network.Configuration.DSConfig;
|
||||
break;
|
||||
|
@ -5507,7 +5503,7 @@ static int rtw_p2p_set_pc(struct net_device *dev,
|
|||
{
|
||||
// Handle the P2P Device ID attribute of Beacon first
|
||||
printk("[%s] P2P_ATTR_DEVICE_ID\n", __func__);
|
||||
if (_rtw_memcmp(attr_content, peerMAC, ETH_ALEN))
|
||||
if (!memcmp(attr_content, peerMAC, ETH_ALEN))
|
||||
{
|
||||
uintPeerChannel = pnetwork->network.Configuration.DSConfig;
|
||||
break;
|
||||
|
@ -5517,7 +5513,7 @@ static int rtw_p2p_set_pc(struct net_device *dev,
|
|||
{
|
||||
// Handle the P2P Device Info attribute of probe response
|
||||
printk("[%s] P2P_ATTR_DEVICE_INFO\n", __func__);
|
||||
if (_rtw_memcmp(attr_content, peerMAC, ETH_ALEN))
|
||||
if (!memcmp(attr_content, peerMAC, ETH_ALEN))
|
||||
{
|
||||
uintPeerChannel = pnetwork->network.Configuration.DSConfig;
|
||||
break;
|
||||
|
@ -5754,19 +5750,19 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
|||
peerMAC[ jj ] = key_2char2num(extra[kk], extra[kk+ 1]);
|
||||
}
|
||||
|
||||
if (_rtw_memcmp(&extra[ 18 ], "display", 7))
|
||||
if (!memcmp(&extra[ 18 ], "display", 7))
|
||||
{
|
||||
pwdinfo->tx_prov_disc_info.wps_config_method_request = WPS_CM_DISPLYA;
|
||||
}
|
||||
else if (_rtw_memcmp(&extra[ 18 ], "keypad", 7))
|
||||
else if (!memcmp(&extra[ 18 ], "keypad", 7))
|
||||
{
|
||||
pwdinfo->tx_prov_disc_info.wps_config_method_request = WPS_CM_KEYPAD;
|
||||
}
|
||||
else if (_rtw_memcmp(&extra[ 18 ], "pbc", 3))
|
||||
else if (!memcmp(&extra[ 18 ], "pbc", 3))
|
||||
{
|
||||
pwdinfo->tx_prov_disc_info.wps_config_method_request = WPS_CM_PUSH_BUTTON;
|
||||
}
|
||||
else if (_rtw_memcmp(&extra[ 18 ], "label", 5))
|
||||
else if (!memcmp(&extra[ 18 ], "label", 5))
|
||||
{
|
||||
pwdinfo->tx_prov_disc_info.wps_config_method_request = WPS_CM_LABEL;
|
||||
}
|
||||
|
@ -5805,7 +5801,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
|||
if (rtw_get_p2p_attr_content(p2pie, p2pielen, P2P_ATTR_DEVICE_ID, attr_content, &attr_contentlen))
|
||||
{
|
||||
// Handle the P2P Device ID attribute of Beacon first
|
||||
if (_rtw_memcmp(attr_content, peerMAC, ETH_ALEN))
|
||||
if (!memcmp(attr_content, peerMAC, ETH_ALEN))
|
||||
{
|
||||
uintPeerChannel = pnetwork->network.Configuration.DSConfig;
|
||||
break;
|
||||
|
@ -5814,7 +5810,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
|||
else if (rtw_get_p2p_attr_content(p2pie, p2pielen, P2P_ATTR_DEVICE_INFO, attr_content, &attr_contentlen))
|
||||
{
|
||||
// Handle the P2P Device Info attribute of probe response
|
||||
if (_rtw_memcmp(attr_content, peerMAC, ETH_ALEN))
|
||||
if (!memcmp(attr_content, peerMAC, ETH_ALEN))
|
||||
{
|
||||
uintPeerChannel = pnetwork->network.Configuration.DSConfig;
|
||||
break;
|
||||
|
@ -6004,31 +6000,31 @@ static int rtw_p2p_set(struct net_device *dev,
|
|||
|
||||
DBG_88E("[%s] extra = %s\n", __func__, extra);
|
||||
|
||||
if (_rtw_memcmp(extra, "enable=", 7))
|
||||
if (!memcmp(extra, "enable=", 7))
|
||||
{
|
||||
rtw_wext_p2p_enable(dev, info, wrqu, &extra[7]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "setDN=", 6))
|
||||
else if (!memcmp(extra, "setDN=", 6))
|
||||
{
|
||||
wrqu->data.length -= 6;
|
||||
rtw_p2p_setDN(dev, info, wrqu, &extra[6]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "profilefound=", 13))
|
||||
else if (!memcmp(extra, "profilefound=", 13))
|
||||
{
|
||||
wrqu->data.length -= 13;
|
||||
rtw_p2p_profilefound(dev, info, wrqu, &extra[13]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "prov_disc=", 10))
|
||||
else if (!memcmp(extra, "prov_disc=", 10))
|
||||
{
|
||||
wrqu->data.length -= 10;
|
||||
rtw_p2p_prov_disc(dev, info, wrqu, &extra[10]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "nego=", 5))
|
||||
else if (!memcmp(extra, "nego=", 5))
|
||||
{
|
||||
wrqu->data.length -= 5;
|
||||
rtw_p2p_connect(dev, info, wrqu, &extra[5]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "intent=", 7))
|
||||
else if (!memcmp(extra, "intent=", 7))
|
||||
{
|
||||
// Commented by Albert 2011/03/23
|
||||
// The wrqu->data.length will include the null character
|
||||
|
@ -6036,17 +6032,17 @@ static int rtw_p2p_set(struct net_device *dev,
|
|||
wrqu->data.length -= 8;
|
||||
rtw_p2p_set_intent(dev, info, wrqu, &extra[7]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "ssid=", 5))
|
||||
else if (!memcmp(extra, "ssid=", 5))
|
||||
{
|
||||
wrqu->data.length -= 5;
|
||||
rtw_p2p_set_go_nego_ssid(dev, info, wrqu, &extra[5]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "got_wpsinfo=", 12))
|
||||
else if (!memcmp(extra, "got_wpsinfo=", 12))
|
||||
{
|
||||
wrqu->data.length -= 12;
|
||||
rtw_p2p_got_wpsinfo(dev, info, wrqu, &extra[12]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "listen_ch=", 10))
|
||||
else if (!memcmp(extra, "listen_ch=", 10))
|
||||
{
|
||||
// Commented by Albert 2011/05/24
|
||||
// The wrqu->data.length will include the null character
|
||||
|
@ -6054,7 +6050,7 @@ static int rtw_p2p_set(struct net_device *dev,
|
|||
wrqu->data.length -= 11;
|
||||
rtw_p2p_set_listen_ch(dev, info, wrqu, &extra[10]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "op_ch=", 6))
|
||||
else if (!memcmp(extra, "op_ch=", 6))
|
||||
{
|
||||
// Commented by Albert 2011/05/24
|
||||
// The wrqu->data.length will include the null character
|
||||
|
@ -6062,36 +6058,36 @@ static int rtw_p2p_set(struct net_device *dev,
|
|||
wrqu->data.length -= 7;
|
||||
rtw_p2p_set_op_ch(dev, info, wrqu, &extra[6]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "invite=", 7))
|
||||
else if (!memcmp(extra, "invite=", 7))
|
||||
{
|
||||
wrqu->data.length -= 8;
|
||||
rtw_p2p_invite_req(dev, info, wrqu, &extra[7]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "persistent=", 11))
|
||||
else if (!memcmp(extra, "persistent=", 11))
|
||||
{
|
||||
wrqu->data.length -= 11;
|
||||
rtw_p2p_set_persistent(dev, info, wrqu, &extra[11]);
|
||||
}
|
||||
#ifdef CONFIG_WFD
|
||||
else if (_rtw_memcmp(extra, "sa=", 3))
|
||||
else if (!memcmp(extra, "sa=", 3))
|
||||
{
|
||||
// sa: WFD Session Available information
|
||||
wrqu->data.length -= 3;
|
||||
rtw_p2p_set_sa(dev, info, wrqu, &extra[3]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "pc=", 3))
|
||||
else if (!memcmp(extra, "pc=", 3))
|
||||
{
|
||||
// pc: WFD Preferred Connection
|
||||
wrqu->data.length -= 3;
|
||||
rtw_p2p_set_pc(dev, info, wrqu, &extra[3]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "wfd_type=", 9))
|
||||
else if (!memcmp(extra, "wfd_type=", 9))
|
||||
{
|
||||
// Specify this device is Mircast source or sink
|
||||
wrqu->data.length -= 9;
|
||||
rtw_p2p_set_wfd_device_type(dev, info, wrqu, &extra[9]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "scan_type=", 10))
|
||||
else if (!memcmp(extra, "scan_type=", 10))
|
||||
{
|
||||
wrqu->data.length -= 10;
|
||||
rtw_p2p_set_scan_result_type(dev, info, wrqu, &extra[10]);
|
||||
|
@ -6120,55 +6116,33 @@ static int rtw_p2p_get(struct net_device *dev,
|
|||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
|
||||
if (padapter->bShowGetP2PState)
|
||||
{
|
||||
DBG_88E("[%s] extra = %s\n", __func__, (char*) wrqu->data.pointer);
|
||||
}
|
||||
|
||||
if (_rtw_memcmp(wrqu->data.pointer, "status", 6))
|
||||
{
|
||||
if (!memcmp(wrqu->data.pointer, "status", 6)) {
|
||||
rtw_p2p_get_status(dev, info, wrqu, extra);
|
||||
}
|
||||
else if (_rtw_memcmp(wrqu->data.pointer, "role", 4))
|
||||
{
|
||||
} else if (!memcmp(wrqu->data.pointer, "role", 4)) {
|
||||
rtw_p2p_get_role(dev, info, wrqu, extra);
|
||||
}
|
||||
else if (_rtw_memcmp(wrqu->data.pointer, "peer_ifa", 8))
|
||||
{
|
||||
} else if (!memcmp(wrqu->data.pointer, "peer_ifa", 8)) {
|
||||
rtw_p2p_get_peer_ifaddr(dev, info, wrqu, extra);
|
||||
}
|
||||
else if (_rtw_memcmp(wrqu->data.pointer, "req_cm", 6))
|
||||
{
|
||||
} else if (!memcmp(wrqu->data.pointer, "req_cm", 6)) {
|
||||
rtw_p2p_get_req_cm(dev, info, wrqu, extra);
|
||||
}
|
||||
else if (_rtw_memcmp(wrqu->data.pointer, "peer_deva", 9))
|
||||
{
|
||||
} else if (!memcmp(wrqu->data.pointer, "peer_deva", 9)) {
|
||||
// Get the P2P device address when receiving the provision discovery request frame.
|
||||
rtw_p2p_get_peer_devaddr(dev, info, wrqu, extra);
|
||||
}
|
||||
else if (_rtw_memcmp(wrqu->data.pointer, "group_id", 8))
|
||||
{
|
||||
} else if (!memcmp(wrqu->data.pointer, "group_id", 8)) {
|
||||
rtw_p2p_get_groupid(dev, info, wrqu, extra);
|
||||
}
|
||||
else if (_rtw_memcmp(wrqu->data.pointer, "peer_deva_inv", 9))
|
||||
{
|
||||
} else if (!memcmp(wrqu->data.pointer, "peer_deva_inv", 9)) {
|
||||
// Get the P2P device address when receiving the P2P Invitation request frame.
|
||||
rtw_p2p_get_peer_devaddr_by_invitation(dev, info, wrqu, extra);
|
||||
}
|
||||
else if (_rtw_memcmp(wrqu->data.pointer, "op_ch", 5))
|
||||
{
|
||||
} else if (!memcmp(wrqu->data.pointer, "op_ch", 5)) {
|
||||
rtw_p2p_get_op_ch(dev, info, wrqu, extra);
|
||||
}
|
||||
#ifdef CONFIG_WFD
|
||||
else if (_rtw_memcmp(wrqu->data.pointer, "peer_port", 9))
|
||||
{
|
||||
else if (!memcmp(wrqu->data.pointer, "peer_port", 9)) {
|
||||
rtw_p2p_get_peer_wfd_port(dev, info, wrqu, extra);
|
||||
}
|
||||
else if (_rtw_memcmp(wrqu->data.pointer, "wfd_sa", 6))
|
||||
{
|
||||
} else if (!memcmp(wrqu->data.pointer, "wfd_sa", 6)) {
|
||||
rtw_p2p_get_peer_wfd_session_available(dev, info, wrqu, extra);
|
||||
}
|
||||
else if (_rtw_memcmp(wrqu->data.pointer, "wfd_pc", 6))
|
||||
{
|
||||
} else if (!memcmp(wrqu->data.pointer, "wfd_pc", 6)) {
|
||||
rtw_p2p_get_peer_wfd_preferred_connection(dev, info, wrqu, extra);
|
||||
}
|
||||
#endif // CONFIG_WFD
|
||||
|
@ -6176,7 +6150,6 @@ static int rtw_p2p_get(struct net_device *dev,
|
|||
#endif //CONFIG_P2P
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
static int rtw_p2p_get2(struct net_device *dev,
|
||||
|
@ -6196,27 +6169,27 @@ static int rtw_p2p_get2(struct net_device *dev,
|
|||
|
||||
DBG_88E("[%s] extra = %s\n", __func__, (char *)wrqu->data.pointer);
|
||||
|
||||
if (_rtw_memcmp(extra, "wpsCM=", 6))
|
||||
if (!memcmp(extra, "wpsCM=", 6))
|
||||
{
|
||||
wrqu->data.length -= 6;
|
||||
rtw_p2p_get_wps_configmethod(dev, info, wrqu, &extra[6]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "devN=", 5))
|
||||
else if (!memcmp(extra, "devN=", 5))
|
||||
{
|
||||
wrqu->data.length -= 5;
|
||||
rtw_p2p_get_device_name(dev, info, wrqu, &extra[5]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "dev_type=", 9))
|
||||
else if (!memcmp(extra, "dev_type=", 9))
|
||||
{
|
||||
wrqu->data.length -= 9;
|
||||
rtw_p2p_get_device_type(dev, info, wrqu, &extra[9]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "go_devadd=", 10))
|
||||
else if (!memcmp(extra, "go_devadd=", 10))
|
||||
{
|
||||
wrqu->data.length -= 10;
|
||||
rtw_p2p_get_go_device_address(dev, info, wrqu, &extra[10]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "InvProc=", 8))
|
||||
else if (!memcmp(extra, "InvProc=", 8))
|
||||
{
|
||||
wrqu->data.length -= 8;
|
||||
rtw_p2p_get_invitation_procedure(dev, info, wrqu, &extra[8]);
|
||||
|
@ -6257,8 +6230,6 @@ static int rtw_cta_test_start(struct net_device *dev,
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
extern int rtw_change_ifname(_adapter *padapter, const char *ifname);
|
||||
static int rtw_rereg_nd_name(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
|
@ -6298,7 +6269,7 @@ static int rtw_rereg_nd_name(struct net_device *dev,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (_rtw_memcmp(rereg_priv->old_ifname, "disable%d", 9) == true) {
|
||||
if (!memcmp(rereg_priv->old_ifname, "disable%d", 9) == true) {
|
||||
padapter->ledpriv.bRegUseLed= rereg_priv->old_bRegUseLed;
|
||||
rtw_hal_sw_led_init(padapter);
|
||||
rtw_ips_mode_req(&padapter->pwrctrlpriv, rereg_priv->old_ips_mode);
|
||||
|
@ -6307,7 +6278,7 @@ static int rtw_rereg_nd_name(struct net_device *dev,
|
|||
strncpy(rereg_priv->old_ifname, new_ifname, IFNAMSIZ);
|
||||
rereg_priv->old_ifname[IFNAMSIZ-1] = 0;
|
||||
|
||||
if (_rtw_memcmp(new_ifname, "disable%d", 9) == true) {
|
||||
if (!memcmp(new_ifname, "disable%d", 9) == true) {
|
||||
|
||||
DBG_88E("%s disable\n", __func__);
|
||||
// free network queue for Android's timming issue
|
||||
|
@ -8417,7 +8388,7 @@ static int rtw_wx_set_priv(struct net_device *dev,
|
|||
u8 wps_oui[4]={0x0,0x50,0xf2,0x04};
|
||||
|
||||
if ((_VENDOR_SPECIFIC_IE_ == probereq_wpsie[0]) &&
|
||||
(_rtw_memcmp(&probereq_wpsie[2], wps_oui, 4) ==true))
|
||||
(!memcmp(&probereq_wpsie[2], wps_oui, 4) ==true))
|
||||
{
|
||||
cp_sz = probereq_wpsie_len>MAX_WPS_IE_LEN ? MAX_WPS_IE_LEN:probereq_wpsie_len;
|
||||
|
||||
|
@ -8449,7 +8420,7 @@ static int rtw_wx_set_priv(struct net_device *dev,
|
|||
}
|
||||
|
||||
if ( len >= WEXT_CSCAN_HEADER_SIZE
|
||||
&& _rtw_memcmp(ext, WEXT_CSCAN_HEADER, WEXT_CSCAN_HEADER_SIZE) == true
|
||||
&& !memcmp(ext, WEXT_CSCAN_HEADER, WEXT_CSCAN_HEADER_SIZE) == true
|
||||
){
|
||||
ret = rtw_wx_set_scan(dev, info, awrq, ext);
|
||||
goto FREE_EXT;
|
||||
|
@ -8553,12 +8524,12 @@ static int rtw_pm_set(struct net_device *dev,
|
|||
|
||||
DBG_88E("[%s] extra = %s\n", __func__, extra);
|
||||
|
||||
if (_rtw_memcmp(extra, "lps=", 4))
|
||||
if (!memcmp(extra, "lps=", 4))
|
||||
{
|
||||
sscanf(extra+4, "%u", &mode);
|
||||
ret = rtw_pm_set_lps(padapter,mode);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "ips=", 4))
|
||||
else if (!memcmp(extra, "ips=", 4))
|
||||
{
|
||||
sscanf(extra+4, "%u", &mode);
|
||||
ret = rtw_pm_set_ips(padapter,mode);
|
||||
|
@ -11124,7 +11095,7 @@ static int rtw_tdls_enable(struct net_device *dev,
|
|||
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
|
||||
for (index=0; index< NUM_STA; index++) {
|
||||
if (!_rtw_memcmp(tdls_sta[index], empty_hwaddr, ETH_ALEN)) {
|
||||
if (!!memcmp(tdls_sta[index], empty_hwaddr, ETH_ALEN)) {
|
||||
pr_info("issue tear down to %pM\n", tdls_sta[index]);
|
||||
issue_tdls_teardown(padapter, tdls_sta[index]);
|
||||
}
|
||||
|
@ -11548,19 +11519,19 @@ static int rtw_tdls(struct net_device *dev,
|
|||
|
||||
DBG_88E("[%s] extra = %s\n", __func__, extra);
|
||||
// WFD Sigma will use the tdls enable command to let the driver know we want to test the tdls now!
|
||||
if (_rtw_memcmp(extra, "wfdenable=", 10))
|
||||
if (!memcmp(extra, "wfdenable=", 10))
|
||||
{
|
||||
wrqu->data.length -=10;
|
||||
rtw_wfd_tdls_enable(dev, info, wrqu, &extra[10]);
|
||||
return ret;
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "weaksec=", 8))
|
||||
else if (!memcmp(extra, "weaksec=", 8))
|
||||
{
|
||||
wrqu->data.length -=8;
|
||||
rtw_tdls_weaksec(dev, info, wrqu, &extra[8]);
|
||||
return ret;
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "tdlsenable=", 11))
|
||||
else if (!memcmp(extra, "tdlsenable=", 11))
|
||||
{
|
||||
wrqu->data.length -=11;
|
||||
rtw_tdls_enable(dev, info, wrqu, &extra[11]);
|
||||
|
@ -11573,48 +11544,48 @@ static int rtw_tdls(struct net_device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (_rtw_memcmp(extra, "setup=", 6))
|
||||
if (!memcmp(extra, "setup=", 6))
|
||||
{
|
||||
wrqu->data.length -=6;
|
||||
rtw_tdls_setup(dev, info, wrqu, &extra[6]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "tear=", 5))
|
||||
else if (!memcmp(extra, "tear=", 5))
|
||||
{
|
||||
wrqu->data.length -= 5;
|
||||
rtw_tdls_teardown(dev, info, wrqu, &extra[5]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "dis=", 4))
|
||||
else if (!memcmp(extra, "dis=", 4))
|
||||
{
|
||||
wrqu->data.length -= 4;
|
||||
rtw_tdls_discovery(dev, info, wrqu, &extra[4]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "sw=", 3))
|
||||
else if (!memcmp(extra, "sw=", 3))
|
||||
{
|
||||
wrqu->data.length -= 3;
|
||||
rtw_tdls_ch_switch (dev, info, wrqu, &extra[3]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "swoff=", 6))
|
||||
else if (!memcmp(extra, "swoff=", 6))
|
||||
{
|
||||
wrqu->data.length -= 6;
|
||||
rtw_tdls_ch_switch_off(dev, info, wrqu, &extra[6]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "pson=", 5))
|
||||
else if (!memcmp(extra, "pson=", 5))
|
||||
{
|
||||
wrqu->data.length -= 5;
|
||||
rtw_tdls_pson(dev, info, wrqu, &extra[5]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "psoff=", 6))
|
||||
else if (!memcmp(extra, "psoff=", 6))
|
||||
{
|
||||
wrqu->data.length -= 6;
|
||||
rtw_tdls_psoff(dev, info, wrqu, &extra[6]);
|
||||
}
|
||||
#ifdef CONFIG_WFD
|
||||
else if (_rtw_memcmp(extra, "setip=", 6))
|
||||
else if (!memcmp(extra, "setip=", 6))
|
||||
{
|
||||
wrqu->data.length -= 6;
|
||||
rtw_tdls_setip(dev, info, wrqu, &extra[6]);
|
||||
}
|
||||
else if (_rtw_memcmp(extra, "tprobe=", 6))
|
||||
else if (!memcmp(extra, "tprobe=", 6))
|
||||
{
|
||||
issue_tunneled_probe_req((_adapter *)rtw_netdev_priv(dev));
|
||||
}
|
||||
|
@ -11636,20 +11607,20 @@ static int rtw_tdls_get(struct net_device *dev,
|
|||
|
||||
DBG_88E("[%s] extra = %s\n", __func__, (char*) wrqu->data.pointer);
|
||||
|
||||
if (_rtw_memcmp(wrqu->data.pointer, "ip", 2))
|
||||
if (!memcmp(wrqu->data.pointer, "ip", 2))
|
||||
{
|
||||
rtw_tdls_getip(dev, info, wrqu, extra);
|
||||
}
|
||||
if (_rtw_memcmp(wrqu->data.pointer, "port", 4))
|
||||
if (!memcmp(wrqu->data.pointer, "port", 4))
|
||||
{
|
||||
rtw_tdls_getport(dev, info, wrqu, extra);
|
||||
}
|
||||
//WFDTDLS, for sigma test
|
||||
if (_rtw_memcmp(wrqu->data.pointer, "dis", 3))
|
||||
if (!memcmp(wrqu->data.pointer, "dis", 3))
|
||||
{
|
||||
rtw_tdls_dis_result(dev, info, wrqu, extra);
|
||||
}
|
||||
if (_rtw_memcmp(wrqu->data.pointer, "status", 6))
|
||||
if (!memcmp(wrqu->data.pointer, "status", 6))
|
||||
{
|
||||
rtw_wfd_tdls_status(dev, info, wrqu, extra);
|
||||
}
|
||||
|
@ -12043,8 +12014,8 @@ static u8 pktcmp(PADAPTER padapter, u8 *txbuf, u32 txsz, u8 *rxbuf, u32 rxsz)
|
|||
__func__, txsz - TXDESC_SIZE, rxpktsize - fcssize);
|
||||
ret = false;
|
||||
} else {
|
||||
ret = _rtw_memcmp(txbuf + TXDESC_SIZE,\
|
||||
rxbuf + RXDESC_SIZE + drvinfosize,\
|
||||
ret = !memcmp(txbuf + TXDESC_SIZE,
|
||||
rxbuf + RXDESC_SIZE + drvinfosize,
|
||||
txsz - TXDESC_SIZE);
|
||||
if (ret == false) {
|
||||
DBG_88E("%s: ERROR! pkt content mismatch!\n", __func__);
|
||||
|
|
|
@ -91,7 +91,7 @@ void _rtw_scan_timeout_handler (void *FunctionContext)
|
|||
}
|
||||
|
||||
|
||||
void _dynamic_check_timer_handlder (void *FunctionContext)
|
||||
static void _dynamic_check_timer_handlder (void *FunctionContext)
|
||||
{
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
|
||||
|
@ -298,20 +298,20 @@ _func_exit_;
|
|||
|
||||
}
|
||||
|
||||
void _survey_timer_hdl (void *FunctionContext)
|
||||
static void _survey_timer_hdl (void *FunctionContext)
|
||||
{
|
||||
_adapter *padapter = (_adapter *)FunctionContext;
|
||||
|
||||
survey_timer_hdl(padapter);
|
||||
}
|
||||
|
||||
void _link_timer_hdl (void *FunctionContext)
|
||||
static void _link_timer_hdl (void *FunctionContext)
|
||||
{
|
||||
_adapter *padapter = (_adapter *)FunctionContext;
|
||||
link_timer_hdl(padapter);
|
||||
}
|
||||
|
||||
void _addba_timer_hdl(void *FunctionContext)
|
||||
static void _addba_timer_hdl(void *FunctionContext)
|
||||
{
|
||||
struct sta_info *psta = (struct sta_info *)FunctionContext;
|
||||
addba_timer_hdl(psta);
|
||||
|
|
|
@ -53,82 +53,82 @@ MODULE_AUTHOR("Realtek Semiconductor Corp.");
|
|||
MODULE_VERSION(DRIVERVERSION);
|
||||
|
||||
/* module param defaults */
|
||||
int rtw_chip_version = 0x00;
|
||||
int rtw_rfintfs = HWPI;
|
||||
int rtw_lbkmode = 0;//RTL8712_AIR_TRX;
|
||||
static int rtw_chip_version = 0x00;
|
||||
static int rtw_rfintfs = HWPI;
|
||||
static int rtw_lbkmode = 0;//RTL8712_AIR_TRX;
|
||||
|
||||
|
||||
int rtw_network_mode = Ndis802_11IBSS;//Ndis802_11Infrastructure;//infra, ad-hoc, auto
|
||||
int rtw_channel = 1;//ad-hoc support requirement
|
||||
int rtw_wireless_mode = WIRELESS_11BG_24N;
|
||||
int rtw_vrtl_carrier_sense = AUTO_VCS;
|
||||
int rtw_vcs_type = RTS_CTS;//*
|
||||
int rtw_rts_thresh = 2347;//*
|
||||
int rtw_frag_thresh = 2346;//*
|
||||
int rtw_preamble = PREAMBLE_LONG;//long, short, auto
|
||||
int rtw_scan_mode = 1;//active, passive
|
||||
int rtw_adhoc_tx_pwr = 1;
|
||||
int rtw_soft_ap = 0;
|
||||
static int rtw_network_mode = Ndis802_11IBSS;//Ndis802_11Infrastructure;//infra, ad-hoc, auto
|
||||
static int rtw_channel = 1;//ad-hoc support requirement
|
||||
static int rtw_wireless_mode = WIRELESS_11BG_24N;
|
||||
static int rtw_vrtl_carrier_sense = AUTO_VCS;
|
||||
static int rtw_vcs_type = RTS_CTS;//*
|
||||
static int rtw_rts_thresh = 2347;//*
|
||||
static int rtw_frag_thresh = 2346;//*
|
||||
static int rtw_preamble = PREAMBLE_LONG;//long, short, auto
|
||||
static int rtw_scan_mode = 1;//active, passive
|
||||
static int rtw_adhoc_tx_pwr = 1;
|
||||
static int rtw_soft_ap = 0;
|
||||
#ifdef CONFIG_POWER_SAVING
|
||||
int rtw_power_mgnt = 1;
|
||||
static int rtw_power_mgnt = 1;
|
||||
#ifdef CONFIG_IPS_LEVEL_2
|
||||
int rtw_ips_mode = IPS_LEVEL_2;
|
||||
static int rtw_ips_mode = IPS_LEVEL_2;
|
||||
#else
|
||||
int rtw_ips_mode = IPS_NORMAL;
|
||||
static int rtw_ips_mode = IPS_NORMAL;
|
||||
#endif
|
||||
#else
|
||||
int rtw_power_mgnt = PS_MODE_ACTIVE;
|
||||
int rtw_ips_mode = IPS_NONE;
|
||||
static int rtw_power_mgnt = PS_MODE_ACTIVE;
|
||||
static int rtw_ips_mode = IPS_NONE;
|
||||
#endif
|
||||
|
||||
int rtw_smart_ps = 2;
|
||||
static int rtw_smart_ps = 2;
|
||||
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
int rtw_early_mode=1;
|
||||
static int rtw_early_mode=1;
|
||||
#endif
|
||||
module_param(rtw_ips_mode, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_ips_mode,"The default IPS mode");
|
||||
|
||||
static int rtw_debug = 1;
|
||||
int rtw_radio_enable = 1;
|
||||
int rtw_long_retry_lmt = 7;
|
||||
int rtw_short_retry_lmt = 7;
|
||||
int rtw_busy_thresh = 40;
|
||||
int rtw_ack_policy = NORMAL_ACK;
|
||||
static int rtw_radio_enable = 1;
|
||||
static int rtw_long_retry_lmt = 7;
|
||||
static int rtw_short_retry_lmt = 7;
|
||||
static int rtw_busy_thresh = 40;
|
||||
static int rtw_ack_policy = NORMAL_ACK;
|
||||
|
||||
int rtw_mp_mode = 0;
|
||||
static int rtw_mp_mode = 0;
|
||||
|
||||
int rtw_software_encrypt = 0;
|
||||
int rtw_software_decrypt = 0;
|
||||
static int rtw_software_encrypt = 0;
|
||||
static int rtw_software_decrypt = 0;
|
||||
|
||||
int rtw_acm_method = 0;// 0:By SW 1:By HW.
|
||||
static int rtw_acm_method = 0;// 0:By SW 1:By HW.
|
||||
|
||||
int rtw_wmm_enable = 1;// default is set to enable the wmm.
|
||||
int rtw_uapsd_enable = 0;
|
||||
int rtw_uapsd_max_sp = NO_LIMIT;
|
||||
int rtw_uapsd_acbk_en = 0;
|
||||
int rtw_uapsd_acbe_en = 0;
|
||||
int rtw_uapsd_acvi_en = 0;
|
||||
int rtw_uapsd_acvo_en = 0;
|
||||
static int rtw_wmm_enable = 1;// default is set to enable the wmm.
|
||||
static int rtw_uapsd_enable = 0;
|
||||
static int rtw_uapsd_max_sp = NO_LIMIT;
|
||||
static int rtw_uapsd_acbk_en = 0;
|
||||
static int rtw_uapsd_acbe_en = 0;
|
||||
static int rtw_uapsd_acvi_en = 0;
|
||||
static int rtw_uapsd_acvo_en = 0;
|
||||
|
||||
#ifdef CONFIG_80211N_HT
|
||||
int rtw_ht_enable = 1;
|
||||
int rtw_cbw40_enable = 3; // 0 :diable, bit(0): enable 2.4g, bit(1): enable 5g
|
||||
int rtw_ampdu_enable = 1;//for enable tx_ampdu
|
||||
int rtw_rx_stbc = 1;// 0: disable, bit(0):enable 2.4g, bit(1):enable 5g, default is set to enable 2.4GHZ for IOT issue with bufflao's AP at 5GHZ
|
||||
int rtw_ampdu_amsdu = 0;// 0: disabled, 1:enabled, 2:auto
|
||||
static int rtw_rx_stbc = 1;// 0: disable, bit(0):enable 2.4g, bit(1):enable 5g, default is set to enable 2.4GHZ for IOT issue with bufflao's AP at 5GHZ
|
||||
static int rtw_ampdu_amsdu = 0;// 0: disabled, 1:enabled, 2:auto
|
||||
#endif
|
||||
|
||||
int rtw_lowrate_two_xmit = 1;//Use 2 path Tx to transmit MCS0~7 and legacy mode
|
||||
static int rtw_lowrate_two_xmit = 1;//Use 2 path Tx to transmit MCS0~7 and legacy mode
|
||||
|
||||
int rtw_rf_config = RF_819X_MAX_TYPE; //auto
|
||||
int rtw_low_power = 0;
|
||||
static int rtw_rf_config = RF_819X_MAX_TYPE; //auto
|
||||
static int rtw_low_power = 0;
|
||||
#ifdef CONFIG_WIFI_TEST
|
||||
int rtw_wifi_spec = 1;//for wifi test
|
||||
static int rtw_wifi_spec = 1;//for wifi test
|
||||
#else
|
||||
int rtw_wifi_spec = 0;
|
||||
static int rtw_wifi_spec = 0;
|
||||
#endif
|
||||
int rtw_channel_plan = RT_CHANNEL_DOMAIN_MAX;
|
||||
static int rtw_channel_plan = RT_CHANNEL_DOMAIN_MAX;
|
||||
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
int rtw_btcoex_enable = 1;
|
||||
|
@ -137,29 +137,29 @@ int rtw_bt_sco = 3;// 0:Idle, 1:None-SCO, 2:SCO, 3:From Counter, 4.Busy, 5.Other
|
|||
int rtw_bt_ampdu =1 ;// 0:Disable BT control A-MPDU, 1:Enable BT control A-MPDU.
|
||||
#endif
|
||||
|
||||
int rtw_AcceptAddbaReq = true;// 0:Reject AP's Add BA req, 1:Accept AP's Add BA req.
|
||||
static int rtw_AcceptAddbaReq = true;// 0:Reject AP's Add BA req, 1:Accept AP's Add BA req.
|
||||
|
||||
int rtw_antdiv_cfg = 2; // 0:OFF , 1:ON, 2:decide by Efuse config
|
||||
int rtw_antdiv_type = 0 ; //0:decide by efuse 1: for 88EE, 1Tx and 1RxCG are diversity.(2 Ant with SPDT), 2: for 88EE, 1Tx and 2Rx are diversity.( 2 Ant, Tx and RxCG are both on aux port, RxCS is on main port ), 3: for 88EE, 1Tx and 1RxCG are fixed.(1Ant, Tx and RxCG are both on aux port)
|
||||
static int rtw_antdiv_cfg = 2; // 0:OFF , 1:ON, 2:decide by Efuse config
|
||||
static int rtw_antdiv_type = 0 ; //0:decide by efuse 1: for 88EE, 1Tx and 1RxCG are diversity.(2 Ant with SPDT), 2: for 88EE, 1Tx and 2Rx are diversity.( 2 Ant, Tx and RxCG are both on aux port, RxCS is on main port ), 3: for 88EE, 1Tx and 1RxCG are fixed.(1Ant, Tx and RxCG are both on aux port)
|
||||
|
||||
#ifdef CONFIG_USB_AUTOSUSPEND
|
||||
int rtw_enusbss = 1;//0:disable,1:enable
|
||||
static int rtw_enusbss = 1;//0:disable,1:enable
|
||||
#else
|
||||
int rtw_enusbss = 0;//0:disable,1:enable
|
||||
static int rtw_enusbss = 0;//0:disable,1:enable
|
||||
#endif
|
||||
|
||||
int rtw_hwpdn_mode=2;//0:disable,1:enable,2: by EFUSE config
|
||||
static int rtw_hwpdn_mode=2;//0:disable,1:enable,2: by EFUSE config
|
||||
|
||||
#ifdef CONFIG_HW_PWRP_DETECTION
|
||||
int rtw_hwpwrp_detect = 1;
|
||||
static int rtw_hwpwrp_detect = 1;
|
||||
#else
|
||||
int rtw_hwpwrp_detect = 0; //HW power ping detect 0:disable , 1:enable
|
||||
static int rtw_hwpwrp_detect = 0; //HW power ping detect 0:disable , 1:enable
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
int rtw_hw_wps_pbc = 1;
|
||||
static int rtw_hw_wps_pbc = 1;
|
||||
#else
|
||||
int rtw_hw_wps_pbc = 0;
|
||||
static int rtw_hw_wps_pbc = 0;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TX_MCAST2UNI
|
||||
|
@ -171,7 +171,7 @@ int rtw_dmsp = 0;
|
|||
#endif // CONFIG_DUALMAC_CONCURRENT
|
||||
|
||||
#ifdef CONFIG_80211D
|
||||
int rtw_80211d = 0;
|
||||
static int rtw_80211d = 0;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SPECIAL_SETTING_FOR_FUNAI_TV
|
||||
|
@ -181,15 +181,15 @@ module_param(rtw_force_ant, int, 0644);
|
|||
module_param(rtw_force_igi, int, 0644);
|
||||
#endif
|
||||
|
||||
char* ifname = "wlan%d";
|
||||
static char* ifname = "wlan%d";
|
||||
module_param(ifname, charp, 0644);
|
||||
MODULE_PARM_DESC(ifname, "The default name to allocate for first interface");
|
||||
|
||||
char* if2name = "wlan%d";
|
||||
static char* if2name = "wlan%d";
|
||||
module_param(if2name, charp, 0644);
|
||||
MODULE_PARM_DESC(if2name, "The default name to allocate for second interface");
|
||||
|
||||
char* rtw_initmac = 0; // temp mac address if users want to use instead of the mac address in Efuse
|
||||
char* rtw_initmac = NULL; // temp mac address if users want to use instead of the mac address in Efuse
|
||||
|
||||
module_param(rtw_initmac, charp, 0644);
|
||||
module_param(rtw_channel_plan, int, 0644);
|
||||
|
@ -233,13 +233,13 @@ MODULE_PARM_DESC(rtw_adaptor_info_caching_file_path, "The path of adapter info c
|
|||
#endif //CONFIG_ADAPTOR_INFO_CACHING_FILE
|
||||
|
||||
#ifdef CONFIG_LAYER2_ROAMING
|
||||
uint rtw_max_roaming_times=2;
|
||||
static uint rtw_max_roaming_times=2;
|
||||
module_param(rtw_max_roaming_times, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_max_roaming_times,"The max roaming times to try");
|
||||
#endif //CONFIG_LAYER2_ROAMING
|
||||
|
||||
#ifdef CONFIG_IOL
|
||||
int rtw_fw_iol=1;// 0:Disable, 1:enable, 2:by usb speed
|
||||
static int rtw_fw_iol=1;// 0:Disable, 1:enable, 2:by usb speed
|
||||
module_param(rtw_fw_iol, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_fw_iol,"FW IOL");
|
||||
#endif //CONFIG_IOL
|
||||
|
@ -268,13 +268,12 @@ module_param(rtw_btcoex_enable, int, 0644);
|
|||
MODULE_PARM_DESC(rtw_btcoex_enable, "Enable BT co-existence mechanism");
|
||||
#endif
|
||||
|
||||
uint rtw_notch_filter = RTW_NOTCH_FILTER;
|
||||
static uint rtw_notch_filter = RTW_NOTCH_FILTER;
|
||||
module_param(rtw_notch_filter, uint, 0644);
|
||||
MODULE_PARM_DESC(rtw_notch_filter, "0:Disable, 1:Enable, 2:Enable only for P2P");
|
||||
module_param_named(debug, rtw_debug, int, 0444);
|
||||
MODULE_PARM_DESC(debug, "Set debug level (1-9) (default 1)");
|
||||
|
||||
static uint loadparam(PADAPTER padapter, _nic_hdl pnetdev);
|
||||
int _netdev_open(struct net_device *pnetdev);
|
||||
int netdev_open (struct net_device *pnetdev);
|
||||
static int netdev_close (struct net_device *pnetdev);
|
||||
|
@ -674,7 +673,7 @@ void rtw_proc_remove_one(struct net_device *dev)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
uint loadparam( _adapter *padapter, _nic_hdl pnetdev)
|
||||
static uint loadparam( _adapter *padapter, _nic_hdl pnetdev)
|
||||
{
|
||||
|
||||
uint status = _SUCCESS;
|
||||
|
@ -824,7 +823,7 @@ static struct net_device_stats *rtw_net_get_stats(struct net_device *pnetdev)
|
|||
static const u16 rtw_1d_to_queue[8] = { 2, 3, 3, 2, 1, 1, 0, 0 };
|
||||
|
||||
/* Given a data frame determine the 802.1p/1d tag to use. */
|
||||
unsigned int rtw_classify8021d(struct sk_buff *skb)
|
||||
static unsigned int rtw_classify8021d(struct sk_buff *skb)
|
||||
{
|
||||
unsigned int dscp;
|
||||
|
||||
|
@ -864,7 +863,7 @@ u16 rtw_recv_select_queue(struct sk_buff *skb)
|
|||
{
|
||||
struct iphdr *piphdr;
|
||||
unsigned int dscp;
|
||||
u16 eth_type;
|
||||
__be16 eth_type;
|
||||
u32 priority;
|
||||
u8 *pdata = skb->data;
|
||||
|
||||
|
@ -1072,7 +1071,7 @@ void rtw_stop_drv_threads (_adapter *padapter)
|
|||
rtw_hal_stop_thread(padapter);
|
||||
}
|
||||
|
||||
u8 rtw_init_default_value(_adapter *padapter)
|
||||
static u8 rtw_init_default_value(_adapter *padapter)
|
||||
{
|
||||
u8 ret = _SUCCESS;
|
||||
struct registry_priv* pregistrypriv = &padapter->registrypriv;
|
||||
|
@ -1903,7 +1902,7 @@ int netdev_open(struct net_device *pnetdev)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_IPS
|
||||
int ips_netdrv_open(_adapter *padapter)
|
||||
static int ips_netdrv_open(_adapter *padapter)
|
||||
{
|
||||
int status = _SUCCESS;
|
||||
padapter->net_closed = false;
|
||||
|
@ -1971,7 +1970,7 @@ void rtw_ips_dev_unload(_adapter *padapter)
|
|||
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
||||
DBG_88E("====> %s...\n",__func__);
|
||||
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_FIFO_CLEARN_UP, 0);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_FIFO_CLEARN_UP, NULL);
|
||||
|
||||
if (padapter->intf_stop)
|
||||
padapter->intf_stop(padapter);
|
||||
|
|
|
@ -26,14 +26,13 @@
|
|||
#include <drv_types.h>
|
||||
#include <recv_osdep.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <rtw_ioctl_set.h>
|
||||
#ifdef RTK_DMP_PLATFORM
|
||||
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12))
|
||||
#include <linux/pageremap.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define RT_TAG '1178'
|
||||
|
||||
/*
|
||||
* Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE
|
||||
* @return: one of RTW_STATUS_CODE
|
||||
|
@ -242,26 +241,6 @@ void _rtw_spinlock_free(_lock *plock)
|
|||
{
|
||||
}
|
||||
|
||||
void _rtw_spinlock(_lock *plock)
|
||||
{
|
||||
spin_lock(plock);
|
||||
}
|
||||
|
||||
void _rtw_spinunlock(_lock *plock)
|
||||
{
|
||||
spin_unlock(plock);
|
||||
}
|
||||
|
||||
void _rtw_spinlock_ex(_lock *plock)
|
||||
{
|
||||
spin_lock(plock);
|
||||
}
|
||||
|
||||
void _rtw_spinunlock_ex(_lock *plock)
|
||||
{
|
||||
spin_unlock(plock);
|
||||
}
|
||||
|
||||
void _rtw_init_queue(_queue *pqueue)
|
||||
{
|
||||
_rtw_init_listhead(&(pqueue->queue));
|
||||
|
@ -359,7 +338,7 @@ void rtw_udelay_os(int us)
|
|||
}
|
||||
#endif
|
||||
|
||||
void rtw_yield_os()
|
||||
void rtw_yield_os(void)
|
||||
{
|
||||
yield();
|
||||
}
|
||||
|
@ -374,7 +353,7 @@ static android_suspend_lock_t rtw_suspend_lock ={
|
|||
};
|
||||
#endif
|
||||
|
||||
inline void rtw_suspend_lock_init()
|
||||
inline void rtw_suspend_lock_init(void)
|
||||
{
|
||||
#ifdef CONFIG_WAKELOCK
|
||||
wake_lock_init(&rtw_suspend_lock, WAKE_LOCK_SUSPEND, RTW_SUSPEND_LOCK_NAME);
|
||||
|
@ -383,7 +362,7 @@ inline void rtw_suspend_lock_init()
|
|||
#endif
|
||||
}
|
||||
|
||||
inline void rtw_suspend_lock_uninit()
|
||||
inline void rtw_suspend_lock_uninit(void)
|
||||
{
|
||||
#ifdef CONFIG_WAKELOCK
|
||||
wake_lock_destroy(&rtw_suspend_lock);
|
||||
|
@ -392,7 +371,7 @@ inline void rtw_suspend_lock_uninit()
|
|||
#endif
|
||||
}
|
||||
|
||||
inline void rtw_lock_suspend()
|
||||
inline void rtw_lock_suspend(void)
|
||||
{
|
||||
#ifdef CONFIG_WAKELOCK
|
||||
wake_lock(&rtw_suspend_lock);
|
||||
|
@ -405,7 +384,7 @@ inline void rtw_lock_suspend()
|
|||
#endif
|
||||
}
|
||||
|
||||
inline void rtw_unlock_suspend()
|
||||
inline void rtw_unlock_suspend(void)
|
||||
{
|
||||
#ifdef CONFIG_WAKELOCK
|
||||
wake_unlock(&rtw_suspend_lock);
|
||||
|
|
|
@ -28,10 +28,7 @@
|
|||
|
||||
#include <osdep_intf.h>
|
||||
#include <ethernet.h>
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usb_ops.h>
|
||||
#endif
|
||||
|
||||
//init os related resource in struct recv_priv
|
||||
int rtw_os_recv_resource_init(struct recv_priv *precvpriv, _adapter *padapter)
|
||||
|
@ -353,7 +350,6 @@ _func_enter_;
|
|||
|
||||
if ( br_port && (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true) )
|
||||
{
|
||||
int nat25_handle_frame(_adapter *priv, struct sk_buff *skb);
|
||||
if (nat25_handle_frame(padapter, skb) == -1) {
|
||||
//priv->ext_stats.rx_data_drops++;
|
||||
//DEBUG_ERR("RX DROP: nat25_handle_frame fail!\n");
|
||||
|
|
|
@ -97,13 +97,7 @@ typedef struct cmd_tlv {
|
|||
#endif /* PNO_SUPPORT */
|
||||
|
||||
typedef struct android_wifi_priv_cmd {
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
compat_uptr_t buf;
|
||||
#else
|
||||
char *buf;
|
||||
#endif
|
||||
|
||||
int used_len;
|
||||
int total_len;
|
||||
} android_wifi_priv_cmd;
|
||||
|
@ -359,7 +353,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
|
|||
ret = -EFAULT;
|
||||
goto exit;
|
||||
}
|
||||
if (copy_from_user(command, (void *)priv_cmd.buf, priv_cmd.total_len)) {
|
||||
if (copy_from_user(command, (char __user *)priv_cmd.buf, priv_cmd.total_len)) {
|
||||
ret = -EFAULT;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -563,7 +557,7 @@ response:
|
|||
bytes_written++;
|
||||
}
|
||||
priv_cmd.used_len = bytes_written;
|
||||
if (copy_to_user((void *)priv_cmd.buf, command, bytes_written)) {
|
||||
if (copy_to_user((char __user *)priv_cmd.buf, command, bytes_written)) {
|
||||
DBG_88E("%s: failed to copy data to user buffer\n", __func__);
|
||||
ret = -EFAULT;
|
||||
}
|
||||
|
|
|
@ -27,11 +27,13 @@
|
|||
#include <hal_intf.h>
|
||||
#include <rtw_version.h>
|
||||
#include <linux/usb.h>
|
||||
#include <osdep_intf.h>
|
||||
|
||||
#include <usb_vendor_req.h>
|
||||
#include <usb_ops.h>
|
||||
#include <usb_osintf.h>
|
||||
#include <usb_hal.h>
|
||||
#include <rtw_ioctl.h>
|
||||
#ifdef CONFIG_PLATFORM_RTK_DMP
|
||||
#include <asm/io.h>
|
||||
#endif
|
||||
|
@ -42,18 +44,11 @@
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_80211N_HT
|
||||
extern int rtw_ht_enable;
|
||||
extern int rtw_cbw40_enable;
|
||||
extern int rtw_ampdu_enable;//for enable tx_ampdu
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GLOBAL_UI_PID
|
||||
int ui_pid[3] = {0, 0, 0};
|
||||
#endif
|
||||
|
||||
|
||||
extern int pm_netdev_open(struct net_device *pnetdev,u8 bnormal);
|
||||
static int rtw_suspend(struct usb_interface *intf, pm_message_t message);
|
||||
static int rtw_resume(struct usb_interface *intf);
|
||||
int rtw_resume_process(_adapter *padapter);
|
||||
|
@ -277,7 +272,7 @@ static struct usb_device_id rtw_usb_id_tbl[] ={
|
|||
};
|
||||
MODULE_DEVICE_TABLE(usb, rtw_usb_id_tbl);
|
||||
|
||||
int const rtw_usb_id_len = sizeof(rtw_usb_id_tbl) / sizeof(struct usb_device_id);
|
||||
//int const rtw_usb_id_len = sizeof(rtw_usb_id_tbl) / sizeof(struct usb_device_id);
|
||||
|
||||
static struct specific_device_id specific_device_id_tbl[] = {
|
||||
{.idVendor=USB_VENDER_ID_REALTEK, .idProduct=0x8177, .flags=SPEC_DEV_ID_DISABLE_HT},//8188cu 1*1 dongole, (b/g mode only)
|
||||
|
@ -382,7 +377,7 @@ static struct usb_device_id rtl8188e_usb_id_tbl[] ={
|
|||
{} /* Terminating entry */
|
||||
};
|
||||
|
||||
struct rtw_usb_drv rtl8188e_usb_drv = {
|
||||
static struct rtw_usb_drv rtl8188e_usb_drv = {
|
||||
.usbdrv.name = (char*)"rtl8188eu",
|
||||
.usbdrv.probe = rtw_drv_init,
|
||||
.usbdrv.disconnect = rtw_dev_remove,
|
||||
|
@ -1298,9 +1293,9 @@ static int usb_wifi_host = 2;
|
|||
* We accept the new device by returning 0.
|
||||
*/
|
||||
|
||||
_adapter *rtw_sw_export = NULL;
|
||||
static _adapter *rtw_sw_export = NULL;
|
||||
|
||||
_adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
|
||||
static _adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
|
||||
struct usb_interface *pusb_intf, const struct usb_device_id *pdid)
|
||||
{
|
||||
_adapter *padapter = NULL;
|
||||
|
@ -1468,7 +1463,7 @@ _adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
|
|||
|
||||
free_hal_data:
|
||||
if (status != _SUCCESS && padapter->HalData)
|
||||
rtw_mfree(padapter->HalData, sizeof(*(padapter->HalData)));
|
||||
kfree(padapter->HalData);
|
||||
free_wdev:
|
||||
if (status != _SUCCESS) {
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <xmit_osdep.h>
|
||||
#include <osdep_intf.h>
|
||||
#include <circ_buf.h>
|
||||
#include <usb_osintf.h>
|
||||
|
||||
uint rtw_remainder_len(struct pkt_file *pfile)
|
||||
{
|
||||
|
@ -311,7 +312,7 @@ static void rtw_check_xmit_resource(_adapter *padapter, _pkt *pkt)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_TX_MCAST2UNI
|
||||
int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb)
|
||||
static int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb)
|
||||
{
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
|
@ -370,7 +371,6 @@ int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev)
|
|||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
#ifdef CONFIG_TX_MCAST2UNI
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
extern int rtw_mc2u_disable;
|
||||
#endif // CONFIG_TX_MCAST2UNI
|
||||
s32 res = 0;
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,35))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue