ret = -ENOENT;
goto exit;
}
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A(FUNC_NDEV_FMT " mac =" MAC_FMT "\n", FUNC_NDEV_ARG(ndev),
MAC_ARG(mac));
-#endif
/* for infra./P2PClient mode */
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) &&
{
spin_lock_bh(&pwdev_priv->scan_req_lock);
if (pwdev_priv->scan_request != NULL) {
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("%s with scan req\n", __func__);
-#endif
+
if (pwdev_priv->scan_request->wiphy !=
pwdev_priv->rtw_wdev->wiphy)
DBG_8723A("error wiphy compare\n");
pwdev_priv->scan_request = NULL;
} else {
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("%s without scan req\n", __func__);
-#endif
}
spin_unlock_bh(&pwdev_priv->scan_req_lock);
}
struct rtw_queue *queue = &pmlmepriv->scanned_queue;
struct wlan_network *pnetwork;
-#ifdef CONFIG_DEBUG_CFG80211
- DBG_8723A("%s\n", __func__);
-#endif
-
spin_lock_bh(&pmlmepriv->scanned_queue.lock);
phead = get_list_head(queue);
#endif
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("%s, ielen =%d\n", __func__, len);
-#endif
if (len > 0) {
wps_ie = rtw_get_wps_ie23a(buf, len, NULL, &wps_ielen);
if (wps_ie) {
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("probe_req_wps_ielen =%d\n", wps_ielen);
-#endif
+
if (pmlmepriv->wps_probe_req_ie) {
pmlmepriv->wps_probe_req_ie_len = 0;
kfree(pmlmepriv->wps_probe_req_ie);
#ifdef CONFIG_8723AU_P2P
p2p_ie = rtw_get_p2p_ie23a(buf, len, NULL, &p2p_ielen);
if (p2p_ie) {
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("probe_req_p2p_ielen =%d\n", p2p_ielen);
-#endif
if (pmlmepriv->p2p_probe_req_ie) {
pmlmepriv->p2p_probe_req_ie_len = 0;
#ifdef CONFIG_8723AU_P2P
if (rtw_get_wfd_ie(buf, len, NULL, &wfd_ielen)) {
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("probe_req_wfd_ielen =%d\n", wfd_ielen);
-#endif
if (pmlmepriv->wfd_probe_req_ie) {
pmlmepriv->wfd_probe_req_ie_len = 0;
#endif /* CONFIG_8723AU_P2P */
bool need_indicate_scan_done = false;
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A(FUNC_ADPT_FMT "\n", FUNC_ADPT_ARG(padapter));
-#endif
spin_lock_bh(&pwdev_priv->scan_req_lock);
pwdev_priv->scan_request = request;
spin_unlock_bh(&pwdev_priv->scan_req_lock);
if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
-
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("%s under WIFI_AP_STATE\n", __func__);
-#endif
/* need_indicate_scan_done = true; */
/* goto check_need_indicate_scan_done; */
}
wdev_to_priv(padapter->rtw_wdev)->p2p_enabled = true;
} else {
rtw_p2p_set_pre_state(pwdinfo, rtw_p2p_state(pwdinfo));
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("%s, role =%d, p2p_state =%d\n", __func__,
rtw_p2p_role(pwdinfo),
rtw_p2p_state(pwdinfo));
-#endif
}
rtw_p2p_set_state(pwdinfo, P2P_STATE_LISTEN);
memset(ssid, 0, sizeof(struct cfg80211_ssid) * RTW_SSID_SCAN_AMOUNT);
/* parsing request ssids, n_ssids */
for (i = 0; i < request->n_ssids && i < RTW_SSID_SCAN_AMOUNT; i++) {
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("ssid =%s, len =%d\n", ssids[i].ssid,
ssids[i].ssid_len);
-#endif
memcpy(ssid[i].ssid, ssids[i].ssid, ssids[i].ssid_len);
ssid[i].ssid_len = ssids[i].ssid_len;
}
if (request->n_channels == 1) {
for (i = 0; i < request->n_channels &&
i < RTW_CHANNEL_SCAN_AMOUNT; i++) {
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A(FUNC_ADPT_FMT CHAN_FMT "\n",
FUNC_ADPT_ARG(padapter),
CHAN_ARG(request->channels[i]));
-#endif
ch[i].hw_value = request->channels[i]->hw_value;
ch[i].flags = request->channels[i]->flags;
}
p2p_ie = rtw_get_p2p_ie23a(buf, ielen, NULL, &p2p_ielen);
if (p2p_ie) {
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("%s p2p_assoc_req_ielen =%d\n", __func__,
p2p_ielen);
-#endif
if (pmlmepriv->p2p_assoc_req_ie) {
pmlmepriv->p2p_assoc_req_ie_len = 0;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
if (rtw_get_wfd_ie(buf, ielen, NULL, &wfd_ielen)) {
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("%s wfd_assoc_req_ielen =%d\n", __func__,
wfd_ielen);
-#endif
if (pmlmepriv->wfd_assoc_req_ie) {
pmlmepriv->wfd_assoc_req_ie_len = 0;
wdev_to_priv(padapter->rtw_wdev)->p2p_enabled = true;
} else {
rtw_p2p_set_pre_state(pwdinfo, rtw_p2p_state(pwdinfo));
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("%s, role =%d, p2p_state =%d\n", __func__,
rtw_p2p_role(pwdinfo), rtw_p2p_state(pwdinfo));
-#endif
}
rtw_p2p_set_state(pwdinfo, P2P_STATE_LISTEN);
}
rtw_p2p_set_state(pwdinfo, rtw_p2p_pre_state(pwdinfo));
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("%s, role =%d, p2p_state =%d\n", __func__,
rtw_p2p_role(pwdinfo), rtw_p2p_state(pwdinfo));
-#endif
pcfg80211_wdinfo->is_ro_ch = false;
return err;
ack = false;
ret = _FAIL;
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("%s, ack == _FAIL\n", __func__);
-#endif
} else {
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("%s, ack =%d, ok!\n", __func__, ack);
-#endif
ret = _SUCCESS;
}
exit:
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("%s, ret =%d\n", __func__, ret);
-#endif
return ret;
}
/* cookie generation */
*cookie = (unsigned long)buf;
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A(FUNC_ADPT_FMT " len =%zu, ch =%d"
"\n", FUNC_ADPT_ARG(padapter), len, tx_ch);
-#endif /* CONFIG_DEBUG_CFG80211 */
/* indicate ack before issue frame to avoid racing with rsp frame */
rtw_cfg80211_mgmt_tx_status(padapter, *cookie, buf, len, ack,
struct wireless_dev *wdev,
u16 frame_type, bool reg)
{
-
-#ifdef CONFIG_DEBUG_CFG80211
- DBG_8723A(FUNC_ADPT_FMT " frame_type:%x, reg:%d\n",
- FUNC_ADPT_ARG(adapter), frame_type, reg);
-#endif
-
if (frame_type != (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_REQ))
return;
if (len > 0) {
wps_ie = rtw_get_wps_ie23a(buf, len, NULL, &wps_ielen);
if (wps_ie) {
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("bcn_wps_ielen =%d\n", wps_ielen);
-#endif
if (pmlmepriv->wps_beacon_ie) {
pmlmepriv->wps_beacon_ie_len = 0;
#ifdef CONFIG_8723AU_P2P
p2p_ie = rtw_get_p2p_ie23a(buf, len, NULL, &p2p_ielen);
if (p2p_ie) {
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("bcn_p2p_ielen =%d\n", p2p_ielen);
-#endif
if (pmlmepriv->p2p_beacon_ie) {
pmlmepriv->p2p_beacon_ie_len = 0;
#ifdef CONFIG_8723AU_P2P
if (rtw_get_wfd_ie(buf, len, NULL, &wfd_ielen)) {
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("bcn_wfd_ielen =%d\n", wfd_ielen);
-#endif
if (pmlmepriv->wfd_beacon_ie) {
pmlmepriv->wfd_beacon_ie_len = 0;
u32 attr_contentlen = 0;
u16 cap_attr = 0;
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("probe_resp_p2p_ielen =%d\n", p2p_ielen);
-#endif
/* Check P2P Capability ATTR */
if (rtw_get_p2p_attr23a_content(p2p_ie, p2p_ielen,
#ifdef CONFIG_8723AU_P2P
if (rtw_get_wfd_ie(buf, len, NULL, &wfd_ielen)) {
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("probe_resp_wfd_ielen =%d\n", wfd_ielen);
-#endif
if (pmlmepriv->wfd_probe_resp_ie) {
pmlmepriv->wfd_probe_resp_ie_len = 0;
u32 p2p_ielen = 0;
#endif
-#ifdef CONFIG_DEBUG_CFG80211
DBG_8723A("%s, ielen =%d\n", __func__, len);
-#endif
if ((rtw_get_wps_ie23a(buf, len, NULL, &wps_ielen) && (wps_ielen > 0))
#ifdef CONFIG_8723AU_P2P