mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
rtl8188eu: Fix some sparse warnings
The driver did not work on PowerPC, which is big endian. This patch fixes all the sparse warnings concerning improper use of __le16 and __le32 variables. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
77e8b5de91
commit
7c7f632ac7
25 changed files with 502 additions and 684 deletions
|
@ -96,7 +96,7 @@ static void update_BCNTIM(struct adapter *padapter)
|
|||
if(true)
|
||||
{
|
||||
u8 *p, *dst_ie, *premainder_ie=NULL, *pbackup_remainder_ie=NULL;
|
||||
u16 tim_bitmap_le;
|
||||
__le16 tim_bitmap_le;
|
||||
uint offset, tmp_len, tim_ielen, tim_ie_offset, remainder_ielen;
|
||||
|
||||
tim_bitmap_le = cpu_to_le16(pstapriv->tim_bitmap);
|
||||
|
@ -932,7 +932,7 @@ static void update_hw_ht_param(struct adapter *padapter)
|
|||
//
|
||||
// Config SM Power Save setting
|
||||
//
|
||||
pmlmeinfo->SM_PS = (pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info & 0x0C) >> 2;
|
||||
pmlmeinfo->SM_PS = (le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info) & 0x0C) >> 2;
|
||||
if(pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC)
|
||||
{
|
||||
/*u8 i;
|
||||
|
@ -2008,7 +2008,7 @@ static int rtw_ht_operation_update(struct adapter *padapter)
|
|||
if (pmlmepriv->num_sta_no_ht ||
|
||||
(pmlmepriv->ht_op_mode & HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT))
|
||||
new_op_mode = OP_MODE_MIXED;
|
||||
else if ((phtpriv_ap->ht_cap.cap_info & IEEE80211_HT_CAP_SUP_WIDTH)
|
||||
else if ((le16_to_cpu(phtpriv_ap->ht_cap.cap_info) & IEEE80211_HT_CAP_SUP_WIDTH)
|
||||
&& pmlmepriv->num_sta_ht_20mhz)
|
||||
new_op_mode = OP_MODE_20MHZ_HT_STA_ASSOCED;
|
||||
else if (pmlmepriv->olbc_ht)
|
||||
|
|
|
@ -785,6 +785,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
{
|
||||
unsigned short protocol;
|
||||
unsigned char networkAddr[MAX_NETWORK_ADDR_LEN];
|
||||
u32 tmp;
|
||||
|
||||
if(skb == NULL)
|
||||
return -1;
|
||||
|
@ -792,7 +793,7 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
if((method <= NAT25_MIN) || (method >= NAT25_MAX))
|
||||
return -1;
|
||||
|
||||
protocol = *((unsigned short *)(skb->data + 2 * ETH_ALEN));
|
||||
protocol = be16_to_cpu(*((__be16 *)(skb->data + 2 * ETH_ALEN)));
|
||||
|
||||
/*---------------------------------------------------*/
|
||||
/* Handle IP frame */
|
||||
|
@ -807,61 +808,61 @@ int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
|
|||
return -1;
|
||||
}
|
||||
|
||||
switch(method)
|
||||
{
|
||||
case NAT25_CHECK:
|
||||
return -1;
|
||||
switch(method) {
|
||||
case NAT25_CHECK:
|
||||
return -1;
|
||||
|
||||
case NAT25_INSERT:
|
||||
{
|
||||
//some muticast with source IP is all zero, maybe other case is illegal
|
||||
//in class A, B, C, host address is all zero or all one is illegal
|
||||
if (iph->saddr == 0)
|
||||
return 0;
|
||||
DEBUG_INFO("NAT25: Insert IP, SA=%08x, DA=%08x\n", iph->saddr, iph->daddr);
|
||||
__nat25_generate_ipv4_network_addr(networkAddr, &iph->saddr);
|
||||
//record source IP address and , source mac address into db
|
||||
__nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr);
|
||||
case NAT25_INSERT:
|
||||
{
|
||||
tmp = be32_to_cpu(iph->saddr);
|
||||
//some muticast with source IP is all zero, maybe other case is illegal
|
||||
//in class A, B, C, host address is all zero or all one is illegal
|
||||
if (iph->saddr == 0)
|
||||
return 0;
|
||||
DEBUG_INFO("NAT25: Insert IP, SA=%08x, DA=%08x\n", iph->saddr, iph->daddr);
|
||||
__nat25_generate_ipv4_network_addr(networkAddr, &tmp);
|
||||
//record source IP address and , source mac address into db
|
||||
__nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr);
|
||||
|
||||
__nat25_db_print(priv);
|
||||
}
|
||||
return 0;
|
||||
__nat25_db_print(priv);
|
||||
}
|
||||
return 0;
|
||||
|
||||
case NAT25_LOOKUP:
|
||||
{
|
||||
DEBUG_INFO("NAT25: Lookup IP, SA=%08x, DA=%08x\n", iph->saddr, iph->daddr);
|
||||
case NAT25_LOOKUP:
|
||||
{
|
||||
DEBUG_INFO("NAT25: Lookup IP, SA=%08x, DA=%08x\n", iph->saddr, iph->daddr);
|
||||
#ifdef SUPPORT_TX_MCAST2UNI
|
||||
if (priv->pshare->rf_ft_var.mc2u_disable ||
|
||||
((((OPMODE & (WIFI_STATION_STATE|WIFI_ASOC_STATE))
|
||||
== (WIFI_STATION_STATE|WIFI_ASOC_STATE)) &&
|
||||
!checkIPMcAndReplace(priv, skb, &iph->daddr)) ||
|
||||
(OPMODE & WIFI_ADHOC_STATE)))
|
||||
if (priv->pshare->rf_ft_var.mc2u_disable ||
|
||||
((((OPMODE & (WIFI_STATION_STATE|WIFI_ASOC_STATE)) ==
|
||||
(WIFI_STATION_STATE|WIFI_ASOC_STATE)) &&
|
||||
!checkIPMcAndReplace(priv, skb, &iph->daddr)) ||
|
||||
(OPMODE & WIFI_ADHOC_STATE)))
|
||||
#endif
|
||||
{
|
||||
__nat25_generate_ipv4_network_addr(networkAddr, &iph->daddr);
|
||||
{
|
||||
tmp = be32_to_cpu(iph->daddr);
|
||||
__nat25_generate_ipv4_network_addr(networkAddr, &tmp);
|
||||
|
||||
if (!__nat25_db_network_lookup_and_replace(priv, skb, networkAddr)) {
|
||||
if (*((unsigned char *)&iph->daddr + 3) == 0xff) {
|
||||
// L2 is unicast but L3 is broadcast, make L2 bacome broadcast
|
||||
DEBUG_INFO("NAT25: Set DA as boardcast\n");
|
||||
memset(skb->data, 0xff, ETH_ALEN);
|
||||
}
|
||||
else {
|
||||
// forward unknow IP packet to upper TCP/IP
|
||||
DEBUG_INFO("NAT25: Replace DA with BR's MAC\n");
|
||||
if ( (*(u32 *)priv->br_mac) == 0 && (*(u16 *)(priv->br_mac+4)) == 0 ) {
|
||||
printk("Re-init netdev_br_init() due to br_mac==0!\n");
|
||||
netdev_br_init(priv->pnetdev);
|
||||
}
|
||||
memcpy(skb->data, priv->br_mac, ETH_ALEN);
|
||||
if (!__nat25_db_network_lookup_and_replace(priv, skb, networkAddr)) {
|
||||
if (*((unsigned char *)&iph->daddr + 3) == 0xff) {
|
||||
// L2 is unicast but L3 is broadcast, make L2 bacome broadcast
|
||||
DEBUG_INFO("NAT25: Set DA as boardcast\n");
|
||||
memset(skb->data, 0xff, ETH_ALEN);
|
||||
} else {
|
||||
// forward unknow IP packet to upper TCP/IP
|
||||
DEBUG_INFO("NAT25: Replace DA with BR's MAC\n");
|
||||
if ( (*(u32 *)priv->br_mac) == 0 && (*(u16 *)(priv->br_mac+4)) == 0 ) {
|
||||
printk("Re-init netdev_br_init() due to br_mac==0!\n");
|
||||
netdev_br_init(priv->pnetdev);
|
||||
}
|
||||
memcpy(skb->data, priv->br_mac, ETH_ALEN);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
|
||||
default:
|
||||
return -1;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1598,7 +1599,7 @@ void dhcp_flag_bcast(struct adapter *priv, struct sk_buff *skb)
|
|||
|
||||
if(!priv->ethBrExtInfo.dhcp_bcst_disable)
|
||||
{
|
||||
unsigned short protocol = *((unsigned short *)(skb->data + 2 * ETH_ALEN));
|
||||
__be16 protocol = *((__be16 *)(skb->data + 2 * ETH_ALEN));
|
||||
|
||||
if(protocol == __constant_htons(ETH_P_IP)) // IP
|
||||
{
|
||||
|
|
|
@ -417,20 +417,20 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
|
|||
ie += sz;
|
||||
|
||||
//beacon interval : 2bytes
|
||||
*(u16*)ie = cpu_to_le16((u16)pdev_network->Configuration.BeaconPeriod);//BCN_INTERVAL;
|
||||
*(__le16*)ie = cpu_to_le16((u16)pdev_network->Configuration.BeaconPeriod);//BCN_INTERVAL;
|
||||
sz += 2;
|
||||
ie += 2;
|
||||
|
||||
//capability info
|
||||
*(u16*)ie = 0;
|
||||
|
||||
*(u16*)ie |= cpu_to_le16(cap_IBSS);
|
||||
*(__le16*)ie |= cpu_to_le16(cap_IBSS);
|
||||
|
||||
if(pregistrypriv->preamble == PREAMBLE_SHORT)
|
||||
*(u16*)ie |= cpu_to_le16(cap_ShortPremble);
|
||||
*(__le16*)ie |= cpu_to_le16(cap_ShortPremble);
|
||||
|
||||
if (pdev_network->Privacy)
|
||||
*(u16*)ie |= cpu_to_le16(cap_Privacy);
|
||||
*(__le16*)ie |= cpu_to_le16(cap_Privacy);
|
||||
|
||||
sz += 2;
|
||||
ie += 2;
|
||||
|
@ -501,6 +501,7 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
|
|||
{
|
||||
int len;
|
||||
u16 val16;
|
||||
__le16 le_tmp;
|
||||
unsigned char wpa_oui_type[] = {0x00, 0x50, 0xf2, 0x01};
|
||||
u8 *pbuf = pie;
|
||||
int limit_new = limit;
|
||||
|
@ -518,9 +519,9 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
|
|||
}
|
||||
|
||||
//check version...
|
||||
_rtw_memcpy((u8 *)&val16, (pbuf + 6), sizeof(val16));
|
||||
memcpy((u8 *)&le_tmp, (pbuf + 6), sizeof(val16));
|
||||
|
||||
val16 = le16_to_cpu(val16);
|
||||
val16 = le16_to_cpu(le_tmp);
|
||||
if (val16 != 0x0001)
|
||||
goto check_next_ie;
|
||||
|
||||
|
@ -1983,9 +1984,10 @@ void rtw_get_bcn_info(struct wlan_network *pnetwork)
|
|||
struct rtw_ieee80211_ht_cap *pht_cap = NULL;
|
||||
unsigned int len;
|
||||
unsigned char *p;
|
||||
__le16 le_tmp;
|
||||
|
||||
_rtw_memcpy((u8 *)&cap, rtw_get_capability_from_ie(pnetwork->network.IEs), 2);
|
||||
cap = le16_to_cpu(cap);
|
||||
memcpy((u8 *)&le_tmp, rtw_get_capability_from_ie(pnetwork->network.IEs), 2);
|
||||
cap = le16_to_cpu(le_tmp);
|
||||
if (cap & WLAN_CAPABILITY_PRIVACY) {
|
||||
bencrypt = 1;
|
||||
pnetwork->network.Privacy = 1;
|
||||
|
@ -2017,7 +2019,7 @@ void rtw_get_bcn_info(struct wlan_network *pnetwork)
|
|||
p = rtw_get_ie(pnetwork->network.IEs + _FIXED_IE_LENGTH_, _HT_CAPABILITY_IE_, &len, pnetwork->network.IELength - _FIXED_IE_LENGTH_);
|
||||
if(p && len>0) {
|
||||
pht_cap = (struct rtw_ieee80211_ht_cap *)(p + 2);
|
||||
pnetwork->BcnInfo.ht_cap_info = pht_cap->cap_info;
|
||||
pnetwork->BcnInfo.ht_cap_info = le16_to_cpu(pht_cap->cap_info);
|
||||
} else {
|
||||
pnetwork->BcnInfo.ht_cap_info = 0;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ u16 _rtw_read16(struct adapter *adapter, u32 addr)
|
|||
_read16 = pintfhdl->io_ops._read16;
|
||||
|
||||
r_val = _read16(pintfhdl, addr);
|
||||
return le16_to_cpu(r_val);
|
||||
return r_val;
|
||||
}
|
||||
|
||||
u32 _rtw_read32(struct adapter *adapter, u32 addr)
|
||||
|
@ -80,7 +80,7 @@ u32 _rtw_read32(struct adapter *adapter, u32 addr)
|
|||
_read32 = pintfhdl->io_ops._read32;
|
||||
|
||||
r_val = _read32(pintfhdl, addr);
|
||||
return le32_to_cpu(r_val);
|
||||
return r_val;
|
||||
}
|
||||
|
||||
int _rtw_write8(struct adapter *adapter, u32 addr, u8 val)
|
||||
|
@ -106,7 +106,6 @@ int _rtw_write16(struct adapter *adapter, u32 addr, u16 val)
|
|||
|
||||
_write16 = pintfhdl->io_ops._write16;
|
||||
|
||||
val = cpu_to_le16(val);
|
||||
ret = _write16(pintfhdl, addr, val);
|
||||
|
||||
return RTW_STATUS_CODE(ret);
|
||||
|
@ -120,7 +119,6 @@ int _rtw_write32(struct adapter *adapter, u32 addr, u32 val)
|
|||
int ret;
|
||||
_write32 = pintfhdl->io_ops._write32;
|
||||
|
||||
val = cpu_to_le32(val);
|
||||
ret = _write32(pintfhdl, addr, val);
|
||||
|
||||
return RTW_STATUS_CODE(ret);
|
||||
|
@ -161,7 +159,6 @@ int _rtw_write16_async(struct adapter *adapter, u32 addr, u16 val)
|
|||
int ret;
|
||||
|
||||
_write16_async = pintfhdl->io_ops._write16_async;
|
||||
val = cpu_to_le16(val);
|
||||
ret = _write16_async(pintfhdl, addr, val);
|
||||
|
||||
return RTW_STATUS_CODE(ret);
|
||||
|
@ -175,7 +172,6 @@ int _rtw_write32_async(struct adapter *adapter, u32 addr, u32 val)
|
|||
int ret;
|
||||
|
||||
_write32_async = pintfhdl->io_ops._write32_async;
|
||||
val = cpu_to_le32(val);
|
||||
ret = _write32_async(pintfhdl, addr, val);
|
||||
|
||||
return RTW_STATUS_CODE(ret);
|
||||
|
|
|
@ -1259,8 +1259,8 @@ u16 rtw_get_cur_max_rate(struct adapter *adapter)
|
|||
bw_40MHz = (pmlmeext->cur_bwmode && (HT_INFO_HT_PARAM_REC_TRANS_CHNL_WIDTH & pmlmeinfo->HT_info.infos[0])) ? 1:0;
|
||||
|
||||
//short_GI = (pht_capie->cap_info&(IEEE80211_HT_CAP_SGI_20|IEEE80211_HT_CAP_SGI_40)) ? 1:0;
|
||||
short_GI_20 = (pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info&IEEE80211_HT_CAP_SGI_20) ? 1:0;
|
||||
short_GI_40 = (pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info&IEEE80211_HT_CAP_SGI_40) ? 1:0;
|
||||
short_GI_20 = (le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info) & IEEE80211_HT_CAP_SGI_20) ? 1 : 0;
|
||||
short_GI_40 = (le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info) & IEEE80211_HT_CAP_SGI_40) ? 1 : 0;
|
||||
|
||||
rtw_hal_get_hwreg(adapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
|
||||
max_rate = rtw_mcs_rate(
|
||||
|
|
|
@ -186,7 +186,7 @@ int _rtw_IOL_append_WRF_cmd(struct xmit_frame *xmit_frame, u8 rf_path, u16 addr,
|
|||
|
||||
//RTW_PUT_LE16((u8*)&cmd.address, addr);
|
||||
//RTW_PUT_LE32((u8*)&cmd.value, (u32)value);
|
||||
cmd.address = (rf_path<<8) |((addr) &0xFF);
|
||||
cmd.address = cpu_to_le16((rf_path<<8) |((addr) &0xFF));
|
||||
cmd.data = cpu_to_le32(value);
|
||||
|
||||
if(mask!=0x000FFFFF)
|
||||
|
@ -226,7 +226,8 @@ int rtw_IOL_append_DELAY_MS_cmd(struct xmit_frame *xmit_frame, u16 ms)
|
|||
}
|
||||
int rtw_IOL_append_END_cmd(struct xmit_frame *xmit_frame)
|
||||
{
|
||||
struct ioreg_cfg cmd = {4,IOREG_CMD_END,0xFFFF, 0xFF,0x0};
|
||||
struct ioreg_cfg cmd = {4,IOREG_CMD_END, cpu_to_le16(0xFFFF),
|
||||
cpu_to_le32(0xFF), 0x0};
|
||||
return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, 4);
|
||||
|
||||
}
|
||||
|
|
133
core/rtw_p2p.c
133
core/rtw_p2p.c
|
@ -25,7 +25,7 @@
|
|||
|
||||
#ifdef CONFIG_P2P
|
||||
|
||||
int rtw_p2p_is_channel_list_ok( u8 desired_ch, u8* ch_list, u8 ch_cnt )
|
||||
static int rtw_p2p_is_channel_list_ok( u8 desired_ch, u8* ch_list, u8 ch_cnt )
|
||||
{
|
||||
int found = 0, i = 0;
|
||||
|
||||
|
@ -40,7 +40,7 @@ int rtw_p2p_is_channel_list_ok( u8 desired_ch, u8* ch_list, u8 ch_cnt )
|
|||
return( found );
|
||||
}
|
||||
|
||||
int is_any_client_associated(struct adapter *padapter)
|
||||
static int is_any_client_associated(struct adapter *padapter)
|
||||
{
|
||||
return padapter->stapriv.asoc_list_cnt ? true : false;
|
||||
}
|
||||
|
@ -152,12 +152,12 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da)
|
|||
struct pkt_attrib *pattrib;
|
||||
unsigned char *pframe;
|
||||
struct rtw_ieee80211_hdr *pwlanhdr;
|
||||
unsigned short *fctrl;
|
||||
__le16 *fctrl;
|
||||
struct adapter *padapter = pwdinfo->padapter;
|
||||
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
unsigned char category = RTW_WLAN_CATEGORY_P2P;//P2P action frame
|
||||
u32 p2poui = cpu_to_be32(P2POUI);
|
||||
__be32 p2poui = cpu_to_be32(P2POUI);
|
||||
u8 oui_subtype = P2P_GO_DISC_REQUEST;
|
||||
u8 dialogToken=0;
|
||||
|
||||
|
@ -211,14 +211,14 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
|
|||
struct pkt_attrib *pattrib;
|
||||
unsigned char *pframe;
|
||||
struct rtw_ieee80211_hdr *pwlanhdr;
|
||||
unsigned short *fctrl;
|
||||
__le16 *fctrl;
|
||||
struct adapter *padapter = pwdinfo->padapter;
|
||||
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
unsigned char category = RTW_WLAN_CATEGORY_PUBLIC;
|
||||
u8 action = P2P_PUB_ACTION_ACTION;
|
||||
u32 p2poui = cpu_to_be32(P2POUI);
|
||||
u8 oui_subtype = P2P_DEVDISC_RESP;
|
||||
u8 action = P2P_PUB_ACTION_ACTION;
|
||||
__be32 p2poui = cpu_to_be32(P2POUI);
|
||||
u8 oui_subtype = P2P_DEVDISC_RESP;
|
||||
u8 p2pie[8] = { 0x00 };
|
||||
u32 p2pielen = 0;
|
||||
|
||||
|
@ -285,7 +285,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8* raddr,
|
|||
unsigned char category = RTW_WLAN_CATEGORY_PUBLIC;
|
||||
u8 action = P2P_PUB_ACTION_ACTION;
|
||||
u8 dialogToken = frame_body[7]; // The Dialog Token of provisioning discovery request frame.
|
||||
u32 p2poui = cpu_to_be32(P2POUI);
|
||||
__be32 p2poui = cpu_to_be32(P2POUI);
|
||||
u8 oui_subtype = P2P_PROVISION_DISC_RESP;
|
||||
u8 wpsie[ 100 ] = { 0x00 };
|
||||
u8 wpsielen = 0;
|
||||
|
@ -297,7 +297,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8* raddr,
|
|||
struct pkt_attrib *pattrib;
|
||||
unsigned char *pframe;
|
||||
struct rtw_ieee80211_hdr *pwlanhdr;
|
||||
unsigned short *fctrl;
|
||||
__le16 *fctrl;
|
||||
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
@ -381,12 +381,12 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
|
|||
struct pkt_attrib *pattrib;
|
||||
unsigned char *pframe;
|
||||
struct rtw_ieee80211_hdr *pwlanhdr;
|
||||
unsigned short *fctrl;
|
||||
__le16 *fctrl;
|
||||
struct adapter *padapter = pwdinfo->padapter;
|
||||
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
unsigned char category = RTW_WLAN_CATEGORY_P2P;//P2P action frame
|
||||
u32 p2poui = cpu_to_be32(P2POUI);
|
||||
__be32 p2poui = cpu_to_be32(P2POUI);
|
||||
u8 oui_subtype = P2P_PRESENCE_RESPONSE;
|
||||
u8 p2pie[ MAX_P2P_IE_LEN] = { 0x00 };
|
||||
u8 noa_attr_content[32] = { 0x00 };
|
||||
|
@ -464,7 +464,7 @@ u32 build_beacon_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u8 p2pie[ MAX_P2P_IE_LEN] = { 0x00 };
|
||||
u16 capability=0;
|
||||
u32 len=0, p2pielen = 0;
|
||||
|
||||
__le16 le_tmp;
|
||||
|
||||
// P2P OUI
|
||||
p2pielen = 0;
|
||||
|
@ -492,28 +492,14 @@ u32 build_beacon_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_PROVISIONING_ING))
|
||||
capability |= (P2P_GRPCAP_GROUP_FORMATION<<8);
|
||||
|
||||
capability = cpu_to_le16(capability);
|
||||
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], P2P_ATTR_CAPABILITY, 2, (u8*)&capability);
|
||||
le_tmp = cpu_to_le16(capability);
|
||||
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], P2P_ATTR_CAPABILITY, 2, (u8*)&le_tmp);
|
||||
|
||||
// P2P Device ID ATTR
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], P2P_ATTR_DEVICE_ID, ETH_ALEN, pwdinfo->device_addr);
|
||||
|
||||
|
||||
// Notice of Absence ATTR
|
||||
// Type:
|
||||
// Length:
|
||||
// Value:
|
||||
|
||||
//go_add_noa_attr(pwdinfo);
|
||||
|
||||
|
||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
|
||||
|
||||
|
||||
return len;
|
||||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
|
@ -2369,6 +2355,8 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
u32 ies_len;
|
||||
u8 * p2p_ie;
|
||||
u32 p2p_ielen = 0;
|
||||
__le16 le_tmp;
|
||||
__be16 be_tmp;
|
||||
|
||||
if(!rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO))
|
||||
return P2P_STATUS_FAIL_REQUEST_UNABLE;
|
||||
|
@ -2401,10 +2389,10 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
while ( p2p_ie )
|
||||
{
|
||||
//Check P2P Capability ATTR
|
||||
if( rtw_get_p2p_attr_content( p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8*)&cap_attr, (uint*) &attr_contentlen) )
|
||||
if( rtw_get_p2p_attr_content( p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8*)&le_tmp, (uint*) &attr_contentlen) )
|
||||
{
|
||||
DBG_8192C( "[%s] Got P2P Capability Attr!!\n", __FUNCTION__ );
|
||||
cap_attr = le16_to_cpu(cap_attr);
|
||||
cap_attr = le16_to_cpu(le_tmp);
|
||||
psta->dev_cap = cap_attr&0xff;
|
||||
}
|
||||
|
||||
|
@ -2416,20 +2404,18 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
{
|
||||
DBG_8192C( "[%s] Got P2P DEVICE INFO Attr!!\n", __FUNCTION__ );
|
||||
pattr_content = pbuf = rtw_zmalloc(attr_contentlen);
|
||||
if(pattr_content)
|
||||
{
|
||||
if(pattr_content) {
|
||||
u8 num_of_secdev_type;
|
||||
u16 dev_name_len;
|
||||
|
||||
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_INFO , pattr_content, (uint*)&attr_contentlen);
|
||||
|
||||
_rtw_memcpy(psta->dev_addr, pattr_content, ETH_ALEN);//P2P Device Address
|
||||
|
||||
pattr_content += ETH_ALEN;
|
||||
|
||||
_rtw_memcpy(&psta->config_methods, pattr_content, 2);//Config Methods
|
||||
psta->config_methods = be16_to_cpu(psta->config_methods);
|
||||
memcpy(&be_tmp, pattr_content, 2);//Config Methods
|
||||
psta->config_methods = be16_to_cpu(be_tmp);
|
||||
|
||||
pattr_content += 2;
|
||||
|
||||
|
@ -2460,9 +2446,9 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
|
||||
//dev_name_len = attr_contentlen - ETH_ALEN - 2 - 8 - 1 - (num_of_secdev_type*8);
|
||||
psta->dev_name_len=0;
|
||||
if(WPS_ATTR_DEVICE_NAME == be16_to_cpu(*(u16*)pattr_content))
|
||||
if(WPS_ATTR_DEVICE_NAME == be16_to_cpu(*(__be16*)pattr_content))
|
||||
{
|
||||
dev_name_len = be16_to_cpu(*(u16*)(pattr_content+2));
|
||||
dev_name_len = be16_to_cpu(*(__be16*)(pattr_content+2));
|
||||
|
||||
psta->dev_name_len = (sizeof(psta->dev_name)<dev_name_len) ? sizeof(psta->dev_name):dev_name_len;
|
||||
|
||||
|
@ -2584,15 +2570,15 @@ u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
u8 *wpsie;
|
||||
uint wps_ielen = 0, attr_contentlen = 0;
|
||||
u16 uconfig_method = 0;
|
||||
|
||||
__be16 be_tmp;
|
||||
|
||||
frame_body = (pframe + sizeof(struct rtw_ieee80211_hdr_3addr));
|
||||
|
||||
if ( (wpsie=rtw_get_wps_ie( frame_body + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &wps_ielen)) )
|
||||
{
|
||||
if ( rtw_get_wps_attr_content( wpsie, wps_ielen, WPS_ATTR_CONF_METHOD , ( u8* ) &uconfig_method, &attr_contentlen) )
|
||||
if ( rtw_get_wps_attr_content( wpsie, wps_ielen, WPS_ATTR_CONF_METHOD , ( u8 *)&be_tmp, &attr_contentlen) )
|
||||
{
|
||||
uconfig_method = be16_to_cpu( uconfig_method );
|
||||
uconfig_method = be16_to_cpu(be_tmp);
|
||||
switch( uconfig_method )
|
||||
{
|
||||
case WPS_CM_DISPLYA:
|
||||
|
@ -2630,7 +2616,7 @@ u8 process_p2p_provdisc_resp(struct wifidirect_info *pwdinfo, u8 *pframe)
|
|||
return true;
|
||||
}
|
||||
|
||||
u8 rtw_p2p_get_peer_ch_list(struct wifidirect_info *pwdinfo, u8 *ch_content, u8 ch_cnt, u8 *peer_ch_list)
|
||||
static u8 rtw_p2p_get_peer_ch_list(struct wifidirect_info *pwdinfo, u8 *ch_content, u8 ch_cnt, u8 *peer_ch_list)
|
||||
{
|
||||
u8 i = 0, j = 0;
|
||||
u8 temp = 0;
|
||||
|
@ -2655,7 +2641,7 @@ u8 rtw_p2p_get_peer_ch_list(struct wifidirect_info *pwdinfo, u8 *ch_content, u8
|
|||
return ch_no;
|
||||
}
|
||||
|
||||
u8 rtw_p2p_check_peer_oper_ch(struct mlme_ext_priv *pmlmeext, u8 ch)
|
||||
static u8 rtw_p2p_check_peer_oper_ch(struct mlme_ext_priv *pmlmeext, u8 ch)
|
||||
{
|
||||
u8 i = 0;
|
||||
|
||||
|
@ -2670,7 +2656,7 @@ u8 rtw_p2p_check_peer_oper_ch(struct mlme_ext_priv *pmlmeext, u8 ch)
|
|||
return _FAIL;
|
||||
}
|
||||
|
||||
u8 rtw_p2p_ch_inclusion(struct mlme_ext_priv *pmlmeext, u8 *peer_ch_list, u8 peer_ch_num, u8 *ch_list_inclusioned)
|
||||
static u8 rtw_p2p_ch_inclusion(struct mlme_ext_priv *pmlmeext, u8 *peer_ch_list, u8 peer_ch_num, u8 *ch_list_inclusioned)
|
||||
{
|
||||
int i = 0, j = 0, temp = 0;
|
||||
u8 ch_no = 0;
|
||||
|
@ -2715,6 +2701,7 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
|
|||
struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
#endif
|
||||
__be16 be_tmp;
|
||||
|
||||
if ( (wpsie=rtw_get_wps_ie( pframe + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &wps_ielen)) )
|
||||
{
|
||||
|
@ -2723,8 +2710,8 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
|
|||
// We have to get peer_req_cm from here.
|
||||
if(_rtw_memcmp( pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "000", 3) )
|
||||
{
|
||||
rtw_get_wps_attr_content( wpsie, wps_ielen, WPS_ATTR_DEVICE_PWID, (u8*) &wps_devicepassword_id, &wps_devicepassword_id_len);
|
||||
wps_devicepassword_id = be16_to_cpu( wps_devicepassword_id );
|
||||
rtw_get_wps_attr_content( wpsie, wps_ielen, WPS_ATTR_DEVICE_PWID, (u8*) &be_tmp, &wps_devicepassword_id_len);
|
||||
wps_devicepassword_id = be16_to_cpu(be_tmp);
|
||||
|
||||
if ( wps_devicepassword_id == WPS_DPID_USER_SPEC )
|
||||
{
|
||||
|
@ -2778,13 +2765,14 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
|
|||
u8 ch_list_inclusioned[100] = { 0x00 };
|
||||
u8 ch_num_inclusioned = 0;
|
||||
u16 cap_attr;
|
||||
__le16 le_tmp;
|
||||
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_ING);
|
||||
|
||||
//Check P2P Capability ATTR
|
||||
if(rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8*)&cap_attr, (uint*)&attr_contentlen) )
|
||||
if(rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8*)&le_tmp, (uint*)&attr_contentlen) )
|
||||
{
|
||||
cap_attr = le16_to_cpu(cap_attr);
|
||||
cap_attr = le16_to_cpu(le_tmp);
|
||||
|
||||
#if defined(CONFIG_WFD) && defined(CONFIG_TDLS)
|
||||
if(!(cap_attr & P2P_GRPCAP_INTRABSS) )
|
||||
|
@ -2968,7 +2956,6 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram
|
|||
}
|
||||
else
|
||||
{
|
||||
|
||||
u8 attr_content = 0x00;
|
||||
u32 attr_contentlen = 0;
|
||||
u8 operatingch_info[5] = { 0x00 };
|
||||
|
@ -2980,14 +2967,15 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram
|
|||
u8 peer_ch_num = 0;
|
||||
u8 ch_list_inclusioned[100] = { 0x00 };
|
||||
u8 ch_num_inclusioned = 0;
|
||||
__le16 le_tmp;
|
||||
|
||||
while ( p2p_ie ) // Found the P2P IE.
|
||||
{
|
||||
|
||||
//Check P2P Capability ATTR
|
||||
if(rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8*)&cap_attr, (uint*)&attr_contentlen) )
|
||||
if(rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8*)&le_tmp, (uint*)&attr_contentlen) )
|
||||
{
|
||||
cap_attr = le16_to_cpu(cap_attr);
|
||||
cap_attr = le16_to_cpu(le_tmp);
|
||||
#ifdef CONFIG_TDLS
|
||||
if(!(cap_attr & P2P_GRPCAP_INTRABSS) )
|
||||
ptdlsinfo->ap_prohibited = true;
|
||||
|
@ -3303,7 +3291,7 @@ u8 process_p2p_presence_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
|||
return true;
|
||||
}
|
||||
|
||||
void find_phase_handler( struct adapter* padapter )
|
||||
static void find_phase_handler( struct adapter* padapter )
|
||||
{
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
@ -3311,7 +3299,6 @@ void find_phase_handler( struct adapter* padapter )
|
|||
_irqL irqL;
|
||||
u8 _status = 0;
|
||||
|
||||
;
|
||||
|
||||
_rtw_memset((unsigned char*)&ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||
_rtw_memcpy(ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN );
|
||||
|
@ -3324,17 +3311,15 @@ void find_phase_handler( struct adapter* padapter )
|
|||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
void p2p_concurrent_handler( struct adapter* padapter );
|
||||
|
||||
void restore_p2p_state_handler( struct adapter* padapter )
|
||||
static void restore_p2p_state_handler( struct adapter* padapter )
|
||||
{
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
||||
;
|
||||
|
||||
if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_FAIL))
|
||||
{
|
||||
|
@ -3369,49 +3354,39 @@ void restore_p2p_state_handler( struct adapter* padapter )
|
|||
set_channel_bwmode( padapter, pwdinfo->listen_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
#endif
|
||||
}
|
||||
;
|
||||
}
|
||||
|
||||
void pre_tx_invitereq_handler( struct adapter* padapter )
|
||||
static void pre_tx_invitereq_handler( struct adapter* padapter )
|
||||
{
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
u8 val8 = 1;
|
||||
;
|
||||
|
||||
set_channel_bwmode(padapter, pwdinfo->invitereq_info.peer_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8));
|
||||
issue_probereq_p2p(padapter, NULL);
|
||||
_set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT );
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
void pre_tx_provdisc_handler( struct adapter* padapter )
|
||||
static void pre_tx_provdisc_handler( struct adapter* padapter )
|
||||
{
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
u8 val8 = 1;
|
||||
;
|
||||
|
||||
set_channel_bwmode(padapter, pwdinfo->tx_prov_disc_info.peer_channel_num[0], HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8));
|
||||
issue_probereq_p2p(padapter, NULL);
|
||||
_set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT );
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
void pre_tx_negoreq_handler( struct adapter* padapter )
|
||||
static void pre_tx_negoreq_handler( struct adapter* padapter )
|
||||
{
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
u8 val8 = 1;
|
||||
;
|
||||
|
||||
set_channel_bwmode(padapter, pwdinfo->nego_req_info.peer_channel_num[0], HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8));
|
||||
issue_probereq_p2p(padapter, NULL);
|
||||
_set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT );
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
|
@ -3423,7 +3398,6 @@ void p2p_concurrent_handler( struct adapter* padapter )
|
|||
//struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
|
||||
//struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
u8 val8;
|
||||
;
|
||||
|
||||
if ( check_buddy_fwstate(padapter, _FW_LINKED ) )
|
||||
{
|
||||
|
@ -3530,7 +3504,6 @@ void p2p_concurrent_handler( struct adapter* padapter )
|
|||
set_channel_bwmode( padapter, pwdinfo->listen_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}
|
||||
|
||||
;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -3541,7 +3514,6 @@ static void ro_ch_handler(struct adapter *padapter)
|
|||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
u8 ch, bw, offset;
|
||||
;
|
||||
|
||||
if (rtw_get_ch_setting_union(padapter, &ch, &bw, &offset) != 0) {
|
||||
if (0)
|
||||
|
@ -3581,7 +3553,6 @@ static void ro_ch_handler(struct adapter *padapter)
|
|||
&pcfg80211_wdinfo->remain_on_ch_channel,
|
||||
pcfg80211_wdinfo->remain_on_ch_type, GFP_KERNEL);
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
static void ro_ch_timer_process (void *FunctionContext)
|
||||
|
@ -3926,7 +3897,7 @@ void rtw_append_wfd_ie(struct adapter *padapter, u8 *buf, u32* len)
|
|||
}
|
||||
#endif
|
||||
|
||||
u8 *dump_p2p_attr_ch_list(u8 *p2p_ie, uint p2p_ielen, u8 *buf, u32 buf_len)
|
||||
static u8 *dump_p2p_attr_ch_list(u8 *p2p_ie, uint p2p_ielen, u8 *buf, u32 buf_len)
|
||||
{
|
||||
uint attr_contentlen = 0;
|
||||
u8 *pattr = NULL;
|
||||
|
@ -3979,7 +3950,7 @@ u8 *dump_p2p_attr_ch_list(u8 *p2p_ie, uint p2p_ielen, u8 *buf, u32 buf_len)
|
|||
/*
|
||||
* return true if requester is GO, false if responder is GO
|
||||
*/
|
||||
bool rtw_p2p_nego_intent_compare(u8 req, u8 resp)
|
||||
static bool rtw_p2p_nego_intent_compare(u8 req, u8 resp)
|
||||
{
|
||||
if (req>>1 == resp >>1)
|
||||
return req&0x01 ? true : false;
|
||||
|
@ -4373,7 +4344,6 @@ void p2p_protocol_wk_hdl(struct adapter *padapter, int intCmdType)
|
|||
{
|
||||
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
||||
|
||||
;
|
||||
|
||||
switch(intCmdType)
|
||||
{
|
||||
|
@ -4454,7 +4424,6 @@ void p2p_protocol_wk_hdl(struct adapter *padapter, int intCmdType)
|
|||
|
||||
}
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_P2P_PS
|
||||
|
@ -4471,7 +4440,6 @@ void process_p2p_ps_ie(struct adapter *padapter, u8 *IEs, u32 IELength)
|
|||
u8 find_p2p = false, find_p2p_ps = false;
|
||||
u8 noa_offset, noa_num, noa_index;
|
||||
|
||||
;
|
||||
|
||||
if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
{
|
||||
|
@ -4566,7 +4534,6 @@ void process_p2p_ps_ie(struct adapter *padapter, u8 *IEs, u32 IELength)
|
|||
}
|
||||
}
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state)
|
||||
|
@ -4574,7 +4541,6 @@ void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state)
|
|||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
||||
|
||||
;
|
||||
|
||||
// Pre action for p2p state
|
||||
switch(p2p_ps_state)
|
||||
|
@ -4626,7 +4592,6 @@ void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state)
|
|||
break;
|
||||
}
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue)
|
||||
|
@ -4637,7 +4602,6 @@ u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue)
|
|||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
;
|
||||
|
||||
if ( rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
|
@ -4670,15 +4634,12 @@ u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue)
|
|||
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
||||
|
||||
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
p2p_ps_wk_hdl(padapter, p2p_ps_state);
|
||||
}
|
||||
|
||||
exit:
|
||||
|
||||
;
|
||||
|
||||
return res;
|
||||
|
||||
|
|
|
@ -693,7 +693,6 @@ union recv_frame * decryptor(struct adapter *padapter,union recv_frame *precv_fr
|
|||
|
||||
}
|
||||
//###set the security information in the recv_frame
|
||||
union recv_frame * portctrl(struct adapter *adapter,union recv_frame * precv_frame);
|
||||
union recv_frame * portctrl(struct adapter *adapter,union recv_frame * precv_frame)
|
||||
{
|
||||
u8 *psta_addr, *ptr;
|
||||
|
@ -705,7 +704,7 @@ union recv_frame * portctrl(struct adapter *adapter,union recv_frame * precv_fra
|
|||
u16 ether_type=0;
|
||||
u16 eapol_type = 0x888e;//for Funia BD's WPA issue
|
||||
struct rx_pkt_attrib *pattrib;
|
||||
|
||||
__be16 be_tmp;
|
||||
;
|
||||
|
||||
pstapriv = &adapter->stapriv;
|
||||
|
@ -735,8 +734,8 @@ union recv_frame * portctrl(struct adapter *adapter,union recv_frame * precv_fra
|
|||
|
||||
//get ether_type
|
||||
ptr=ptr+pfhdr->attrib.hdrlen+pfhdr->attrib.iv_len+LLC_HEADER_SIZE;
|
||||
_rtw_memcpy(ðer_type,ptr, 2);
|
||||
ether_type= ntohs((unsigned short )ether_type);
|
||||
memcpy(&be_tmp, ptr, 2);
|
||||
ether_type= ntohs(be_tmp);
|
||||
|
||||
if (ether_type == eapol_type) {
|
||||
prtnframe=precv_frame;
|
||||
|
@ -2261,7 +2260,7 @@ sint wlanhdr_to_ethhdr ( union recv_frame *precvframe)
|
|||
u8 bsnaphdr;
|
||||
u8 *psnap_type;
|
||||
struct ieee80211_snap_hdr *psnap;
|
||||
|
||||
__be16 be_tmp;
|
||||
sint ret=_SUCCESS;
|
||||
struct adapter *adapter =precvframe->u.hdr.adapter;
|
||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
|
@ -2297,8 +2296,8 @@ sint wlanhdr_to_ethhdr ( union recv_frame *precvframe)
|
|||
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("\n===pattrib->hdrlen: %x, pattrib->iv_len:%x ===\n\n", pattrib->hdrlen, pattrib->iv_len));
|
||||
|
||||
_rtw_memcpy(ð_type, ptr+rmv_len, 2);
|
||||
eth_type= ntohs((unsigned short )eth_type); //pattrib->ether_type
|
||||
memcpy(&be_tmp, ptr+rmv_len, 2);
|
||||
eth_type= ntohs(be_tmp); //pattrib->ether_type
|
||||
pattrib->eth_type = eth_type;
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == true))
|
||||
|
@ -2310,7 +2309,7 @@ sint wlanhdr_to_ethhdr ( union recv_frame *precvframe)
|
|||
eth_type = 0x8712;
|
||||
// append rx status for mp test packets
|
||||
ptr = recvframe_pull(precvframe, (rmv_len-sizeof(struct ethhdr)+2)-24);
|
||||
_rtw_memcpy(ptr, get_rxmem(precvframe), 24);
|
||||
memcpy(ptr, get_rxmem(precvframe), 24);
|
||||
ptr+=24;
|
||||
}
|
||||
else {
|
||||
|
@ -2321,8 +2320,8 @@ sint wlanhdr_to_ethhdr ( union recv_frame *precvframe)
|
|||
_rtw_memcpy(ptr+ETH_ALEN, pattrib->src, ETH_ALEN);
|
||||
|
||||
if(!bsnaphdr) {
|
||||
len = htons(len);
|
||||
_rtw_memcpy(ptr+12, &len, 2);
|
||||
be_tmp = htons(len);
|
||||
_rtw_memcpy(ptr+12, &be_tmp, 2);
|
||||
}
|
||||
|
||||
;
|
||||
|
@ -2799,12 +2798,12 @@ int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe)
|
|||
_rtw_memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->src, ETH_ALEN);
|
||||
_rtw_memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->dst, ETH_ALEN);
|
||||
} else {
|
||||
u16 len;
|
||||
__be16 len;
|
||||
/* Leave Ethernet header part of hdr and full payload */
|
||||
len = htons(sub_skb->len);
|
||||
_rtw_memcpy(skb_push(sub_skb, 2), &len, 2);
|
||||
_rtw_memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->src, ETH_ALEN);
|
||||
_rtw_memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->dst, ETH_ALEN);
|
||||
memcpy(skb_push(sub_skb, 2), &len, 2);
|
||||
memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->src, ETH_ALEN);
|
||||
memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->dst, ETH_ALEN);
|
||||
}
|
||||
|
||||
/* Indicat the packets to upper layer */
|
||||
|
|
|
@ -139,7 +139,7 @@ exit:
|
|||
;
|
||||
}
|
||||
|
||||
static u32 getcrc32(u8 *buf, sint len)
|
||||
static __le32 getcrc32(u8 *buf, sint len)
|
||||
{
|
||||
u8 *p;
|
||||
u32 crc;
|
||||
|
@ -153,7 +153,7 @@ static u32 getcrc32(u8 *buf, sint len)
|
|||
crc = crc32_table[ (crc ^ *p) & 0xff] ^ (crc >> 8);
|
||||
}
|
||||
;
|
||||
return ~crc; /* transmit complement, per CRC-32 spec */
|
||||
return cpu_to_le32(~crc); /* transmit complement, per CRC-32 spec */
|
||||
}
|
||||
|
||||
|
||||
|
@ -212,7 +212,7 @@ void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
|||
|
||||
length=pattrib->last_txcmdsz-pattrib->hdrlen-pattrib->iv_len- pattrib->icv_len;
|
||||
|
||||
*((u32 *)crc)=cpu_to_le32(getcrc32(payload,length));
|
||||
*((__le32 *)crc)=getcrc32(payload,length);
|
||||
|
||||
arcfour_init(&mycontext, wepkey,3+keylength);
|
||||
arcfour_encrypt(&mycontext, payload, payload, length);
|
||||
|
@ -222,7 +222,7 @@ void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
|||
else
|
||||
{
|
||||
length=pxmitpriv->frag_len-pattrib->hdrlen-pattrib->iv_len-pattrib->icv_len ;
|
||||
*((u32 *)crc)=cpu_to_le32(getcrc32(payload,length));
|
||||
*((__le32 *)crc)=getcrc32(payload,length);
|
||||
arcfour_init(&mycontext, wepkey,3+keylength);
|
||||
arcfour_encrypt(&mycontext, payload, payload, length);
|
||||
arcfour_encrypt(&mycontext, payload+length, crc, 4);
|
||||
|
@ -275,7 +275,7 @@ void rtw_wep_decrypt(struct adapter *padapter, u8 *precvframe)
|
|||
arcfour_encrypt(&mycontext, payload, payload, length);
|
||||
|
||||
//calculate icv and compare the icv
|
||||
*((u32 *)crc)=le32_to_cpu(getcrc32(payload,length-4));
|
||||
*((__le32 *)crc)=getcrc32(payload,length-4);
|
||||
|
||||
if(crc[3]!=payload[length-1] || crc[2]!=payload[length-2] || crc[1]!=payload[length-3] || crc[0]!=payload[length-4])
|
||||
{
|
||||
|
@ -734,7 +734,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
|||
if((curfragnum+1)==pattrib->nr_frags){ //4 the last fragment
|
||||
length=pattrib->last_txcmdsz-pattrib->hdrlen-pattrib->iv_len- pattrib->icv_len;
|
||||
RT_TRACE(_module_rtl871x_security_c_,_drv_info_,("pattrib->iv_len =%x, pattrib->icv_len =%x\n", pattrib->iv_len,pattrib->icv_len));
|
||||
*((u32 *)crc)=cpu_to_le32(getcrc32(payload,length));/* modified by Amy*/
|
||||
*((__le32 *)crc)=getcrc32(payload,length);/* modified by Amy*/
|
||||
|
||||
arcfour_init(&mycontext, rc4key,16);
|
||||
arcfour_encrypt(&mycontext, payload, payload, length);
|
||||
|
@ -743,7 +743,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
|||
}
|
||||
else{
|
||||
length=pxmitpriv->frag_len-pattrib->hdrlen-pattrib->iv_len-pattrib->icv_len ;
|
||||
*((u32 *)crc)=cpu_to_le32(getcrc32(payload,length));/* modified by Amy*/
|
||||
*((__le32 *)crc)=getcrc32(payload,length);/* modified by Amy*/
|
||||
arcfour_init(&mycontext,rc4key,16);
|
||||
arcfour_encrypt(&mycontext, payload, payload, length);
|
||||
arcfour_encrypt(&mycontext, payload+length, crc, 4);
|
||||
|
@ -866,7 +866,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe)
|
|||
arcfour_init(&mycontext, rc4key,16);
|
||||
arcfour_encrypt(&mycontext, payload, payload, length);
|
||||
|
||||
*((u32 *)crc)=le32_to_cpu(getcrc32(payload,length-4));
|
||||
*((__le32 *)crc)=getcrc32(payload,length-4);
|
||||
|
||||
if(crc[3]!=payload[length-1] || crc[2]!=payload[length-2] || crc[1]!=payload[length-3] || crc[0]!=payload[length-4])
|
||||
{
|
||||
|
@ -2896,7 +2896,7 @@ static int omac1_aes_128_vector(u8 *key, size_t num_elem,
|
|||
* OMAC1 was standardized with the name CMAC by NIST in a Special Publication
|
||||
* (SP) 800-38B.
|
||||
*/ //modify for CONFIG_IEEE80211W
|
||||
int omac1_aes_128(u8 *key, u8 *data, size_t data_len, u8 *mac)
|
||||
static int omac1_aes_128(u8 *key, u8 *data, size_t data_len, u8 *mac)
|
||||
{
|
||||
return omac1_aes_128_vector(key, 1, &data, &data_len, mac);
|
||||
}
|
||||
|
|
|
@ -1150,8 +1150,8 @@ void HT_caps_handler(struct adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
|
|||
// Commented by Albert 2010/07/12
|
||||
// Have to handle the endian issue after copying.
|
||||
// HT_ext_caps didn't be used yet.
|
||||
pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info = le16_to_cpu( pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info );
|
||||
pmlmeinfo->HT_caps.u.HT_cap_element.HT_ext_caps = le16_to_cpu( pmlmeinfo->HT_caps.u.HT_cap_element.HT_ext_caps );
|
||||
pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info = pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info;
|
||||
pmlmeinfo->HT_caps.u.HT_cap_element.HT_ext_caps = pmlmeinfo->HT_caps.u.HT_cap_element.HT_ext_caps;
|
||||
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
|
||||
|
||||
|
@ -1378,7 +1378,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
|
|||
p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _HT_CAPABILITY_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_);
|
||||
if(p && len>0) {
|
||||
pht_cap = (struct rtw_ieee80211_ht_cap *)(p + 2);
|
||||
ht_cap_info = pht_cap->cap_info;
|
||||
ht_cap_info = le16_to_cpu(pht_cap->cap_info);
|
||||
} else {
|
||||
ht_cap_info = 0;
|
||||
}
|
||||
|
@ -1845,14 +1845,10 @@ int support_short_GI(struct adapter *padapter, struct HT_caps_element *pHT_caps)
|
|||
|
||||
bit_offset = (pmlmeext->cur_bwmode & HT_CHANNEL_WIDTH_40)? 6: 5;
|
||||
|
||||
if (pHT_caps->u.HT_cap_element.HT_caps_info & (0x1 << bit_offset))
|
||||
{
|
||||
if (le16_to_cpu(pHT_caps->u.HT_cap_element.HT_caps_info) & (0x1 << bit_offset))
|
||||
return _SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
return _FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned char get_highest_rate_idx(u32 mask)
|
||||
|
@ -2202,10 +2198,6 @@ void update_wireless_mode(struct adapter *padapter)
|
|||
update_mgnt_tx_rate(padapter, IEEE80211_OFDM_RATE_6MB);
|
||||
}
|
||||
|
||||
void fire_write_MAC_cmd(struct adapter *padapter, unsigned int addr, unsigned int value)
|
||||
{
|
||||
}
|
||||
|
||||
void update_bmc_sta_support_rate(struct adapter *padapter, u32 mac_id)
|
||||
{
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
|
@ -2288,10 +2280,10 @@ void process_addba_req(struct adapter *padapter, u8 *paddba_req, u8 *addr)
|
|||
void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len)
|
||||
{
|
||||
u8* pIE;
|
||||
u32 *pbuf;
|
||||
__le32 *pbuf;
|
||||
|
||||
pIE = pframe + sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
pbuf = (u32*)pIE;
|
||||
pbuf = (__le32 *)pIE;
|
||||
|
||||
pmlmeext->TSFValue = le32_to_cpu(*(pbuf+1));
|
||||
|
||||
|
@ -2302,7 +2294,7 @@ void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len)
|
|||
|
||||
void correct_TSF(struct adapter *padapter, struct mlme_ext_priv *pmlmeext)
|
||||
{
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_CORRECT_TSF, 0);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_CORRECT_TSF, NULL);
|
||||
}
|
||||
|
||||
void beacon_timing_control(struct adapter *padapter)
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <circ_buf.h>
|
||||
#include <ip.h>
|
||||
#include <usb_ops.h>
|
||||
#include "rtw_br_ext.h"
|
||||
|
||||
static u8 P802_1H_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0xf8 };
|
||||
static u8 RFC1042_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0x00 };
|
||||
|
@ -1126,7 +1127,7 @@ s32 rtw_make_wlanhdr (struct adapter *padapter , u8 *hdr, struct pkt_attrib *pat
|
|||
#endif //CONFIG_TDLS
|
||||
|
||||
sint res = _SUCCESS;
|
||||
u16 *fctrl = &pwlanhdr->frame_ctl;
|
||||
__le16 *fctrl = &pwlanhdr->frame_ctl;
|
||||
|
||||
struct sta_info *psta;
|
||||
|
||||
|
@ -2167,10 +2168,7 @@ s32 rtw_put_snap(u8 *data, u16 h_proto)
|
|||
snap->oui[1] = oui[1];
|
||||
snap->oui[2] = oui[2];
|
||||
|
||||
*(u16 *)(data + SNAP_SIZE) = htons(h_proto);
|
||||
|
||||
;
|
||||
|
||||
*(__be16 *)(data + SNAP_SIZE) = htons(h_proto);
|
||||
return SNAP_SIZE + sizeof(u16);
|
||||
}
|
||||
|
||||
|
@ -2430,7 +2428,7 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
|||
return _SUCCESS;
|
||||
}
|
||||
|
||||
void rtw_init_xmitframe(struct xmit_frame *pxframe)
|
||||
static void rtw_init_xmitframe(struct xmit_frame *pxframe)
|
||||
{
|
||||
if (pxframe != NULL)//default value setting
|
||||
{
|
||||
|
@ -2980,7 +2978,7 @@ void rtw_init_hwxmits(struct hw_xmit *phwxmit, sint entry)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_BR_EXT
|
||||
int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
|
||||
static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
|
||||
{
|
||||
struct sk_buff *skb = *pskb;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
|
@ -3005,8 +3003,8 @@ int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
|
|||
if ( !(skb->data[0] & 1) &&
|
||||
br_port &&
|
||||
memcmp(skb->data+MACADDRLEN, padapter->br_mac, MACADDRLEN) &&
|
||||
*((unsigned short *)(skb->data+MACADDRLEN*2)) != __constant_htons(ETH_P_8021Q) &&
|
||||
*((unsigned short *)(skb->data+MACADDRLEN*2)) == __constant_htons(ETH_P_IP) &&
|
||||
*((__be16 *)(skb->data+MACADDRLEN*2)) != __constant_htons(ETH_P_8021Q) &&
|
||||
*((__be16 *)(skb->data+MACADDRLEN*2)) == __constant_htons(ETH_P_IP) &&
|
||||
!memcmp(padapter->scdb_mac, skb->data+MACADDRLEN, MACADDRLEN) && padapter->scdb_entry) {
|
||||
memcpy(skb->data+MACADDRLEN, GET_MY_HWADDR(padapter), MACADDRLEN);
|
||||
padapter->scdb_entry->ageing_timer = jiffies;
|
||||
|
@ -3018,7 +3016,7 @@ int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
|
|||
// if (priv->dev->br_port &&
|
||||
// !memcmp(skb->data+MACADDRLEN, priv->br_mac, MACADDRLEN)) {
|
||||
#if 1
|
||||
if (*((unsigned short *)(skb->data+MACADDRLEN*2)) == __constant_htons(ETH_P_8021Q)) {
|
||||
if (*((__be16 *)(skb->data+MACADDRLEN*2)) == __constant_htons(ETH_P_8021Q)) {
|
||||
is_vlan_tag = 1;
|
||||
vlan_hdr = *((unsigned short *)(skb->data+MACADDRLEN*2+2));
|
||||
for (i=0; i<6; i++)
|
||||
|
@ -3027,13 +3025,11 @@ int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
|
|||
}
|
||||
//if SA == br_mac && skb== IP => copy SIP to br_ip ?? why
|
||||
if (!memcmp(skb->data+MACADDRLEN, padapter->br_mac, MACADDRLEN) &&
|
||||
(*((unsigned short *)(skb->data+MACADDRLEN*2)) == __constant_htons(ETH_P_IP)))
|
||||
(*((__be16 *)(skb->data+MACADDRLEN*2)) == __constant_htons(ETH_P_IP)))
|
||||
memcpy(padapter->br_ip, skb->data+WLAN_ETHHDR_LEN+12, 4);
|
||||
|
||||
if (*((unsigned short *)(skb->data+MACADDRLEN*2)) == __constant_htons(ETH_P_IP)) {
|
||||
if (*((__be16 *)(skb->data+MACADDRLEN*2)) == __constant_htons(ETH_P_IP)) {
|
||||
if (memcmp(padapter->scdb_mac, skb->data+MACADDRLEN, MACADDRLEN)) {
|
||||
void *scdb_findEntry(struct adapter *priv, unsigned char *macAddr, unsigned char *ipAddr);
|
||||
|
||||
if ((padapter->scdb_entry = (struct nat25_network_db_entry *)scdb_findEntry(padapter,
|
||||
skb->data+MACADDRLEN, skb->data+WLAN_ETHHDR_LEN+12)) != NULL) {
|
||||
memcpy(padapter->scdb_mac, skb->data+MACADDRLEN, MACADDRLEN);
|
||||
|
@ -3065,7 +3061,7 @@ int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
|
|||
skb_push(skb, 4);
|
||||
for (i=0; i<6; i++)
|
||||
*((unsigned short *)(skb->data+i*2)) = *((unsigned short *)(skb->data+4+i*2));
|
||||
*((unsigned short *)(skb->data+MACADDRLEN*2)) = __constant_htons(ETH_P_8021Q);
|
||||
*((__be16 *)(skb->data+MACADDRLEN*2)) = __constant_htons(ETH_P_8021Q);
|
||||
*((unsigned short *)(skb->data+MACADDRLEN*2+2)) = vlan_hdr;
|
||||
}
|
||||
|
||||
|
@ -3126,7 +3122,7 @@ int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
|
|||
skb_push(skb, 4);
|
||||
for (i=0; i<6; i++)
|
||||
*((unsigned short *)(skb->data+i*2)) = *((unsigned short *)(skb->data+4+i*2));
|
||||
*((unsigned short *)(skb->data+MACADDRLEN*2)) = __constant_htons(ETH_P_8021Q);
|
||||
*((__be16 *)(skb->data+MACADDRLEN*2)) = __constant_htons(ETH_P_8021Q);
|
||||
*((unsigned short *)(skb->data+MACADDRLEN*2+2)) = vlan_hdr;
|
||||
}
|
||||
}
|
||||
|
@ -4090,7 +4086,7 @@ int rtw_sctx_wait(struct submit_ctx *sctx)
|
|||
return ret;
|
||||
}
|
||||
|
||||
bool rtw_sctx_chk_waring_status(int status)
|
||||
static bool rtw_sctx_chk_waring_status(int status)
|
||||
{
|
||||
switch(status) {
|
||||
case RTW_SCTX_DONE_UNKNOWN:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue