mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-06-23 08:34:20 +00:00
rtl8188eu: Change _FALSE and _TRUE to false and true
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
3d0ee1321a
commit
9cef34aa09
69 changed files with 2493 additions and 3604 deletions
|
@ -360,7 +360,7 @@ static int rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_network *pnet
|
|||
notify_ielen = pnetwork->network.IELength-_FIXED_IE_LENGTH_;
|
||||
|
||||
//We've set wiphy's signal_type as CFG80211_SIGNAL_TYPE_MBM: signal strength in mBm (100*dBm)
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED)== _TRUE &&
|
||||
if ( check_fwstate(pmlmepriv, _FW_LINKED)== true &&
|
||||
is_same_network(&pmlmepriv->cur_network.network, &pnetwork->network)) {
|
||||
notify_signal = 100*translate_percentage_to_dbm(padapter->recvpriv.signal_strength);//dbm
|
||||
} else {
|
||||
|
@ -485,7 +485,7 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter)
|
|||
return;
|
||||
}
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||
return;
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
|
@ -558,7 +558,7 @@ void rtw_cfg80211_indicate_disconnect(_adapter *padapter)
|
|||
return;
|
||||
}
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||
return;
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
|
@ -848,7 +848,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
|||
_rtw_memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8);
|
||||
_rtw_memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8);
|
||||
|
||||
psecuritypriv->busetkipkey = _TRUE;
|
||||
psecuritypriv->busetkipkey = true;
|
||||
|
||||
}
|
||||
else if (strcmp(param->u.crypt.alg, "CCMP") == 0)
|
||||
|
@ -868,7 +868,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
|||
|
||||
psecuritypriv->dot118021XGrpKeyid = param->u.crypt.idx;
|
||||
|
||||
psecuritypriv->binstallGrpkey = _TRUE;
|
||||
psecuritypriv->binstallGrpkey = true;
|
||||
|
||||
psecuritypriv->dot11PrivacyAlgrthm = psecuritypriv->dot118021XGrpPrivacy;//!!!
|
||||
|
||||
|
@ -877,7 +877,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
|||
pbcmc_sta=rtw_get_bcmc_stainfo(padapter);
|
||||
if (pbcmc_sta)
|
||||
{
|
||||
pbcmc_sta->ieee8021x_blocked = _FALSE;
|
||||
pbcmc_sta->ieee8021x_blocked = false;
|
||||
pbcmc_sta->dot118021XPrivacy= psecuritypriv->dot118021XGrpPrivacy;//rx will use bmc_sta's dot118021XPrivacy
|
||||
}
|
||||
|
||||
|
@ -916,7 +916,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
|||
_rtw_memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8);
|
||||
_rtw_memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8);
|
||||
|
||||
psecuritypriv->busetkipkey = _TRUE;
|
||||
psecuritypriv->busetkipkey = true;
|
||||
|
||||
}
|
||||
else if (strcmp(param->u.crypt.alg, "CCMP") == 0)
|
||||
|
@ -935,9 +935,9 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
|||
|
||||
set_pairwise_key(padapter, psta);
|
||||
|
||||
psta->ieee8021x_blocked = _FALSE;
|
||||
psta->ieee8021x_blocked = false;
|
||||
|
||||
psta->bpairwise_key_installed = _TRUE;
|
||||
psta->bpairwise_key_installed = true;
|
||||
|
||||
}
|
||||
else//group key???
|
||||
|
@ -963,7 +963,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
|||
_rtw_memcpy(psecuritypriv->dot118021XGrptxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[16]), 8);
|
||||
_rtw_memcpy(psecuritypriv->dot118021XGrprxmickey[param->u.crypt.idx].skey, &(param->u.crypt.key[24]), 8);
|
||||
|
||||
psecuritypriv->busetkipkey = _TRUE;
|
||||
psecuritypriv->busetkipkey = true;
|
||||
|
||||
}
|
||||
else if (strcmp(param->u.crypt.alg, "CCMP") == 0)
|
||||
|
@ -979,7 +979,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
|||
|
||||
psecuritypriv->dot118021XGrpKeyid = param->u.crypt.idx;
|
||||
|
||||
psecuritypriv->binstallGrpkey = _TRUE;
|
||||
psecuritypriv->binstallGrpkey = true;
|
||||
|
||||
psecuritypriv->dot11PrivacyAlgrthm = psecuritypriv->dot118021XGrpPrivacy;//!!!
|
||||
|
||||
|
@ -988,7 +988,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
|||
pbcmc_sta=rtw_get_bcmc_stainfo(padapter);
|
||||
if (pbcmc_sta)
|
||||
{
|
||||
pbcmc_sta->ieee8021x_blocked = _FALSE;
|
||||
pbcmc_sta->ieee8021x_blocked = false;
|
||||
pbcmc_sta->dot118021XPrivacy= psecuritypriv->dot118021XGrpPrivacy;//rx will use bmc_sta's dot118021XPrivacy
|
||||
}
|
||||
|
||||
|
@ -1097,7 +1097,7 @@ _func_enter_;
|
|||
|
||||
//DBG_88E("%s, : dot11AuthAlgrthm == dot11AuthAlgrthm_8021X\n", __func__);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_MP_STATE) == _TRUE) //sta mode
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_MP_STATE) == true) //sta mode
|
||||
{
|
||||
psta = rtw_get_stainfo(pstapriv, get_bssid(pmlmepriv));
|
||||
if (psta == NULL) {
|
||||
|
@ -1108,7 +1108,7 @@ _func_enter_;
|
|||
{
|
||||
//Jeff: don't disable ieee8021x_blocked while clearing key
|
||||
if (strcmp(param->u.crypt.alg, "none") != 0)
|
||||
psta->ieee8021x_blocked = _FALSE;
|
||||
psta->ieee8021x_blocked = false;
|
||||
|
||||
|
||||
if ((padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption2Enabled)||
|
||||
|
@ -1130,21 +1130,21 @@ _func_enter_;
|
|||
_rtw_memcpy(psta->dot11tkiptxmickey.skey, &(param->u.crypt.key[16]), 8);
|
||||
_rtw_memcpy(psta->dot11tkiprxmickey.skey, &(param->u.crypt.key[24]), 8);
|
||||
|
||||
padapter->securitypriv.busetkipkey=_FALSE;
|
||||
padapter->securitypriv.busetkipkey=false;
|
||||
//_set_timer(&padapter->securitypriv.tkip_timer, 50);
|
||||
}
|
||||
|
||||
//DEBUG_ERR((" param->u.crypt.key_len=%d\n",param->u.crypt.key_len));
|
||||
DBG_88E(" ~~~~set sta key:unicastkey\n");
|
||||
|
||||
rtw_setstakey_cmd(padapter, (unsigned char *)psta, _TRUE);
|
||||
rtw_setstakey_cmd(padapter, (unsigned char *)psta, true);
|
||||
}
|
||||
else//group key
|
||||
{
|
||||
_rtw_memcpy(padapter->securitypriv.dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key,(param->u.crypt.key_len>16 ?16:param->u.crypt.key_len));
|
||||
_rtw_memcpy(padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey,&(param->u.crypt.key[16]),8);
|
||||
_rtw_memcpy(padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey,&(param->u.crypt.key[24]),8);
|
||||
padapter->securitypriv.binstallGrpkey = _TRUE;
|
||||
padapter->securitypriv.binstallGrpkey = true;
|
||||
//DEBUG_ERR((" param->u.crypt.key_len=%d\n", param->u.crypt.key_len));
|
||||
DBG_88E(" ~~~~set sta key:groupkey\n");
|
||||
|
||||
|
@ -1170,7 +1170,7 @@ _func_enter_;
|
|||
{
|
||||
//Jeff: don't disable ieee8021x_blocked while clearing key
|
||||
if (strcmp(param->u.crypt.alg, "none") != 0)
|
||||
pbcmc_sta->ieee8021x_blocked = _FALSE;
|
||||
pbcmc_sta->ieee8021x_blocked = false;
|
||||
|
||||
if ((padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption2Enabled)||
|
||||
(padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption3Enabled))
|
||||
|
@ -1358,11 +1358,11 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
|
|||
_rtw_memcpy(param->u.crypt.key, params->key, params->key_len);
|
||||
}
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
|
||||
{
|
||||
ret = rtw_cfg80211_set_encryption(ndev, param, param_len);
|
||||
}
|
||||
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||
{
|
||||
#ifdef CONFIG_AP_MODE
|
||||
if (mac_addr)
|
||||
|
@ -1487,7 +1487,7 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy,
|
|||
{
|
||||
struct wlan_network *cur_network = &(pmlmepriv->cur_network);
|
||||
|
||||
if (_rtw_memcmp(mac, cur_network->network.MacAddress, ETH_ALEN) == _FALSE)
|
||||
if (_rtw_memcmp(mac, cur_network->network.MacAddress, ETH_ALEN) == false)
|
||||
{
|
||||
DBG_88E("%s, mismatch bssid="MAC_FMT"\n", __func__, MAC_ARG(cur_network->network.MacAddress));
|
||||
return -ENOENT;
|
||||
|
@ -1559,7 +1559,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
|||
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
||||
#endif
|
||||
int ret = 0;
|
||||
u8 change = _FALSE;
|
||||
u8 change = false;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (!padapter->isprimary)
|
||||
|
@ -1591,7 +1591,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
|||
|
||||
if (old_type != type)
|
||||
{
|
||||
change = _TRUE;
|
||||
change = true;
|
||||
pmlmeext->action_public_rxseq = 0xffff;
|
||||
pmlmeext->action_public_dialog_token = 0xff;
|
||||
}
|
||||
|
@ -1639,7 +1639,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
|||
|
||||
rtw_wdev->iftype = type;
|
||||
|
||||
if (rtw_set_802_11_infrastructure_mode(padapter, networkType) ==_FALSE)
|
||||
if (rtw_set_802_11_infrastructure_mode(padapter, networkType) ==false)
|
||||
{
|
||||
rtw_wdev->iftype = old_type;
|
||||
ret = -EPERM;
|
||||
|
@ -1714,7 +1714,7 @@ void rtw_cfg80211_surveydone_event_callback(_adapter *padapter)
|
|||
|
||||
while (1)
|
||||
{
|
||||
if (rtw_end_of_queue_search(phead,plist)== _TRUE)
|
||||
if (rtw_end_of_queue_search(phead,plist)== true)
|
||||
break;
|
||||
|
||||
pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
|
||||
|
@ -1722,7 +1722,7 @@ void rtw_cfg80211_surveydone_event_callback(_adapter *padapter)
|
|||
//report network only if the current channel set contains the channel to which this network belongs
|
||||
if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.Configuration.DSConfig) >= 0
|
||||
#ifdef CONFIG_VALIDATE_SSID
|
||||
&& _TRUE == rtw_validate_ssid(&(pnetwork->network.Ssid))
|
||||
&& true == rtw_validate_ssid(&(pnetwork->network.Ssid))
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
@ -1737,7 +1737,7 @@ void rtw_cfg80211_surveydone_event_callback(_adapter *padapter)
|
|||
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||
|
||||
//call this after other things have been done
|
||||
rtw_cfg80211_indicate_scan_done(wdev_to_priv(padapter->rtw_wdev), _FALSE);
|
||||
rtw_cfg80211_indicate_scan_done(wdev_to_priv(padapter->rtw_wdev), false);
|
||||
}
|
||||
|
||||
static int rtw_cfg80211_set_probe_req_wpsp2pie(struct net_device *net, char *buf, int len)
|
||||
|
@ -1849,7 +1849,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy, struct net_device *ndev,
|
|||
struct cfg80211_scan_request *request)
|
||||
{
|
||||
int i;
|
||||
u8 _status = _FALSE;
|
||||
u8 _status = false;
|
||||
int ret = 0;
|
||||
_adapter *padapter = wiphy_to_adapter(wiphy);
|
||||
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
||||
|
@ -1866,7 +1866,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy, struct net_device *ndev,
|
|||
struct rtw_wdev_priv *pwdev_priv = wdev_to_priv(padapter->rtw_wdev);
|
||||
struct cfg80211_ssid *ssids = request->ssids;
|
||||
int social_channel = 0, j = 0;
|
||||
bool need_indicate_scan_done = _FALSE;
|
||||
bool need_indicate_scan_done = false;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
PADAPTER pbuddy_adapter = NULL;
|
||||
struct mlme_priv *pbuddy_mlmepriv = NULL;
|
||||
|
@ -1887,7 +1887,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy, struct net_device *ndev,
|
|||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
{
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)
|
||||
{
|
||||
ret = -EPERM;
|
||||
goto exit;
|
||||
|
@ -1899,18 +1899,18 @@ if (padapter->registrypriv.mp_mode == 1)
|
|||
pwdev_priv->scan_request = request;
|
||||
_exit_critical_bh(&pwdev_priv->scan_req_lock, &irqL);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||
{
|
||||
|
||||
#ifdef CONFIG_DEBUG_CFG80211
|
||||
DBG_88E("%s under WIFI_AP_STATE\n", __func__);
|
||||
#endif
|
||||
//need_indicate_scan_done = _TRUE;
|
||||
//need_indicate_scan_done = true;
|
||||
//goto check_need_indicate_scan_done;
|
||||
}
|
||||
|
||||
if (_FAIL == rtw_pwr_wakeup(padapter)) {
|
||||
need_indicate_scan_done = _TRUE;
|
||||
need_indicate_scan_done = true;
|
||||
goto check_need_indicate_scan_done;
|
||||
}
|
||||
|
||||
|
@ -1923,7 +1923,7 @@ if (padapter->registrypriv.mp_mode == 1)
|
|||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
{
|
||||
rtw_p2p_enable(padapter, P2P_ROLE_DEVICE);
|
||||
wdev_to_priv(padapter->rtw_wdev)->p2p_enabled = _TRUE;
|
||||
wdev_to_priv(padapter->rtw_wdev)->p2p_enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1950,47 +1950,47 @@ if (padapter->registrypriv.mp_mode == 1)
|
|||
rtw_cfg80211_set_probe_req_wpsp2pie( ndev, (u8 *)request->ie, request->ie_len );
|
||||
}
|
||||
|
||||
if (pmlmepriv->LinkDetectInfo.bBusyTraffic == _TRUE)
|
||||
if (pmlmepriv->LinkDetectInfo.bBusyTraffic == true)
|
||||
{
|
||||
DBG_88E("%s, bBusyTraffic == _TRUE\n", __func__);
|
||||
need_indicate_scan_done = _TRUE;
|
||||
DBG_88E("%s, bBusyTraffic == true\n", __func__);
|
||||
need_indicate_scan_done = true;
|
||||
goto check_need_indicate_scan_done;
|
||||
}
|
||||
if (rtw_is_scan_deny(padapter)){
|
||||
DBG_88E(FUNC_NDEV_FMT ": scan deny\n", FUNC_NDEV_ARG(ndev));
|
||||
need_indicate_scan_done = _TRUE;
|
||||
need_indicate_scan_done = true;
|
||||
goto check_need_indicate_scan_done;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (pbuddy_mlmepriv && (pbuddy_mlmepriv->LinkDetectInfo.bBusyTraffic == _TRUE))
|
||||
if (pbuddy_mlmepriv && (pbuddy_mlmepriv->LinkDetectInfo.bBusyTraffic == true))
|
||||
{
|
||||
DBG_88E("%s, bBusyTraffic == _TRUE at buddy_intf\n", __func__);
|
||||
need_indicate_scan_done = _TRUE;
|
||||
DBG_88E("%s, bBusyTraffic == true at buddy_intf\n", __func__);
|
||||
need_indicate_scan_done = true;
|
||||
goto check_need_indicate_scan_done;
|
||||
}
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
|
||||
{
|
||||
DBG_88E("%s, fwstate=0x%x\n", __func__, pmlmepriv->fw_state);
|
||||
need_indicate_scan_done = _TRUE;
|
||||
need_indicate_scan_done = true;
|
||||
goto check_need_indicate_scan_done;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter,
|
||||
_FW_UNDER_SURVEY|_FW_UNDER_LINKING|WIFI_UNDER_WPS) == _TRUE)
|
||||
_FW_UNDER_SURVEY|_FW_UNDER_LINKING|WIFI_UNDER_WPS) == true)
|
||||
{
|
||||
if (check_buddy_fwstate(padapter, _FW_UNDER_SURVEY))
|
||||
{
|
||||
DBG_88E("scanning_via_buddy_intf\n");
|
||||
pmlmepriv->scanning_via_buddy_intf = _TRUE;
|
||||
pmlmepriv->scanning_via_buddy_intf = true;
|
||||
}
|
||||
|
||||
DBG_88E("buddy_intf's mlme state:0x%x\n", pbuddy_mlmepriv->fw_state);
|
||||
|
||||
need_indicate_scan_done = _TRUE;
|
||||
need_indicate_scan_done = true;
|
||||
goto check_need_indicate_scan_done;
|
||||
}
|
||||
#endif
|
||||
|
@ -2000,7 +2000,7 @@ if (padapter->registrypriv.mp_mode == 1)
|
|||
if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE) && !rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE))
|
||||
{
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH);
|
||||
rtw_free_network_queue(padapter, _TRUE);
|
||||
rtw_free_network_queue(padapter, true);
|
||||
|
||||
if (social_channel == 0)
|
||||
rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_NONE);
|
||||
|
@ -2043,7 +2043,7 @@ if (padapter->registrypriv.mp_mode == 1)
|
|||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
|
||||
if (_status == _FALSE)
|
||||
if (_status == false)
|
||||
{
|
||||
ret = -1;
|
||||
}
|
||||
|
@ -2450,9 +2450,9 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
NDIS_802_11_SSID ndis_ssid;
|
||||
u8 *dst_ssid, *src_ssid;
|
||||
u8 *dst_bssid, *src_bssid;
|
||||
//u8 matched_by_bssid=_FALSE;
|
||||
//u8 matched_by_ssid=_FALSE;
|
||||
u8 matched=_FALSE;
|
||||
//u8 matched_by_bssid=false;
|
||||
//u8 matched_by_ssid=false;
|
||||
u8 matched=false;
|
||||
_adapter *padapter = wiphy_to_adapter(wiphy);
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||
|
@ -2463,7 +2463,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
sme->privacy, sme->key, sme->key_len, sme->key_idx);
|
||||
|
||||
|
||||
if (wdev_to_priv(padapter->rtw_wdev)->block == _TRUE)
|
||||
if (wdev_to_priv(padapter->rtw_wdev)->block == true)
|
||||
{
|
||||
ret = -EBUSY;
|
||||
DBG_88E("%s wdev_priv.block is set\n", __func__);
|
||||
|
@ -2472,7 +2472,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
|
||||
#ifdef CONFIG_PLATFORM_MSTAR_TITANIA12
|
||||
printk("MStar Android!\n");
|
||||
if ((wdev_to_priv(padapter->rtw_wdev))->bandroid_scan == _FALSE)
|
||||
if ((wdev_to_priv(padapter->rtw_wdev))->bandroid_scan == false)
|
||||
{
|
||||
#ifdef CONFIG_P2P
|
||||
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
||||
|
@ -2497,12 +2497,12 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter, _FW_UNDER_LINKING) == _TRUE) {
|
||||
if (check_buddy_fwstate(padapter, _FW_UNDER_LINKING) == true) {
|
||||
DBG_88E("%s, but buddy_intf is under linking\n", __func__);
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
if (check_buddy_fwstate(padapter, _FW_UNDER_SURVEY) == _TRUE) {
|
||||
if (check_buddy_fwstate(padapter, _FW_UNDER_SURVEY) == true) {
|
||||
rtw_scan_abort(padapter->pbuddy_adapter);
|
||||
}
|
||||
#endif
|
||||
|
@ -2531,7 +2531,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
DBG_88E("bssid="MAC_FMT"\n", MAC_ARG(sme->bssid));
|
||||
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == _TRUE)
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
|
||||
{
|
||||
ret = -EBUSY;
|
||||
DBG_88E("%s, fw_state=0x%x, goto exit\n", __func__, pmlmepriv->fw_state);
|
||||
|
@ -2546,7 +2546,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
|
||||
while (1)
|
||||
{
|
||||
if (rtw_end_of_queue_search(phead, pmlmepriv->pscanned) == _TRUE)
|
||||
if (rtw_end_of_queue_search(phead, pmlmepriv->pscanned) == true)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -2558,13 +2558,13 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
dst_bssid = pnetwork->network.MacAddress;
|
||||
|
||||
if (sme->bssid) {
|
||||
if (_rtw_memcmp(pnetwork->network.MacAddress, sme->bssid, ETH_ALEN) == _FALSE)
|
||||
if (_rtw_memcmp(pnetwork->network.MacAddress, sme->bssid, ETH_ALEN) == false)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (sme->ssid && sme->ssid_len) {
|
||||
if ( pnetwork->network.Ssid.SsidLength != sme->ssid_len
|
||||
|| _rtw_memcmp(pnetwork->network.Ssid.Ssid, sme->ssid, sme->ssid_len) == _FALSE
|
||||
|| _rtw_memcmp(pnetwork->network.Ssid.Ssid, sme->ssid, sme->ssid_len) == false
|
||||
)
|
||||
continue;
|
||||
}
|
||||
|
@ -2574,14 +2574,14 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
{
|
||||
src_bssid = sme->bssid;
|
||||
|
||||
if ((_rtw_memcmp(dst_bssid, src_bssid, ETH_ALEN)) == _TRUE)
|
||||
if ((_rtw_memcmp(dst_bssid, src_bssid, ETH_ALEN)) == true)
|
||||
{
|
||||
DBG_88E("matched by bssid\n");
|
||||
|
||||
ndis_ssid.SsidLength = pnetwork->network.Ssid.SsidLength;
|
||||
_rtw_memcpy(ndis_ssid.Ssid, pnetwork->network.Ssid.Ssid, pnetwork->network.Ssid.SsidLength);
|
||||
|
||||
matched=_TRUE;
|
||||
matched=true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2590,11 +2590,11 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
{
|
||||
src_ssid = ndis_ssid.Ssid;
|
||||
|
||||
if ((_rtw_memcmp(dst_ssid, src_ssid, ndis_ssid.SsidLength) == _TRUE) &&
|
||||
if ((_rtw_memcmp(dst_ssid, src_ssid, ndis_ssid.SsidLength) == true) &&
|
||||
(pnetwork->network.Ssid.SsidLength==ndis_ssid.SsidLength))
|
||||
{
|
||||
DBG_88E("matched by ssid\n");
|
||||
matched=_TRUE;
|
||||
matched=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2603,15 +2603,15 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
|
||||
if ((matched == _FALSE) || (pnetwork== NULL))
|
||||
if ((matched == false) || (pnetwork== NULL))
|
||||
{
|
||||
ret = -ENOENT;
|
||||
DBG_88E("connect, matched == _FALSE, goto exit\n");
|
||||
DBG_88E("connect, matched == false, goto exit\n");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
||||
if (rtw_set_802_11_infrastructure_mode(padapter, pnetwork->network.InfrastructureMode) == _FALSE)
|
||||
if (rtw_set_802_11_infrastructure_mode(padapter, pnetwork->network.InfrastructureMode) == false)
|
||||
{
|
||||
ret = -EPERM;
|
||||
goto exit;
|
||||
|
@ -2658,7 +2658,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
goto exit;
|
||||
|
||||
if (sme->crypto.n_ciphers_pairwise) {
|
||||
ret = rtw_cfg80211_set_cipher(psecuritypriv, sme->crypto.ciphers_pairwise[0], _TRUE);
|
||||
ret = rtw_cfg80211_set_cipher(psecuritypriv, sme->crypto.ciphers_pairwise[0], true);
|
||||
if (ret < 0)
|
||||
goto exit;
|
||||
}
|
||||
|
@ -2725,7 +2725,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
ret = rtw_cfg80211_set_cipher(psecuritypriv, sme->crypto.cipher_group, _FALSE);
|
||||
ret = rtw_cfg80211_set_cipher(psecuritypriv, sme->crypto.cipher_group, false);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
@ -2749,7 +2749,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
|
||||
//rtw_set_802_11_encryption_mode(padapter, padapter->securitypriv.ndisencryptstatus);
|
||||
|
||||
if (rtw_set_802_11_ssid(padapter, &ndis_ssid) == _FALSE) {
|
||||
if (rtw_set_802_11_ssid(padapter, &ndis_ssid) == false) {
|
||||
ret = -1;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -2775,13 +2775,13 @@ static int cfg80211_rtw_disconnect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
{
|
||||
rtw_scan_abort(padapter);
|
||||
LeaveAllPowerSaveMode(padapter);
|
||||
rtw_disassoc_cmd(padapter, 500, _FALSE);
|
||||
rtw_disassoc_cmd(padapter, 500, false);
|
||||
|
||||
DBG_88E("%s...call rtw_indicate_disconnect\n", __func__);
|
||||
|
||||
padapter->mlmepriv.not_indic_disco = _TRUE;
|
||||
padapter->mlmepriv.not_indic_disco = true;
|
||||
rtw_indicate_disconnect(padapter);
|
||||
padapter->mlmepriv.not_indic_disco = _FALSE;
|
||||
padapter->mlmepriv.not_indic_disco = false;
|
||||
|
||||
rtw_free_assoc_resources(padapter, 1);
|
||||
}
|
||||
|
@ -2839,31 +2839,31 @@ static int cfg80211_rtw_set_pmksa(struct wiphy *wiphy,
|
|||
struct net_device *netdev,
|
||||
struct cfg80211_pmksa *pmksa)
|
||||
{
|
||||
u8 index,blInserted = _FALSE;
|
||||
u8 index,blInserted = false;
|
||||
_adapter *padapter = wiphy_to_adapter(wiphy);
|
||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||
u8 strZeroMacAddress[ ETH_ALEN ] = { 0x00 };
|
||||
|
||||
DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(netdev));
|
||||
|
||||
if ( _rtw_memcmp( pmksa->bssid, strZeroMacAddress, ETH_ALEN ) == _TRUE )
|
||||
if ( _rtw_memcmp( pmksa->bssid, strZeroMacAddress, ETH_ALEN ) == true )
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
blInserted = _FALSE;
|
||||
blInserted = false;
|
||||
|
||||
//overwrite PMKID
|
||||
for (index=0 ; index<NUM_PMKID_CACHE; index++)
|
||||
{
|
||||
if ( _rtw_memcmp( psecuritypriv->PMKIDList[index].Bssid, pmksa->bssid, ETH_ALEN) ==_TRUE )
|
||||
if ( _rtw_memcmp( psecuritypriv->PMKIDList[index].Bssid, pmksa->bssid, ETH_ALEN) ==true )
|
||||
{ // BSSID is matched, the same AP => rewrite with new PMKID.
|
||||
DBG_88E(FUNC_NDEV_FMT" BSSID exists in the PMKList.\n", FUNC_NDEV_ARG(netdev));
|
||||
|
||||
_rtw_memcpy( psecuritypriv->PMKIDList[index].PMKID, pmksa->pmkid, WLAN_PMKID_LEN);
|
||||
psecuritypriv->PMKIDList[index].bUsed = _TRUE;
|
||||
psecuritypriv->PMKIDList[index].bUsed = true;
|
||||
psecuritypriv->PMKIDIndex = index+1;
|
||||
blInserted = _TRUE;
|
||||
blInserted = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2877,7 +2877,7 @@ static int cfg80211_rtw_set_pmksa(struct wiphy *wiphy,
|
|||
_rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, pmksa->bssid, ETH_ALEN);
|
||||
_rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pmksa->pmkid, WLAN_PMKID_LEN);
|
||||
|
||||
psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = _TRUE;
|
||||
psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = true;
|
||||
psecuritypriv->PMKIDIndex++ ;
|
||||
if (psecuritypriv->PMKIDIndex==16)
|
||||
{
|
||||
|
@ -2892,7 +2892,7 @@ static int cfg80211_rtw_del_pmksa(struct wiphy *wiphy,
|
|||
struct net_device *netdev,
|
||||
struct cfg80211_pmksa *pmksa)
|
||||
{
|
||||
u8 index, bMatched = _FALSE;
|
||||
u8 index, bMatched = false;
|
||||
_adapter *padapter = wiphy_to_adapter(wiphy);
|
||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||
|
||||
|
@ -2900,17 +2900,17 @@ static int cfg80211_rtw_del_pmksa(struct wiphy *wiphy,
|
|||
|
||||
for (index=0 ; index<NUM_PMKID_CACHE; index++)
|
||||
{
|
||||
if ( _rtw_memcmp( psecuritypriv->PMKIDList[index].Bssid, pmksa->bssid, ETH_ALEN) ==_TRUE )
|
||||
if ( _rtw_memcmp( psecuritypriv->PMKIDList[index].Bssid, pmksa->bssid, ETH_ALEN) ==true )
|
||||
{ // BSSID is matched, the same AP => Remove this PMKID information and reset it.
|
||||
_rtw_memset( psecuritypriv->PMKIDList[index].Bssid, 0x00, ETH_ALEN );
|
||||
_rtw_memset( psecuritypriv->PMKIDList[index].PMKID, 0x00, WLAN_PMKID_LEN );
|
||||
psecuritypriv->PMKIDList[index].bUsed = _FALSE;
|
||||
bMatched = _TRUE;
|
||||
psecuritypriv->PMKIDList[index].bUsed = false;
|
||||
bMatched = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (_FALSE == bMatched)
|
||||
if (false == bMatched)
|
||||
{
|
||||
DBG_88E(FUNC_NDEV_FMT" do not have matched BSSID\n"
|
||||
, FUNC_NDEV_ARG(netdev));
|
||||
|
@ -3149,7 +3149,7 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de
|
|||
u8 category, action;
|
||||
int type = -1;
|
||||
|
||||
if (rtw_action_frame_parse(buf, len, &category, &action) == _FALSE) {
|
||||
if (rtw_action_frame_parse(buf, len, &category, &action) == false) {
|
||||
DBG_88E(FUNC_NDEV_FMT" frame_control:0x%x\n", FUNC_NDEV_ARG(ndev),
|
||||
le16_to_cpu(((struct rtw_ieee80211_hdr_3addr *)buf)->frame_ctl));
|
||||
goto fail;
|
||||
|
@ -3158,7 +3158,7 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de
|
|||
DBG_88E("RTW_Tx:da="MAC_FMT" via "FUNC_NDEV_FMT"\n",
|
||||
MAC_ARG(GetAddr1Ptr(buf)), FUNC_NDEV_ARG(ndev));
|
||||
#ifdef CONFIG_P2P
|
||||
if ((type = rtw_p2p_check_frames(padapter, buf, len, _TRUE)) >= 0)
|
||||
if ((type = rtw_p2p_check_frames(padapter, buf, len, true)) >= 0)
|
||||
goto dump;
|
||||
#endif
|
||||
if (category == RTW_WLAN_CATEGORY_PUBLIC)
|
||||
|
@ -3176,7 +3176,7 @@ dump:
|
|||
//update attribute
|
||||
pattrib = &pmgntframe->attrib;
|
||||
update_mgntframe_attrib(padapter, pattrib);
|
||||
pattrib->retry_ctrl = _FALSE;
|
||||
pattrib->retry_ctrl = false;
|
||||
|
||||
_rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||
|
||||
|
@ -3190,7 +3190,7 @@ dump:
|
|||
|
||||
pwfd_info = padapter->wdinfo.wfd_info;
|
||||
|
||||
if ( _TRUE == pwfd_info->wfd_enable )
|
||||
if ( true == pwfd_info->wfd_enable )
|
||||
{
|
||||
rtw_append_wfd_ie( padapter, pframe, &len );
|
||||
}
|
||||
|
@ -3403,7 +3403,7 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co
|
|||
uint len, wps_ielen=0;
|
||||
uint p2p_ielen=0;
|
||||
u8 *p2p_ie;
|
||||
u8 got_p2p_ie = _FALSE;
|
||||
u8 got_p2p_ie = false;
|
||||
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
||||
//struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
|
||||
|
@ -3411,7 +3411,7 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co
|
|||
DBG_88E("%s beacon_head_len=%zu, beacon_tail_len=%zu\n", __func__, head_len, tail_len);
|
||||
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE)
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true)
|
||||
return -EINVAL;
|
||||
|
||||
if (head_len<24)
|
||||
|
@ -3443,7 +3443,7 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co
|
|||
if (rtw_get_p2p_ie(pbuf+_FIXED_IE_LENGTH_, len-_FIXED_IE_LENGTH_, NULL, &p2p_ielen))
|
||||
{
|
||||
DBG_88E("got p2p_ie, len=%d\n", p2p_ielen);
|
||||
got_p2p_ie = _TRUE;
|
||||
got_p2p_ie = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -3455,7 +3455,7 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co
|
|||
{
|
||||
#ifdef CONFIG_P2P
|
||||
//check p2p if enable
|
||||
if (got_p2p_ie == _TRUE)
|
||||
if (got_p2p_ie == true)
|
||||
{
|
||||
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
|
||||
struct wifidirect_info *pwdinfo= &(adapter->wdinfo);
|
||||
|
@ -3464,7 +3464,7 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co
|
|||
{
|
||||
DBG_88E("Enable P2P function for the first time\n");
|
||||
rtw_p2p_enable(adapter, P2P_ROLE_GO);
|
||||
wdev_to_priv(adapter->rtw_wdev)->p2p_enabled = _TRUE;
|
||||
wdev_to_priv(adapter->rtw_wdev)->p2p_enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3519,7 +3519,7 @@ static int cfg80211_rtw_set_beacon(struct wiphy *wiphy, struct net_device *ndev,
|
|||
|
||||
DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
||||
|
||||
pmlmeext->bstart_bss = _TRUE;
|
||||
pmlmeext->bstart_bss = true;
|
||||
|
||||
cfg80211_rtw_add_beacon(wiphy, ndev, info);
|
||||
|
||||
|
@ -3590,7 +3590,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
|
|||
|
||||
DBG_88E("+"FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
||||
|
||||
if (check_fwstate(pmlmepriv, (_FW_LINKED|WIFI_AP_STATE)) != _TRUE)
|
||||
if (check_fwstate(pmlmepriv, (_FW_LINKED|WIFI_AP_STATE)) != true)
|
||||
{
|
||||
DBG_88E("%s, fw_state != FW_LINKED|WIFI_AP_STATE\n", __func__);
|
||||
return -EINVAL;
|
||||
|
@ -3625,7 +3625,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
|
|||
plist = get_next(phead);
|
||||
|
||||
//check asoc_queue
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == false)
|
||||
{
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list);
|
||||
|
||||
|
@ -3633,9 +3633,9 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
|
|||
|
||||
if (_rtw_memcmp(mac, psta->hwaddr, ETH_ALEN))
|
||||
{
|
||||
if (psta->dot8021xalg == 1 && psta->bpairwise_key_installed == _FALSE)
|
||||
if (psta->dot8021xalg == 1 && psta->bpairwise_key_installed == false)
|
||||
{
|
||||
DBG_88E("%s, sta's dot8021xalg = 1 and key_installed = _FALSE\n", __func__);
|
||||
DBG_88E("%s, sta's dot8021xalg = 1 and key_installed = false\n", __func__);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3645,7 +3645,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
|
|||
pstapriv->asoc_list_cnt--;
|
||||
|
||||
//_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
updated = ap_free_sta(padapter, psta, _TRUE, WLAN_REASON_DEAUTH_LEAVING);
|
||||
updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
|
||||
//_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
|
||||
psta = NULL;
|
||||
|
@ -3750,7 +3750,7 @@ void rtw_cfg80211_rx_action_p2p(_adapter *padapter, u8 *pmgmt_frame, uint frame_
|
|||
|
||||
DBG_88E("RTW_Rx:cur_ch=%d\n", channel);
|
||||
#ifdef CONFIG_P2P
|
||||
type = rtw_p2p_check_frames(padapter, pmgmt_frame, frame_len, _FALSE);
|
||||
type = rtw_p2p_check_frames(padapter, pmgmt_frame, frame_len, false);
|
||||
if (type >= 0)
|
||||
goto indicate;
|
||||
#endif
|
||||
|
@ -3782,7 +3782,7 @@ void rtw_cfg80211_rx_p2p_action_public(_adapter *padapter, u8 *pmgmt_frame, uint
|
|||
|
||||
DBG_88E("RTW_Rx:cur_ch=%d\n", channel);
|
||||
#ifdef CONFIG_P2P
|
||||
type = rtw_p2p_check_frames(padapter, pmgmt_frame, frame_len, _FALSE);
|
||||
type = rtw_p2p_check_frames(padapter, pmgmt_frame, frame_len, false);
|
||||
if (type >= 0) {
|
||||
switch (type) {
|
||||
case P2P_GO_NEGO_CONF:
|
||||
|
@ -4077,11 +4077,11 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device
|
|||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
struct cfg80211_wifidirect_info *pcfg80211_wdinfo = &padapter->cfg80211_wdinfo;
|
||||
u8 remain_ch = (u8) ieee80211_frequency_to_channel(channel->center_freq);
|
||||
u8 ready_on_channel = _FALSE;
|
||||
u8 ready_on_channel = false;
|
||||
|
||||
DBG_88E(FUNC_NDEV_FMT" ch:%u duration:%d\n", FUNC_NDEV_ARG(ndev), remain_ch, duration);
|
||||
|
||||
if (pcfg80211_wdinfo->is_ro_ch == _TRUE)
|
||||
if (pcfg80211_wdinfo->is_ro_ch == true)
|
||||
{
|
||||
DBG_88E("%s, cancel ro ch timer\n", __func__);
|
||||
|
||||
|
@ -4094,7 +4094,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device
|
|||
p2p_protocol_wk_hdl(padapter, P2P_RO_CH_WK);
|
||||
}
|
||||
|
||||
pcfg80211_wdinfo->is_ro_ch = _TRUE;
|
||||
pcfg80211_wdinfo->is_ro_ch = true;
|
||||
|
||||
if (_FAIL == rtw_pwr_wakeup(padapter)) {
|
||||
err = -EFAULT;
|
||||
|
@ -4116,7 +4116,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device
|
|||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
{
|
||||
rtw_p2p_enable(padapter, P2P_ROLE_DEVICE);
|
||||
wdev_to_priv(padapter->rtw_wdev)->p2p_enabled = _TRUE;
|
||||
wdev_to_priv(padapter->rtw_wdev)->p2p_enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4166,14 +4166,14 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device
|
|||
}
|
||||
}
|
||||
|
||||
ready_on_channel = _TRUE;
|
||||
ready_on_channel = true;
|
||||
//pmlmeext->cur_channel = remain_ch;
|
||||
//set_channel_bwmode(padapter, remain_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}else
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
if (remain_ch != pmlmeext->cur_channel )
|
||||
{
|
||||
ready_on_channel = _TRUE;
|
||||
ready_on_channel = true;
|
||||
//pmlmeext->cur_channel = remain_ch;
|
||||
//set_channel_bwmode(padapter, remain_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}
|
||||
|
@ -4191,7 +4191,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device
|
|||
ATOMIC_SET(&pwdev_priv->ro_ch_to, 0);
|
||||
#endif
|
||||
|
||||
if (ready_on_channel == _TRUE)
|
||||
if (ready_on_channel == true)
|
||||
{
|
||||
if ( !check_fwstate(&padapter->mlmepriv, _FW_LINKED ) )
|
||||
pmlmeext->cur_channel = remain_ch;
|
||||
|
@ -4217,7 +4217,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device
|
|||
|
||||
exit:
|
||||
if (err)
|
||||
pcfg80211_wdinfo->is_ro_ch = _FALSE;
|
||||
pcfg80211_wdinfo->is_ro_ch = false;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
@ -4234,7 +4234,7 @@ static s32 cfg80211_rtw_cancel_remain_on_channel(struct wiphy *wiphy, struct net
|
|||
|
||||
DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
||||
|
||||
if (pcfg80211_wdinfo->is_ro_ch == _TRUE) {
|
||||
if (pcfg80211_wdinfo->is_ro_ch == true) {
|
||||
DBG_88E("%s, cancel ro ch timer\n", __func__);
|
||||
_cancel_timer_ex(&padapter->cfg80211_wdinfo.remain_on_ch_timer);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
|
@ -4249,7 +4249,7 @@ static s32 cfg80211_rtw_cancel_remain_on_channel(struct wiphy *wiphy, struct net
|
|||
DBG_88E("%s, role=%d, p2p_state=%d\n", __func__, rtw_p2p_role(pwdinfo), rtw_p2p_state(pwdinfo));
|
||||
#endif
|
||||
}
|
||||
pcfg80211_wdinfo->is_ro_ch = _FALSE;
|
||||
pcfg80211_wdinfo->is_ro_ch = false;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
@ -4262,7 +4262,7 @@ static int _cfg80211_rtw_mgmt_tx(struct net_device *ndev, u8 tx_ch, const u8 *bu
|
|||
struct pkt_attrib *pattrib;
|
||||
unsigned char *pframe;
|
||||
int ret = _FAIL;
|
||||
bool ack = _TRUE;
|
||||
bool ack = true;
|
||||
struct rtw_ieee80211_hdr *pwlanhdr;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(ndev);
|
||||
struct rtw_wdev_priv *pwdev_priv = wdev_to_priv(padapter->rtw_wdev);
|
||||
|
@ -4285,10 +4285,10 @@ static int _cfg80211_rtw_mgmt_tx(struct net_device *ndev, u8 tx_ch, const u8 *bu
|
|||
rtw_scan_abort(padapter->pbuddy_adapter);
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
|
||||
if (padapter->cfg80211_wdinfo.is_ro_ch == _TRUE) {
|
||||
if (padapter->cfg80211_wdinfo.is_ro_ch == true) {
|
||||
//DBG_88E("%s, cancel ro ch timer\n", __func__);
|
||||
//_cancel_timer_ex(&padapter->cfg80211_wdinfo.remain_on_ch_timer);
|
||||
//padapter->cfg80211_wdinfo.is_ro_ch = _FALSE;
|
||||
//padapter->cfg80211_wdinfo.is_ro_ch = false;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
DBG_88E("%s, extend ro ch time\n", __func__);
|
||||
_set_timer( &padapter->cfg80211_wdinfo.remain_on_ch_timer, pwdinfo->ext_listen_period);
|
||||
|
@ -4343,7 +4343,7 @@ static int _cfg80211_rtw_mgmt_tx(struct net_device *ndev, u8 tx_ch, const u8 *bu
|
|||
//update attribute
|
||||
pattrib = &pmgntframe->attrib;
|
||||
update_mgntframe_attrib(padapter, pattrib);
|
||||
pattrib->retry_ctrl = _FALSE;
|
||||
pattrib->retry_ctrl = false;
|
||||
|
||||
_rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
|
||||
|
||||
|
@ -4364,7 +4364,7 @@ static int _cfg80211_rtw_mgmt_tx(struct net_device *ndev, u8 tx_ch, const u8 *bu
|
|||
|
||||
pwfd_info = padapter->wdinfo.wfd_info;
|
||||
|
||||
if ( _TRUE == pwfd_info->wfd_enable )
|
||||
if ( true == pwfd_info->wfd_enable )
|
||||
{
|
||||
rtw_append_wfd_ie( padapter, pframe, &pattrib->pktlen );
|
||||
}
|
||||
|
@ -4375,7 +4375,7 @@ static int _cfg80211_rtw_mgmt_tx(struct net_device *ndev, u8 tx_ch, const u8 *bu
|
|||
|
||||
if (dump_mgntframe_and_wait_ack(padapter, pmgntframe) != _SUCCESS)
|
||||
{
|
||||
ack = _FALSE;
|
||||
ack = false;
|
||||
ret = _FAIL;
|
||||
|
||||
#ifdef CONFIG_DEBUG_CFG80211
|
||||
|
@ -4427,7 +4427,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct net_device *ndev,
|
|||
int tx_ret;
|
||||
u32 dump_limit = RTW_MAX_MGMT_TX_CNT;
|
||||
u32 dump_cnt = 0;
|
||||
bool ack = _TRUE;
|
||||
bool ack = true;
|
||||
u8 tx_ch = (u8)ieee80211_frequency_to_channel(chan->center_freq);
|
||||
u8 category, action;
|
||||
int type = (-1);
|
||||
|
@ -4450,7 +4450,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct net_device *ndev,
|
|||
cfg80211_action_tx_status(ndev, *cookie, buf, len, ack, GFP_KERNEL);
|
||||
#endif
|
||||
|
||||
if (rtw_action_frame_parse(buf, len, &category, &action) == _FALSE) {
|
||||
if (rtw_action_frame_parse(buf, len, &category, &action) == false) {
|
||||
DBG_88E(FUNC_NDEV_FMT" frame_control:0x%x\n", FUNC_NDEV_ARG(ndev),
|
||||
le16_to_cpu(((struct rtw_ieee80211_hdr_3addr *)buf)->frame_ctl));
|
||||
goto exit;
|
||||
|
@ -4458,7 +4458,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct net_device *ndev,
|
|||
|
||||
DBG_88E("RTW_Tx:tx_ch=%d, da="MAC_FMT"\n", tx_ch, MAC_ARG(GetAddr1Ptr(buf)));
|
||||
#ifdef CONFIG_P2P
|
||||
if ((type = rtw_p2p_check_frames(padapter, buf, len, _TRUE)) >= 0)
|
||||
if ((type = rtw_p2p_check_frames(padapter, buf, len, true)) >= 0)
|
||||
goto dump;
|
||||
#endif
|
||||
if (category == RTW_WLAN_CATEGORY_PUBLIC)
|
||||
|
@ -4555,7 +4555,7 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf,
|
|||
_rtw_memcpy(pmlmepriv->wps_beacon_ie, wps_ie, wps_ielen);
|
||||
pmlmepriv->wps_beacon_ie_len = wps_ielen;
|
||||
|
||||
update_beacon(padapter, _VENDOR_SPECIFIC_IE_, wps_oui, _TRUE);
|
||||
update_beacon(padapter, _VENDOR_SPECIFIC_IE_, wps_oui, true);
|
||||
|
||||
}
|
||||
|
||||
|
@ -4618,7 +4618,7 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf,
|
|||
}
|
||||
#endif //CONFIG_WFD
|
||||
|
||||
pmlmeext->bstart_bss = _TRUE;
|
||||
pmlmeext->bstart_bss = true;
|
||||
|
||||
}
|
||||
|
||||
|
@ -4692,7 +4692,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
|
|||
#ifdef CONFIG_P2P
|
||||
if ((p2p_ie=rtw_get_p2p_ie(buf, len, NULL, &p2p_ielen)))
|
||||
{
|
||||
u8 is_GO = _FALSE;
|
||||
u8 is_GO = false;
|
||||
u32 attr_contentlen = 0;
|
||||
u16 cap_attr=0;
|
||||
|
||||
|
@ -4708,14 +4708,14 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
|
|||
cap_attr = le16_to_cpu(cap_attr);
|
||||
grp_cap = (u8)((cap_attr >> 8)&0xff);
|
||||
|
||||
is_GO = (grp_cap&BIT(0)) ? _TRUE:_FALSE;
|
||||
is_GO = (grp_cap&BIT(0)) ? true:false;
|
||||
|
||||
if (is_GO)
|
||||
DBG_88E("Got P2P Capability Attr, grp_cap=0x%x, is_GO\n", grp_cap);
|
||||
}
|
||||
|
||||
|
||||
if (is_GO == _FALSE)
|
||||
if (is_GO == false)
|
||||
{
|
||||
if (pmlmepriv->p2p_probe_resp_ie)
|
||||
{
|
||||
|
@ -4926,7 +4926,7 @@ static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum
|
|||
#define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */
|
||||
#define MAX_BIT_RATE_40MHZ_MCS7 150 /* Mbps */
|
||||
|
||||
ht_cap->ht_supported = _TRUE;
|
||||
ht_cap->ht_supported = true;
|
||||
|
||||
ht_cap->cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40 |
|
||||
IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_SGI_20 |
|
||||
|
@ -5093,16 +5093,16 @@ int rtw_wdev_alloc(_adapter *padapter, struct device *dev)
|
|||
pwdev_priv->scan_request = NULL;
|
||||
_rtw_spinlock_init(&pwdev_priv->scan_req_lock);
|
||||
|
||||
pwdev_priv->p2p_enabled = _FALSE;
|
||||
pwdev_priv->provdisc_req_issued = _FALSE;
|
||||
pwdev_priv->p2p_enabled = false;
|
||||
pwdev_priv->provdisc_req_issued = false;
|
||||
rtw_wdev_invit_info_init(&pwdev_priv->invit_info);
|
||||
|
||||
pwdev_priv->bandroid_scan = _FALSE;
|
||||
pwdev_priv->bandroid_scan = false;
|
||||
|
||||
if (padapter->registrypriv.power_mgnt != PS_MODE_ACTIVE)
|
||||
pwdev_priv->power_mgmt = _TRUE;
|
||||
pwdev_priv->power_mgmt = true;
|
||||
else
|
||||
pwdev_priv->power_mgmt = _FALSE;
|
||||
pwdev_priv->power_mgmt = false;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
ATOMIC_SET(&pwdev_priv->switch_ch_to, 1);
|
||||
|
@ -5168,7 +5168,7 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)
|
|||
|
||||
pwdev_priv = wdev_to_priv(wdev);
|
||||
|
||||
rtw_cfg80211_indicate_scan_done(pwdev_priv, _TRUE);
|
||||
rtw_cfg80211_indicate_scan_done(pwdev_priv, true);
|
||||
|
||||
if (pwdev_priv->pmon_ndev) {
|
||||
DBG_88E("%s, unregister monitor interface\n", __func__);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue