memcpy(&psurveyPara->ssid[i], &ssid[i],
sizeof(struct cfg80211_ssid));
psurveyPara->ssid_num++;
- if (0)
- DBG_8723A(FUNC_ADPT_FMT" ssid:(%s, %d)\n",
- FUNC_ADPT_ARG(padapter),
- psurveyPara->ssid[i].ssid,
- psurveyPara->ssid[i].ssid_len);
}
}
}
memcpy(&psurveyPara->ch[i], &ch[i],
sizeof(struct rtw_ieee80211_channel));
psurveyPara->ch_num++;
- if (0)
- DBG_8723A(FUNC_ADPT_FMT" ch:%u\n",
- FUNC_ADPT_ARG(padapter),
- psurveyPara->ch[i].hw_value);
}
}
}
}
} else {
if (rtw_is_scan_deny(padapter)) {
- DBG_8723A(FUNC_ADPT_FMT": scan deny\n",
- FUNC_ADPT_ARG(padapter));
+ DBG_8723A("%s(%s): scan deny\n",
+ __func__, padapter->pnetdev->name);
return _SUCCESS;
}
struct rtw_adapter *adapter = (struct rtw_adapter *)data;
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
- DBG_8723A(FUNC_ADPT_FMT" fw_state =%x\n", FUNC_ADPT_ARG(adapter),
+ DBG_8723A("%s(%s): fw_state =%x\n", __func__, adapter->pnetdev->name,
get_fwstate(pmlmepriv));
spin_lock_bh(&pmlmepriv->lock);
if (token >= 0) {
if ((seq_ctrl == mlmeext->action_public_rxseq) &&
(token == mlmeext->action_public_dialog_token)) {
- DBG_8723A(FUNC_ADPT_FMT" seq_ctrl = 0x%x, "
- "rxseq = 0x%x, token:%d\n",
- FUNC_ADPT_ARG(adapter), seq_ctrl,
+ DBG_8723A("%s(%s): seq_ctrl = 0x%x, "
+ "rxseq = 0x%x, token:%d\n", __func__,
+ adapter->pnetdev->name, seq_ctrl,
mlmeext->action_public_rxseq, token);
return _FAIL;
}
} else {
if (seq_ctrl == mlmeext->action_public_rxseq) {
- DBG_8723A(FUNC_ADPT_FMT" seq_ctrl = 0x%x, "
- "rxseq = 0x%x\n",
- FUNC_ADPT_ARG(adapter), seq_ctrl,
+ DBG_8723A("%s(%s): seq_ctrl = 0x%x, "
+ "rxseq = 0x%x\n", __func__,
+ adapter->pnetdev->name, seq_ctrl,
mlmeext->action_public_rxseq);
return _FAIL;
}
pmgntframe = rtw_alloc_xmitframe23a_ext(pxmitpriv);
if (!pmgntframe) {
- DBG_8723A(FUNC_ADPT_FMT" alloc xmitframe fail\n",
- FUNC_ADPT_ARG(pxmitpriv->adapter));
+ DBG_8723A("%s(%s): alloc xmitframe fail\n", __func__,
+ pxmitpriv->adapter->pnetdev->name);
goto exit;
}
pxmitbuf = rtw_alloc_xmitbuf23a_ext(pxmitpriv);
if (!pxmitbuf) {
- DBG_8723A(FUNC_ADPT_FMT" alloc xmitbuf fail\n",
- FUNC_ADPT_ARG(pxmitpriv->adapter));
+ DBG_8723A("%s(%s): alloc xmitbuf fail\n", __func__,
+ pxmitpriv->adapter->pnetdev->name);
rtw_free_xmitframe23a(pxmitpriv, pmgntframe);
pmgntframe = NULL;
goto exit;
remainder_ie = ssid_ie + 2;
remainder_ielen = pframe - remainder_ie;
- DBG_8723A_LEVEL(_drv_warning_, FUNC_ADPT_FMT
- " remainder_ielen > MAX_IE_SZ\n",
- FUNC_ADPT_ARG(padapter));
+ DBG_8723A_LEVEL(_drv_warning_, "%s(%s): "
+ "remainder_ielen > MAX_IE_SZ\n",
+ __func__, padapter->pnetdev->name);
if (remainder_ielen > MAX_IE_SZ)
remainder_ielen = MAX_IE_SZ;
if (try_cnt && wait_ms) {
if (da)
- DBG_8723A(FUNC_ADPT_FMT" to "MAC_FMT", ch:%u%s, %d/%d "
- "in %u ms\n", FUNC_ADPT_ARG(padapter),
+ DBG_8723A("%s(%s): to "MAC_FMT", ch:%u%s, %d/%d "
+ "in %u ms\n", __func__,
+ padapter->pnetdev->name,
MAC_ARG(da), rtw_get_oper_ch23a(padapter),
ret == _SUCCESS?", acked":"", i, try_cnt,
jiffies_to_msecs(jiffies - start));
else
- DBG_8723A(FUNC_ADPT_FMT", ch:%u%s, %d/%d in %u ms\n",
- FUNC_ADPT_ARG(padapter),
+ DBG_8723A("%s(%s):, ch:%u%s, %d/%d in %u ms\n",
+ __func__, padapter->pnetdev->name,
rtw_get_oper_ch23a(padapter),
ret == _SUCCESS?", acked":"", i, try_cnt,
jiffies_to_msecs(jiffies - start));
if (try_cnt && wait_ms) {
if (da)
- DBG_8723A(FUNC_ADPT_FMT" to "MAC_FMT", ch:%u%s, %d/%d "
- "in %u ms\n", FUNC_ADPT_ARG(padapter),
+ DBG_8723A("%s(%s): to "MAC_FMT", ch:%u%s, %d/%d "
+ "in %u ms\n", __func__,
+ padapter->pnetdev->name,
MAC_ARG(da), rtw_get_oper_ch23a(padapter),
ret == _SUCCESS?", acked":"", i, try_cnt,
jiffies_to_msecs(jiffies - start));
else
- DBG_8723A(FUNC_ADPT_FMT", ch:%u%s, %d/%d in %u ms\n",
- FUNC_ADPT_ARG(padapter),
+ DBG_8723A("%s(%s):, ch:%u%s, %d/%d in %u ms\n",
+ __func__, padapter->pnetdev->name,
rtw_get_oper_ch23a(padapter),
ret == _SUCCESS?", acked":"", i, try_cnt,
jiffies_to_msecs(jiffies - start));
if (try_cnt && wait_ms) {
if (da)
- DBG_8723A(FUNC_ADPT_FMT" to "MAC_FMT", ch:%u%s, %d/%d "
- "in %u ms\n", FUNC_ADPT_ARG(padapter),
+ DBG_8723A("%s(%s): to "MAC_FMT", ch:%u%s, %d/%d "
+ "in %u ms\n", __func__,
+ padapter->pnetdev->name,
MAC_ARG(da), rtw_get_oper_ch23a(padapter),
ret == _SUCCESS?", acked":"", i, try_cnt,
jiffies_to_msecs(jiffies - start));
else
- DBG_8723A(FUNC_ADPT_FMT", ch:%u%s, %d/%d in %u ms\n",
- FUNC_ADPT_ARG(padapter),
+ DBG_8723A("%s(%s):, ch:%u%s, %d/%d in %u ms\n",
+ __func__, padapter->pnetdev->name,
rtw_get_oper_ch23a(padapter),
ret == _SUCCESS?", acked":"", i, try_cnt,
jiffies_to_msecs(jiffies - start));
if (try_cnt && wait_ms) {
if (da)
- DBG_8723A(FUNC_ADPT_FMT" to "MAC_FMT", ch:%u%s, %d/%d "
- "in %u ms\n", FUNC_ADPT_ARG(padapter),
+ DBG_8723A("%s(%s): to "MAC_FMT", ch:%u%s, %d/%d "
+ "in %u ms\n", __func__,
+ padapter->pnetdev->name,
MAC_ARG(da), rtw_get_oper_ch23a(padapter),
ret == _SUCCESS?", acked":"", i, try_cnt,
jiffies_to_msecs(jiffies - start));
else
- DBG_8723A(FUNC_ADPT_FMT", ch:%u%s, %d/%d in %u ms\n",
- FUNC_ADPT_ARG(padapter),
+ DBG_8723A("%s(%s):, ch:%u%s, %d/%d in %u ms\n",
+ __func__, padapter->pnetdev->name,
rtw_get_oper_ch23a(padapter),
ret == _SUCCESS?", acked":"", i, try_cnt,
jiffies_to_msecs(jiffies - start));
if (rx_chk == _FAIL) {
pmlmeext->retry++;
if (pmlmeext->retry > rx_chk_limit) {
- DBG_8723A_LEVEL(_drv_always_, FUNC_ADPT_FMT" disconnect or roaming\n",
- FUNC_ADPT_ARG(padapter));
+ DBG_8723A_LEVEL(_drv_always_,
+ "%s(%s): disconnect or "
+ "roaming\n", __func__,
+ padapter->pnetdev->name);
receive_disconnect23a(padapter, pmlmeinfo->network.MacAddress,
WLAN_REASON_EXPIRATION_CHK);
return;
/* acquire channels from in */
j = 0;
for (i = 0;i<in_num;i++) {
- if (0)
- DBG_8723A(FUNC_ADPT_FMT" "CHAN_FMT"\n", FUNC_ADPT_ARG(padapter), CHAN_ARG(&in[i]));
if (in[i].hw_value && !(in[i].flags & IEEE80211_CHAN_DISABLED)
&& (set_idx = rtw_ch_set_search_ch23a(pmlmeext->channel_set, in[i].hw_value)) >= 0
)
struct mlme_priv *mlmepriv = &padapter->mlmepriv;
if (check_fwstate(mlmepriv, WIFI_STATION_STATE)) {
- DBG_8723A(FUNC_ADPT_FMT" fwstate:0x%08x - WIFI_STATION_STATE\n", FUNC_ADPT_ARG(padapter), get_fwstate(mlmepriv));
+ DBG_8723A("%s(%s): fwstate:0x%08x - WIFI_STATION_STATE\n",
+ __func__, padapter->pnetdev->name,
+ get_fwstate(mlmepriv));
sreset_restore_network_station(padapter);
#ifdef CONFIG_8723AU_AP_MODE
} else if (check_fwstate(mlmepriv, WIFI_AP_STATE)) {
- DBG_8723A(FUNC_ADPT_FMT" fwstate:0x%08x - WIFI_AP_STATE\n", FUNC_ADPT_ARG(padapter), get_fwstate(mlmepriv));
+ DBG_8723A("%s(%s): fwstate:0x%08x - WIFI_AP_STATE\n",
+ __func__, padapter->pnetdev->name,
+ get_fwstate(mlmepriv));
rtw_ap_restore_network(padapter);
#endif
} else if (check_fwstate(mlmepriv, WIFI_ADHOC_STATE)) {
- DBG_8723A(FUNC_ADPT_FMT" fwstate:0x%08x - WIFI_ADHOC_STATE\n", FUNC_ADPT_ARG(padapter), get_fwstate(mlmepriv));
+ DBG_8723A("%s(%s): fwstate:0x%08x - WIFI_ADHOC_STATE\n",
+ __func__, padapter->pnetdev->name,
+ get_fwstate(mlmepriv));
} else {
- DBG_8723A(FUNC_ADPT_FMT" fwstate:0x%08x - ???\n", FUNC_ADPT_ARG(padapter), get_fwstate(mlmepriv));
+ DBG_8723A("%s(%s): fwstate:0x%08x - ???\n", __func__,
+ padapter->pnetdev->name, get_fwstate(mlmepriv));
}
}
if (padapter == NULL)
return;
- DBG_8723A(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter));
+ DBG_8723A("%s(%s)\n", __func__, padapter->pnetdev->name);
if (!rtw_netif_queue_stopped(padapter->pnetdev))
netif_tx_stop_all_queues(padapter->pnetdev);
if (padapter == NULL)
return;
- DBG_8723A(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter));
+ DBG_8723A("%s(%s)\n", __func__, padapter->pnetdev->name);
if (check_fwstate(pmlmepriv, _FW_LINKED)) {
sreset_restore_network_status(padapter);
#define ADPT_ARG(adapter) adapter->pnetdev->name
#define FUNC_NDEV_FMT "%s(%s)"
#define FUNC_NDEV_ARG(ndev) __func__, ndev->name
-#define FUNC_ADPT_FMT "%s(%s)"
-#define FUNC_ADPT_ARG(adapter) __func__, adapter->pnetdev->name
/* Macros for handling unaligned memory accesses */
if (!psta && check_fwstate(pmlmepriv, WIFI_AP_STATE)) { /* group key */
if (param->u.crypt.set_tx == 0) { /* group key */
if (strcmp(param->u.crypt.alg, "WEP") == 0) {
- DBG_8723A("%s, set group_key, WEP\n",
- __func__);
+ DBG_8723A("%s, set group_key, WEP\n", __func__);
memcpy(psecuritypriv->
dot118021XGrpKey[param->u.crypt.idx].
struct cfg80211_ssid *ssids = request->ssids;
bool need_indicate_scan_done = false;
- DBG_8723A(FUNC_ADPT_FMT "\n", FUNC_ADPT_ARG(padapter));
+ DBG_8723A("%s(%s):\n", __func__, padapter->pnetdev->name);
spin_lock_bh(&pwdev_priv->scan_req_lock);
pwdev_priv->scan_request = request;
goto check_need_indicate_scan_done;
}
if (rtw_is_scan_deny(padapter)) {
- DBG_8723A(FUNC_ADPT_FMT ": scan deny\n",
- FUNC_ADPT_ARG(padapter));
+ DBG_8723A("%s(%s): scan deny\n", __func__,
+ padapter->pnetdev->name);
need_indicate_scan_done = true;
goto check_need_indicate_scan_done;
}
if (request->n_channels == 1) {
for (i = 0; i < request->n_channels &&
i < RTW_CHANNEL_SCAN_AMOUNT; i++) {
- DBG_8723A(FUNC_ADPT_FMT CHAN_FMT "\n",
- FUNC_ADPT_ARG(padapter),
+ DBG_8723A("%s:(%s):" CHAN_FMT "\n",
+ __func__, padapter->pnetdev->name,
CHAN_ARG(request->channels[i]));
ch[i].hw_value = request->channels[i]->hw_value;
ch[i].flags = request->channels[i]->flags;
struct rtw_wdev_priv *pwdev_priv = wdev_to_priv(padapter->rtw_wdev);
if (!name) {
- DBG_8723A(FUNC_ADPT_FMT " without specific name\n",
- FUNC_ADPT_ARG(padapter));
+ DBG_8723A("%s(%s): without specific name\n",
+ __func__, padapter->pnetdev->name);
ret = -EINVAL;
goto out;
}
if (pwdev_priv->pmon_ndev) {
- DBG_8723A(FUNC_ADPT_FMT " monitor interface exist: %s\n",
- FUNC_ADPT_ARG(padapter), pwdev_priv->pmon_ndev->name);
+ DBG_8723A("%s(%s): monitor interface exist: %s\n", __func__,
+ padapter->pnetdev->name, pwdev_priv->pmon_ndev->name);
ret = -EBUSY;
goto out;
}
mon_ndev = alloc_etherdev(sizeof(struct rtw_adapter));
if (!mon_ndev) {
- DBG_8723A(FUNC_ADPT_FMT " allocate ndev fail\n",
- FUNC_ADPT_ARG(padapter));
+ DBG_8723A("%s(%s): allocate ndev fail\n", __func__,
+ padapter->pnetdev->name);
ret = -ENOMEM;
goto out;
}
/* wdev */
mon_wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL);
if (!mon_wdev) {
- DBG_8723A(FUNC_ADPT_FMT " allocate mon_wdev fail\n",
- FUNC_ADPT_ARG(padapter));
+ DBG_8723A("%s(%s): allocate mon_wdev fail\n", __func__,
+ padapter->pnetdev->name);
ret = -ENOMEM;
goto out;
}
struct net_device *ndev = NULL;
struct rtw_adapter *padapter = wiphy_to_adapter(wiphy);
- DBG_8723A(FUNC_ADPT_FMT " wiphy:%s, name:%s, type:%d\n",
- FUNC_ADPT_ARG(padapter), wiphy_name(wiphy), name, type);
+ DBG_8723A("%s(%s): wiphy:%s, name:%s, type:%d\n", __func__,
+ padapter->pnetdev->name, wiphy_name(wiphy), name, type);
switch (type) {
case NL80211_IFTYPE_ADHOC:
break;
}
- DBG_8723A(FUNC_ADPT_FMT " ndev:%p, ret:%d\n", FUNC_ADPT_ARG(padapter),
+ DBG_8723A("%s(%s): ndev:%p, ret:%d\n", __func__,
+ padapter->pnetdev->name,
ndev, ret);
return ndev ? ndev->ieee80211_ptr : ERR_PTR(ret);
struct wlan_bssid_ex *pbss_network_ext =
&adapter->mlmeextpriv.mlmext_info.network;
- if (0)
- DBG_8723A(FUNC_ADPT_FMT
- " ssid:(%s,%d), from ie:(%s,%d)\n",
- FUNC_ADPT_ARG(adapter), settings->ssid,
- (int)settings->ssid_len,
- pbss_network->Ssid.ssid,
- pbss_network->Ssid.ssid_len);
-
memcpy(pbss_network->Ssid.ssid, (void *)settings->ssid,
settings->ssid_len);
pbss_network->Ssid.ssid_len = settings->ssid_len;
memcpy(pbss_network_ext->Ssid.ssid, (void *)settings->ssid,
settings->ssid_len);
pbss_network_ext->Ssid.ssid_len = settings->ssid_len;
-
- if (0)
- DBG_8723A(FUNC_ADPT_FMT
- " after ssid:(%s,%d), (%s,%d)\n",
- FUNC_ADPT_ARG(adapter),
- pbss_network->Ssid.ssid,
- pbss_network->Ssid.ssid_len,
- pbss_network_ext->Ssid.ssid,
- pbss_network_ext->Ssid.ssid_len);
}
return ret;
/* cookie generation */
*cookie = (unsigned long)buf;
- DBG_8723A(FUNC_ADPT_FMT " len =%zu, ch =%d"
- "\n", FUNC_ADPT_ARG(padapter), len, tx_ch);
+ DBG_8723A("%s(%s): len =%zu, ch =%d\n", __func__,
+ padapter->pnetdev->name, len, tx_ch);
/* indicate ack before issue frame to avoid racing with rsp frame */
rtw_cfg80211_mgmt_tx_status(padapter, *cookie, buf, len, ack,
GFP_KERNEL);
if (rtw_action_frame_parse23a(buf, len, &category, &action) == false) {
- DBG_8723A(FUNC_ADPT_FMT " frame_control:0x%x\n",
- FUNC_ADPT_ARG(padapter),
+ DBG_8723A("%s(%s): frame_control:0x%x\n", __func__,
+ padapter->pnetdev->name,
le16_to_cpu(hdr->frame_control));
goto exit;
}
} while (dump_cnt < dump_limit && tx_ret != _SUCCESS);
if (tx_ret != _SUCCESS || dump_cnt > 1) {
- DBG_8723A(FUNC_ADPT_FMT " %s (%d/%d) in %d ms\n",
- FUNC_ADPT_ARG(padapter),
+ DBG_8723A("%s(%s): %s (%d/%d) in %d ms\n",
+ __func__, padapter->pnetdev->name,
tx_ret == _SUCCESS ? "OK" : "FAIL", dump_cnt,
dump_limit, jiffies_to_msecs(jiffies - start));
}
case P2P_INVIT_RESP:
if (pwdev_priv->invit_info.flags & BIT(0)
&& pwdev_priv->invit_info.status == 0) {
- DBG_8723A(FUNC_ADPT_FMT " agree with invitation of "
+ DBG_8723A("%s(%s): agree with invitation of "
"persistent group\n",
- FUNC_ADPT_ARG(padapter));
+ __func__, padapter->pnetdev->name);
rtw_set_scan_deny(padapter, 5000);
rtw_pwr_wakeup_ex(padapter, 5000);
rtw_clear_scan_deny(padapter);