Commit ea072786 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman

staging: rtl8723au: Remove uses of MAC_FMT and MAC_ARG

Use the standard vsprintf kernel extension to format
mac addresses.

This reduces object code size a bit.

Miscellanea:

o Coalesce formats
o Realign arguments
o Remove the now unused MAC_FMT and MAC_ARG #defines
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 92def781
...@@ -260,15 +260,17 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter) ...@@ -260,15 +260,17 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter)
list_del_init(&psta->asoc_list); list_del_init(&psta->asoc_list);
pstapriv->asoc_list_cnt--; pstapriv->asoc_list_cnt--;
DBG_8723A("asoc expire "MAC_FMT", state = 0x%x\n", MAC_ARG(psta->hwaddr), psta->state); DBG_8723A("asoc expire %pM, state = 0x%x\n",
psta->hwaddr, psta->state);
updated = ap_free_sta23a(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING); updated = ap_free_sta23a(padapter, psta, false, WLAN_REASON_DEAUTH_LEAVING);
} else { } else {
/* TODO: Aging mechanism to digest frames in sleep_q to avoid running out of xmitframe */ /* TODO: Aging mechanism to digest frames in sleep_q to avoid running out of xmitframe */
if (psta->sleepq_len > (NR_XMITFRAME/pstapriv->asoc_list_cnt) if (psta->sleepq_len > (NR_XMITFRAME/pstapriv->asoc_list_cnt)
&& padapter->xmitpriv.free_xmitframe_cnt < ((NR_XMITFRAME/pstapriv->asoc_list_cnt)/2) && padapter->xmitpriv.free_xmitframe_cnt < ((NR_XMITFRAME/pstapriv->asoc_list_cnt)/2)
) { ) {
DBG_8723A("%s sta:"MAC_FMT", sleepq_len:%u, free_xmitframe_cnt:%u, asoc_list_cnt:%u, clear sleep_q\n", __func__, DBG_8723A("%s sta:%pM, sleepq_len:%u, free_xmitframe_cnt:%u, asoc_list_cnt:%u, clear sleep_q\n",
MAC_ARG(psta->hwaddr), __func__,
psta->hwaddr,
psta->sleepq_len, psta->sleepq_len,
padapter->xmitpriv.free_xmitframe_cnt, padapter->xmitpriv.free_xmitframe_cnt,
pstapriv->asoc_list_cnt); pstapriv->asoc_list_cnt);
...@@ -305,7 +307,8 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter) ...@@ -305,7 +307,8 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter)
psta->keep_alive_trycnt++; psta->keep_alive_trycnt++;
if (ret == _SUCCESS) { if (ret == _SUCCESS) {
DBG_8723A("asoc check, sta(" MAC_FMT ") is alive\n", MAC_ARG(psta->hwaddr)); DBG_8723A("asoc check, sta(%pM) is alive\n",
psta->hwaddr);
psta->expire_to = pstapriv->expire_to; psta->expire_to = pstapriv->expire_to;
psta->keep_alive_trycnt = 0; psta->keep_alive_trycnt = 0;
continue; continue;
...@@ -317,7 +320,8 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter) ...@@ -317,7 +320,8 @@ void expire_timeout_chk23a(struct rtw_adapter *padapter)
psta->keep_alive_trycnt = 0; psta->keep_alive_trycnt = 0;
DBG_8723A("asoc expire "MAC_FMT", state = 0x%x\n", MAC_ARG(psta->hwaddr), psta->state); DBG_8723A("asoc expire %pM, state = 0x%x\n",
psta->hwaddr, psta->state);
spin_lock_bh(&pstapriv->asoc_list_lock); spin_lock_bh(&pstapriv->asoc_list_lock);
if (!list_empty(&psta->asoc_list)) { if (!list_empty(&psta->asoc_list)) {
list_del_init(&psta->asoc_list); list_del_init(&psta->asoc_list);
...@@ -1044,7 +1048,7 @@ int rtw_acl_add_sta23a(struct rtw_adapter *padapter, u8 *addr) ...@@ -1044,7 +1048,7 @@ int rtw_acl_add_sta23a(struct rtw_adapter *padapter, u8 *addr)
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list; struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
struct rtw_queue *pacl_node_q = &pacl_list->acl_node_q; struct rtw_queue *pacl_node_q = &pacl_list->acl_node_q;
DBG_8723A("%s(acl_num =%d) =" MAC_FMT "\n", __func__, pacl_list->num, MAC_ARG(addr)); DBG_8723A("%s(acl_num =%d) =%pM\n", __func__, pacl_list->num, addr);
if ((NUM_ACL-1) < pacl_list->num) if ((NUM_ACL-1) < pacl_list->num)
return -1; return -1;
...@@ -1476,8 +1480,8 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info ...@@ -1476,8 +1480,8 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info
if (psta->flags & WLAN_STA_HT) { if (psta->flags & WLAN_STA_HT) {
u16 ht_capab = le16_to_cpu(psta->htpriv.ht_cap.cap_info); u16 ht_capab = le16_to_cpu(psta->htpriv.ht_cap.cap_info);
DBG_8723A("HT: STA " MAC_FMT " HT Capabilities Info: 0x%04x\n", DBG_8723A("HT: STA %pM HT Capabilities Info: 0x%04x\n",
MAC_ARG(psta->hwaddr), ht_capab); psta->hwaddr, ht_capab);
if (psta->no_ht_set) { if (psta->no_ht_set) {
psta->no_ht_set = 0; psta->no_ht_set = 0;
...@@ -1489,10 +1493,9 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info ...@@ -1489,10 +1493,9 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info
psta->no_ht_gf_set = 1; psta->no_ht_gf_set = 1;
pmlmepriv->num_sta_ht_no_gf++; pmlmepriv->num_sta_ht_no_gf++;
} }
DBG_8723A("%s STA " MAC_FMT " - no " DBG_8723A("%s STA %pM - no greenfield, num of non-gf stations %d\n",
"greenfield, num of non-gf stations %d\n", __func__, psta->hwaddr,
__func__, MAC_ARG(psta->hwaddr), pmlmepriv->num_sta_ht_no_gf);
pmlmepriv->num_sta_ht_no_gf);
} }
if ((ht_capab & IEEE80211_HT_CAP_SUP_WIDTH_20_40) == 0) { if ((ht_capab & IEEE80211_HT_CAP_SUP_WIDTH_20_40) == 0) {
...@@ -1500,10 +1503,9 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info ...@@ -1500,10 +1503,9 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info
psta->ht_20mhz_set = 1; psta->ht_20mhz_set = 1;
pmlmepriv->num_sta_ht_20mhz++; pmlmepriv->num_sta_ht_20mhz++;
} }
DBG_8723A("%s STA " MAC_FMT " - 20 MHz HT, " DBG_8723A("%s STA %pM - 20 MHz HT, num of 20MHz HT STAs %d\n",
"num of 20MHz HT STAs %d\n", __func__, psta->hwaddr,
__func__, MAC_ARG(psta->hwaddr), pmlmepriv->num_sta_ht_20mhz);
pmlmepriv->num_sta_ht_20mhz);
} }
} else { } else {
...@@ -1512,10 +1514,9 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info ...@@ -1512,10 +1514,9 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info
pmlmepriv->num_sta_no_ht++; pmlmepriv->num_sta_no_ht++;
} }
if (pmlmepriv->htpriv.ht_option) { if (pmlmepriv->htpriv.ht_option) {
DBG_8723A("%s STA " MAC_FMT DBG_8723A("%s STA %pM - no HT, num of non-HT stations %d\n",
" - no HT, num of non-HT stations %d\n", __func__, psta->hwaddr,
__func__, MAC_ARG(psta->hwaddr), pmlmepriv->num_sta_no_ht);
pmlmepriv->num_sta_no_ht);
} }
} }
......
...@@ -238,9 +238,9 @@ static void _rtw_roaming(struct rtw_adapter *padapter, ...@@ -238,9 +238,9 @@ static void _rtw_roaming(struct rtw_adapter *padapter,
pnetwork = &pmlmepriv->cur_network; pnetwork = &pmlmepriv->cur_network;
if (padapter->mlmepriv.to_roaming > 0) { if (padapter->mlmepriv.to_roaming > 0) {
DBG_8723A("roaming from %s("MAC_FMT"), length:%d\n", DBG_8723A("roaming from %s(%pM), length:%d\n",
pnetwork->network.Ssid.ssid, pnetwork->network.Ssid.ssid,
MAC_ARG(pnetwork->network.MacAddress), pnetwork->network.MacAddress,
pnetwork->network.Ssid.ssid_len); pnetwork->network.Ssid.ssid_len);
memcpy(&pmlmepriv->assoc_ssid, &pnetwork->network.Ssid, memcpy(&pmlmepriv->assoc_ssid, &pnetwork->network.Ssid,
sizeof(struct cfg80211_ssid)); sizeof(struct cfg80211_ssid));
...@@ -747,8 +747,8 @@ void rtw_free_assoc_resources23a(struct rtw_adapter *adapter, ...@@ -747,8 +747,8 @@ void rtw_free_assoc_resources23a(struct rtw_adapter *adapter,
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_,
("+rtw_free_assoc_resources23a\n")); ("+rtw_free_assoc_resources23a\n"));
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
("tgt_network->network.MacAddress="MAC_FMT" ssid=%s\n", ("tgt_network->network.MacAddress=%pM ssid=%s\n",
MAC_ARG(tgt_network->network.MacAddress), tgt_network->network.MacAddress,
tgt_network->network.Ssid.ssid)); tgt_network->network.Ssid.ssid));
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_AP_STATE)) { if (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_AP_STATE)) {
...@@ -991,8 +991,9 @@ rtw_joinbss_update_network23a(struct rtw_adapter *padapter, ...@@ -991,8 +991,9 @@ rtw_joinbss_update_network23a(struct rtw_adapter *padapter,
DBG_8723A("%s\n", __func__); DBG_8723A("%s\n", __func__);
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
("\nfw_state:%x, BSSID:"MAC_FMT"\n", get_fwstate(pmlmepriv), ("\nfw_state:%x, BSSID:%pM\n",
MAC_ARG(pnetwork->network.MacAddress))); get_fwstate(pmlmepriv),
pnetwork->network.MacAddress));
/* why not use ptarget_wlan?? */ /* why not use ptarget_wlan?? */
memcpy(&cur_network->network, &pnetwork->network, memcpy(&cur_network->network, &pnetwork->network,
...@@ -1323,8 +1324,7 @@ void rtw_stadel_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf) ...@@ -1323,8 +1324,7 @@ void rtw_stadel_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf)
else else
mac_id = pstadel->mac_id; mac_id = pstadel->mac_id;
DBG_8723A("%s(mac_id=%d)=" MAC_FMT "\n", __func__, mac_id, DBG_8723A("%s(mac_id=%d)=%pM\n", __func__, mac_id, pstadel->macaddr);
MAC_ARG(pstadel->macaddr));
if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) if (check_fwstate(pmlmepriv, WIFI_AP_STATE))
return; return;
...@@ -1575,13 +1575,12 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv, ...@@ -1575,13 +1575,12 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv,
} }
if (updated) { if (updated) {
DBG_8723A("[by_bssid:%u][assoc_ssid:%s][to_roaming:%u] " DBG_8723A("[by_bssid:%u][assoc_ssid:%s][to_roaming:%u] new candidate: %s(%pM) rssi:%d\n",
"new candidate: %s("MAC_FMT") rssi:%d\n",
pmlmepriv->assoc_by_bssid, pmlmepriv->assoc_by_bssid,
pmlmepriv->assoc_ssid.ssid, pmlmepriv->assoc_ssid.ssid,
adapter->mlmepriv.to_roaming, adapter->mlmepriv.to_roaming,
(*candidate)->network.Ssid.ssid, (*candidate)->network.Ssid.ssid,
MAC_ARG((*candidate)->network.MacAddress), (*candidate)->network.MacAddress,
(int)(*candidate)->network.Rssi); (int)(*candidate)->network.Rssi);
} }
...@@ -1732,9 +1731,10 @@ int rtw_select_and_join_from_scanned_queue23a(struct mlme_priv *pmlmepriv) ...@@ -1732,9 +1731,10 @@ int rtw_select_and_join_from_scanned_queue23a(struct mlme_priv *pmlmepriv)
ret = _FAIL; ret = _FAIL;
goto exit; goto exit;
} else { } else {
DBG_8723A("%s: candidate: %s("MAC_FMT", ch:%u)\n", __func__, DBG_8723A("%s: candidate: %s(%pM, ch:%u)\n",
__func__,
candidate->network.Ssid.ssid, candidate->network.Ssid.ssid,
MAC_ARG(candidate->network.MacAddress), candidate->network.MacAddress,
candidate->network.DSConfig); candidate->network.DSConfig);
} }
......
...@@ -968,8 +968,7 @@ OnAuth23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame) ...@@ -968,8 +968,7 @@ OnAuth23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
pstat = rtw_get_stainfo23a(pstapriv, sa); pstat = rtw_get_stainfo23a(pstapriv, sa);
if (!pstat) { if (!pstat) {
/* allocate a new one */ /* allocate a new one */
DBG_8723A("going to alloc stainfo for sa ="MAC_FMT"\n", DBG_8723A("going to alloc stainfo for sa =%pM\n", sa);
MAC_ARG(sa));
pstat = rtw_alloc_stainfo23a(pstapriv, sa, GFP_ATOMIC); pstat = rtw_alloc_stainfo23a(pstapriv, sa, GFP_ATOMIC);
if (!pstat) { if (!pstat) {
DBG_8723A(" Exceed the upper limit of supported " DBG_8723A(" Exceed the upper limit of supported "
...@@ -1396,8 +1395,8 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame) ...@@ -1396,8 +1395,8 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
/* now parse all ieee802_11 ie to point to elems */ /* now parse all ieee802_11 ie to point to elems */
if (rtw_validate_frame_ies(pos, left)) { if (rtw_validate_frame_ies(pos, left)) {
DBG_8723A("STA " MAC_FMT " sent invalid association request\n", DBG_8723A("STA %pM sent invalid association request\n",
MAC_ARG(pstat->hwaddr)); pstat->hwaddr);
status = WLAN_STATUS_UNSPECIFIED_FAILURE; status = WLAN_STATUS_UNSPECIFIED_FAILURE;
goto OnAssocReq23aFail; goto OnAssocReq23aFail;
} }
...@@ -1407,8 +1406,8 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame) ...@@ -1407,8 +1406,8 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
p = cfg80211_find_ie(WLAN_EID_SSID, pos, left); p = cfg80211_find_ie(WLAN_EID_SSID, pos, left);
if (!p || p[1] == 0) { if (!p || p[1] == 0) {
/* broadcast ssid, however it is not allowed in assocreq */ /* broadcast ssid, however it is not allowed in assocreq */
DBG_8723A("STA " MAC_FMT " sent invalid association request " DBG_8723A("STA %pM sent invalid association request lacking an SSID\n",
"lacking an SSID\n", MAC_ARG(pstat->hwaddr)); pstat->hwaddr);
status = WLAN_STATUS_UNSPECIFIED_FAILURE; status = WLAN_STATUS_UNSPECIFIED_FAILURE;
goto OnAssocReq23aFail; goto OnAssocReq23aFail;
} else { } else {
...@@ -1537,9 +1536,8 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame) ...@@ -1537,9 +1536,8 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
int copy_len; int copy_len;
if (psecuritypriv->wpa_psk == 0) { if (psecuritypriv->wpa_psk == 0) {
DBG_8723A("STA " MAC_FMT ": WPA/RSN IE in association " DBG_8723A("STA %pM: WPA/RSN IE in association request, but AP don't support WPA/RSN\n",
"request, but AP don't support WPA/RSN\n", pstat->hwaddr);
MAC_ARG(pstat->hwaddr));
status = WLAN_STATUS_INVALID_IE; status = WLAN_STATUS_INVALID_IE;
...@@ -1645,8 +1643,8 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame) ...@@ -1645,8 +1643,8 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
if (pstat->flags & WLAN_STA_HT && if (pstat->flags & WLAN_STA_HT &&
(pstat->wpa2_pairwise_cipher & WPA_CIPHER_TKIP || (pstat->wpa2_pairwise_cipher & WPA_CIPHER_TKIP ||
pstat->wpa_pairwise_cipher & WPA_CIPHER_TKIP)) { pstat->wpa_pairwise_cipher & WPA_CIPHER_TKIP)) {
DBG_8723A("HT: " MAC_FMT " tried to use TKIP with HT " DBG_8723A("HT: %pM tried to use TKIP with HT association\n",
"association\n", MAC_ARG(pstat->hwaddr)); pstat->hwaddr);
/* status = WLAN_STATUS_CIPHER_REJECTED_PER_POLICY; */ /* status = WLAN_STATUS_CIPHER_REJECTED_PER_POLICY; */
/* goto OnAssocReq23aFail; */ /* goto OnAssocReq23aFail; */
...@@ -2806,17 +2804,16 @@ static int issue_probereq_ex(struct rtw_adapter *padapter, ...@@ -2806,17 +2804,16 @@ static int issue_probereq_ex(struct rtw_adapter *padapter,
if (try_cnt && wait_ms) { if (try_cnt && wait_ms) {
if (da) if (da)
DBG_8723A("%s(%s): to "MAC_FMT", ch:%u%s, %d/%d " DBG_8723A("%s(%s): to %pM, ch:%u%s, %d/%d in %u ms\n",
"in %u ms\n", __func__, __func__, padapter->pnetdev->name,
padapter->pnetdev->name, da, rtw_get_oper_ch23a(padapter),
MAC_ARG(da), rtw_get_oper_ch23a(padapter), ret == _SUCCESS ? ", acked" : "", i, try_cnt,
ret == _SUCCESS?", acked":"", i, try_cnt,
jiffies_to_msecs(jiffies - start)); jiffies_to_msecs(jiffies - start));
else else
DBG_8723A("%s(%s):, ch:%u%s, %d/%d in %u ms\n", DBG_8723A("%s(%s):, ch:%u%s, %d/%d in %u ms\n",
__func__, padapter->pnetdev->name, __func__, padapter->pnetdev->name,
rtw_get_oper_ch23a(padapter), rtw_get_oper_ch23a(padapter),
ret == _SUCCESS?", acked":"", i, try_cnt, ret == _SUCCESS ? ", acked" : "", i, try_cnt,
jiffies_to_msecs(jiffies - start)); jiffies_to_msecs(jiffies - start));
} }
exit: exit:
...@@ -3460,17 +3457,16 @@ int issue_nulldata23a(struct rtw_adapter *padapter, unsigned char *da, ...@@ -3460,17 +3457,16 @@ int issue_nulldata23a(struct rtw_adapter *padapter, unsigned char *da,
if (try_cnt && wait_ms) { if (try_cnt && wait_ms) {
if (da) if (da)
DBG_8723A("%s(%s): to "MAC_FMT", ch:%u%s, %d/%d " DBG_8723A("%s(%s): to %pM, ch:%u%s, %d/%d in %u ms\n",
"in %u ms\n", __func__, __func__, padapter->pnetdev->name,
padapter->pnetdev->name, da, rtw_get_oper_ch23a(padapter),
MAC_ARG(da), rtw_get_oper_ch23a(padapter), ret == _SUCCESS ? ", acked" : "", i, try_cnt,
ret == _SUCCESS?", acked":"", i, try_cnt,
jiffies_to_msecs(jiffies - start)); jiffies_to_msecs(jiffies - start));
else else
DBG_8723A("%s(%s):, ch:%u%s, %d/%d in %u ms\n", DBG_8723A("%s(%s):, ch:%u%s, %d/%d in %u ms\n",
__func__, padapter->pnetdev->name, __func__, padapter->pnetdev->name,
rtw_get_oper_ch23a(padapter), rtw_get_oper_ch23a(padapter),
ret == _SUCCESS?", acked":"", i, try_cnt, ret == _SUCCESS ? ", acked" : "", i, try_cnt,
jiffies_to_msecs(jiffies - start)); jiffies_to_msecs(jiffies - start));
} }
exit: exit:
...@@ -3587,17 +3583,16 @@ int issue_qos_nulldata23a(struct rtw_adapter *padapter, unsigned char *da, ...@@ -3587,17 +3583,16 @@ int issue_qos_nulldata23a(struct rtw_adapter *padapter, unsigned char *da,
if (try_cnt && wait_ms) { if (try_cnt && wait_ms) {
if (da) if (da)
DBG_8723A("%s(%s): to "MAC_FMT", ch:%u%s, %d/%d " DBG_8723A("%s(%s): to %pM, ch:%u%s, %d/%d in %u ms\n",
"in %u ms\n", __func__, __func__, padapter->pnetdev->name,
padapter->pnetdev->name, da, rtw_get_oper_ch23a(padapter),
MAC_ARG(da), rtw_get_oper_ch23a(padapter), ret == _SUCCESS ? ", acked" : "", i, try_cnt,
ret == _SUCCESS?", acked":"", i, try_cnt,
jiffies_to_msecs(jiffies - start)); jiffies_to_msecs(jiffies - start));
else else
DBG_8723A("%s(%s):, ch:%u%s, %d/%d in %u ms\n", DBG_8723A("%s(%s):, ch:%u%s, %d/%d in %u ms\n",
__func__, padapter->pnetdev->name, __func__, padapter->pnetdev->name,
rtw_get_oper_ch23a(padapter), rtw_get_oper_ch23a(padapter),
ret == _SUCCESS?", acked":"", i, try_cnt, ret == _SUCCESS ? ", acked" : "", i, try_cnt,
jiffies_to_msecs(jiffies - start)); jiffies_to_msecs(jiffies - start));
} }
exit: exit:
...@@ -3615,7 +3610,7 @@ static int _issue_deauth(struct rtw_adapter *padapter, unsigned char *da, ...@@ -3615,7 +3610,7 @@ static int _issue_deauth(struct rtw_adapter *padapter, unsigned char *da,
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
int ret = _FAIL; int ret = _FAIL;
/* DBG_8723A("%s to "MAC_FMT"\n", __func__, MAC_ARG(da)); */ /* DBG_8723A("%s to %pM\n", __func__, da); */
pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); pmgntframe = alloc_mgtxmitframe23a(pxmitpriv);
if (!pmgntframe) if (!pmgntframe)
...@@ -3660,7 +3655,7 @@ static int _issue_deauth(struct rtw_adapter *padapter, unsigned char *da, ...@@ -3660,7 +3655,7 @@ static int _issue_deauth(struct rtw_adapter *padapter, unsigned char *da,
int issue_deauth23a(struct rtw_adapter *padapter, unsigned char *da, int issue_deauth23a(struct rtw_adapter *padapter, unsigned char *da,
unsigned short reason) unsigned short reason)
{ {
DBG_8723A("%s to "MAC_FMT"\n", __func__, MAC_ARG(da)); DBG_8723A("%s to %pM\n", __func__, da);
return _issue_deauth(padapter, da, reason, false); return _issue_deauth(padapter, da, reason, false);
} }
...@@ -3692,17 +3687,16 @@ static int issue_deauth_ex(struct rtw_adapter *padapter, u8 *da, ...@@ -3692,17 +3687,16 @@ static int issue_deauth_ex(struct rtw_adapter *padapter, u8 *da,
if (try_cnt && wait_ms) { if (try_cnt && wait_ms) {
if (da) if (da)
DBG_8723A("%s(%s): to "MAC_FMT", ch:%u%s, %d/%d " DBG_8723A("%s(%s): to %pM, ch:%u%s, %d/%d in %u ms\n",
"in %u ms\n", __func__, __func__, padapter->pnetdev->name,
padapter->pnetdev->name, da, rtw_get_oper_ch23a(padapter),
MAC_ARG(da), rtw_get_oper_ch23a(padapter), ret == _SUCCESS ? ", acked" : "", i, try_cnt,
ret == _SUCCESS?", acked":"", i, try_cnt,
jiffies_to_msecs(jiffies - start)); jiffies_to_msecs(jiffies - start));
else else
DBG_8723A("%s(%s):, ch:%u%s, %d/%d in %u ms\n", DBG_8723A("%s(%s):, ch:%u%s, %d/%d in %u ms\n",
__func__, padapter->pnetdev->name, __func__, padapter->pnetdev->name,
rtw_get_oper_ch23a(padapter), rtw_get_oper_ch23a(padapter),
ret == _SUCCESS?", acked":"", i, try_cnt, ret == _SUCCESS ? ", acked" : "", i, try_cnt,
jiffies_to_msecs(jiffies - start)); jiffies_to_msecs(jiffies - start));
} }
exit: exit:
...@@ -3719,8 +3713,8 @@ void issue_action_spct_ch_switch23a(struct rtw_adapter *padapter, ...@@ -3719,8 +3713,8 @@ void issue_action_spct_ch_switch23a(struct rtw_adapter *padapter,
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
DBG_8723A("%s(%s): ra ="MAC_FMT", ch:%u, offset:%u\n", __func__, DBG_8723A("%s(%s): ra=%pM, ch:%u, offset:%u\n",
padapter->pnetdev->name, MAC_ARG(ra), new_ch, ch_offset); __func__, padapter->pnetdev->name, ra, new_ch, ch_offset);
pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); pmgntframe = alloc_mgtxmitframe23a(pxmitpriv);
if (!pmgntframe) if (!pmgntframe)
......
...@@ -301,10 +301,7 @@ int recvframe_chkmic(struct rtw_adapter *adapter, ...@@ -301,10 +301,7 @@ int recvframe_chkmic(struct rtw_adapter *adapter,
RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, RT_TRACE(_module_rtl871x_recv_c_, _drv_info_,
("\n recvframe_chkmic:prxattrib->encrypt == WLAN_CIPHER_SUITE_TKIP\n")); ("\n recvframe_chkmic:prxattrib->encrypt == WLAN_CIPHER_SUITE_TKIP\n"));
RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, RT_TRACE(_module_rtl871x_recv_c_, _drv_info_,
("\n recvframe_chkmic:da = 0x%02x:0x%02x:0x%02x:0x%02x:" ("\n recvframe_chkmic:da = %pM\n", prxattrib->ra));
"0x%02x:0x%02x\n", prxattrib->ra[0],
prxattrib->ra[1], prxattrib->ra[2], prxattrib->ra[3],
prxattrib->ra[4], prxattrib->ra[5]));
/* calculate mic code */ /* calculate mic code */
if (stainfo != NULL) { if (stainfo != NULL) {
...@@ -406,12 +403,8 @@ int recvframe_chkmic(struct rtw_adapter *adapter, ...@@ -406,12 +403,8 @@ int recvframe_chkmic(struct rtw_adapter *adapter,
prxattrib->hdrlen)); prxattrib->hdrlen));
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
("ra = 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%." ("ra = %pM psecuritypriv->binstallGrpkey =%d ",
"2x 0x%.2x psecuritypriv->" prxattrib->ra,
"binstallGrpkey =%d ",
prxattrib->ra[0], prxattrib->ra[1],
prxattrib->ra[2], prxattrib->ra[3],
prxattrib->ra[4], prxattrib->ra[5],
psecuritypriv->binstallGrpkey)); psecuritypriv->binstallGrpkey));
/* double check key_index for some timing /* double check key_index for some timing
...@@ -887,8 +880,8 @@ int ap2sta_data_frame(struct rtw_adapter *adapter, ...@@ -887,8 +880,8 @@ int ap2sta_data_frame(struct rtw_adapter *adapter,
/* da should be for me */ /* da should be for me */
if (!ether_addr_equal(myhwaddr, pattrib->dst) && !bmcast) { if (!ether_addr_equal(myhwaddr, pattrib->dst) && !bmcast) {
RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, RT_TRACE(_module_rtl871x_recv_c_, _drv_info_,
(" ap2sta_data_frame: compare DA fail; DA =" (" ap2sta_data_frame: compare DA fail; DA=%pM\n",
MAC_FMT"\n", MAC_ARG(pattrib->dst))); pattrib->dst));
ret = _FAIL; ret = _FAIL;
goto exit; goto exit;
} }
...@@ -898,15 +891,14 @@ int ap2sta_data_frame(struct rtw_adapter *adapter, ...@@ -898,15 +891,14 @@ int ap2sta_data_frame(struct rtw_adapter *adapter,
ether_addr_equal(mybssid, "\x0\x0\x0\x0\x0\x0") || ether_addr_equal(mybssid, "\x0\x0\x0\x0\x0\x0") ||
!ether_addr_equal(pattrib->bssid, mybssid)) { !ether_addr_equal(pattrib->bssid, mybssid)) {
RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, RT_TRACE(_module_rtl871x_recv_c_, _drv_info_,
(" ap2sta_data_frame: compare BSSID fail ; " (" ap2sta_data_frame: compare BSSID fail ; BSSID=%pM\n",
"BSSID ="MAC_FMT"\n", MAC_ARG(pattrib->bssid))); pattrib->bssid));
RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, RT_TRACE(_module_rtl871x_recv_c_, _drv_info_,
("mybssid ="MAC_FMT"\n", MAC_ARG(mybssid))); ("mybssid=%pM\n", mybssid));
if (!bmcast) { if (!bmcast) {
DBG_8723A("issue_deauth23a to the nonassociated " DBG_8723A("issue_deauth23a to the nonassociated ap=%pM for the reason(7)\n",
"ap =" MAC_FMT " for the reason(7)\n", pattrib->bssid);
MAC_ARG(pattrib->bssid));
issue_deauth23a(adapter, pattrib->bssid, issue_deauth23a(adapter, pattrib->bssid,
WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA); WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA);
} }
...@@ -964,9 +956,8 @@ int ap2sta_data_frame(struct rtw_adapter *adapter, ...@@ -964,9 +956,8 @@ int ap2sta_data_frame(struct rtw_adapter *adapter,
if (ether_addr_equal(myhwaddr, pattrib->dst) && !bmcast) { if (ether_addr_equal(myhwaddr, pattrib->dst) && !bmcast) {
*psta = rtw_get_stainfo23a(pstapriv, pattrib->bssid); *psta = rtw_get_stainfo23a(pstapriv, pattrib->bssid);
if (*psta == NULL) { if (*psta == NULL) {
DBG_8723A("issue_deauth23a to the ap =" MAC_FMT DBG_8723A("issue_deauth23a to the ap=%pM for the reason(7)\n",
" for the reason(7)\n", pattrib->bssid);
MAC_ARG(pattrib->bssid));
issue_deauth23a(adapter, pattrib->bssid, issue_deauth23a(adapter, pattrib->bssid,
WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA); WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA);
...@@ -1011,9 +1002,8 @@ int sta2ap_data_frame(struct rtw_adapter *adapter, ...@@ -1011,9 +1002,8 @@ int sta2ap_data_frame(struct rtw_adapter *adapter,
if (*psta == NULL) { if (*psta == NULL) {
RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
("can't get psta under AP_MODE; drop pkt\n")); ("can't get psta under AP_MODE; drop pkt\n"));
DBG_8723A("issue_deauth23a to sta =" MAC_FMT DBG_8723A("issue_deauth23a to sta=%pM for the reason(7)\n",
" for the reason(7)\n", pattrib->src);
MAC_ARG(pattrib->src));
issue_deauth23a(adapter, pattrib->src, issue_deauth23a(adapter, pattrib->src,
WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA); WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA);
...@@ -1043,8 +1033,8 @@ int sta2ap_data_frame(struct rtw_adapter *adapter, ...@@ -1043,8 +1033,8 @@ int sta2ap_data_frame(struct rtw_adapter *adapter,
ret = RTW_RX_HANDLED; ret = RTW_RX_HANDLED;
goto exit; goto exit;
} }
DBG_8723A("issue_deauth23a to sta =" MAC_FMT " for the reason(7)\n", DBG_8723A("issue_deauth23a to sta=%pM for the reason(7)\n",
MAC_ARG(pattrib->src)); pattrib->src);
issue_deauth23a(adapter, pattrib->src, issue_deauth23a(adapter, pattrib->src,
WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA); WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA);
ret = RTW_RX_HANDLED; ret = RTW_RX_HANDLED;
......
...@@ -876,9 +876,9 @@ int rtw_check_bcn_info23a(struct rtw_adapter *Adapter, ...@@ -876,9 +876,9 @@ int rtw_check_bcn_info23a(struct rtw_adapter *Adapter,
} }
if (!ether_addr_equal(cur_network->network.MacAddress, mgmt->bssid)) { if (!ether_addr_equal(cur_network->network.MacAddress, mgmt->bssid)) {
DBG_8723A("%s: linked but recv other bssid bcn" DBG_8723A("%s: linked but recv other bssid bcn %pM %pM\n",
MAC_FMT MAC_FMT "\n", __func__, MAC_ARG(mgmt->bssid), __func__, mgmt->bssid,
MAC_ARG(cur_network->network.MacAddress)); cur_network->network.MacAddress);
return _FAIL; return _FAIL;
} }
......
...@@ -493,8 +493,8 @@ static int update_attrib(struct rtw_adapter *padapter, ...@@ -493,8 +493,8 @@ static int update_attrib(struct rtw_adapter *padapter,
psta = rtw_get_stainfo23a(pstapriv, pattrib->ra); psta = rtw_get_stainfo23a(pstapriv, pattrib->ra);
if (psta == NULL) { /* if we cannot get psta => drrp the pkt */ if (psta == NULL) { /* if we cannot get psta => drrp the pkt */
RT_TRACE(_module_rtl871x_xmit_c_, _drv_alert_, RT_TRACE(_module_rtl871x_xmit_c_, _drv_alert_,
("\nupdate_attrib => get sta_info fail, ra:" ("\nupdate_attrib => get sta_info fail, ra:%pM\n",
MAC_FMT"\n", MAC_ARG(pattrib->ra))); pattrib->ra));
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) && } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) &&
...@@ -511,8 +511,8 @@ static int update_attrib(struct rtw_adapter *padapter, ...@@ -511,8 +511,8 @@ static int update_attrib(struct rtw_adapter *padapter,
} else { } else {
/* if we cannot get psta => drop the pkt */ /* if we cannot get psta => drop the pkt */
RT_TRACE(_module_rtl871x_xmit_c_, _drv_alert_, RT_TRACE(_module_rtl871x_xmit_c_, _drv_alert_,
("\nupdate_attrib => get sta_info fail, ra:" MAC_FMT ("\nupdate_attrib => get sta_info fail, ra:%pM\n",
"\n", MAC_ARG(pattrib->ra))); pattrib->ra));
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
......
...@@ -251,9 +251,6 @@ struct ieee80211_snap_hdr { ...@@ -251,9 +251,6 @@ struct ieee80211_snap_hdr {
> 0: TID > 0: TID
*/ */
#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
#define MAXTID 16 #define MAXTID 16
#define WME_OUI_TYPE 2 #define WME_OUI_TYPE 2
......
...@@ -1076,8 +1076,7 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy, ...@@ -1076,8 +1076,7 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy,
ret = -ENOENT; ret = -ENOENT;
goto exit; goto exit;
} }
DBG_8723A("%s(%s): mac =" MAC_FMT "\n", __func__, ndev->name, DBG_8723A("%s(%s): mac=%pM\n", __func__, ndev->name, mac);
MAC_ARG(mac));
/* for infra./P2PClient mode */ /* for infra./P2PClient mode */
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) && if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) &&
...@@ -1085,8 +1084,8 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy, ...@@ -1085,8 +1084,8 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy,
struct wlan_network *cur_network = &pmlmepriv->cur_network; struct wlan_network *cur_network = &pmlmepriv->cur_network;
if (!ether_addr_equal(mac, cur_network->network.MacAddress)) { if (!ether_addr_equal(mac, cur_network->network.MacAddress)) {
DBG_8723A("%s, mismatch bssid =" MAC_FMT "\n", __func__, DBG_8723A("%s, mismatch bssid=%pM\n",
MAC_ARG(cur_network->network.MacAddress)); __func__, cur_network->network.MacAddress);
ret = -ENOENT; ret = -ENOENT;
goto exit; goto exit;
} }
...@@ -1989,7 +1988,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, ...@@ -1989,7 +1988,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
DBG_8723A("ssid =%s, len =%zu\n", sme->ssid, sme->ssid_len); DBG_8723A("ssid =%s, len =%zu\n", sme->ssid, sme->ssid_len);
if (sme->bssid) if (sme->bssid)
DBG_8723A("bssid =" MAC_FMT "\n", MAC_ARG(sme->bssid)); DBG_8723A("bssid=%pM\n", sme->bssid);
if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) { if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) {
ret = -EBUSY; ret = -EBUSY;
...@@ -2523,8 +2522,8 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, ...@@ -2523,8 +2522,8 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb,
mgmt = (struct ieee80211_mgmt *)dot11_hdr; mgmt = (struct ieee80211_mgmt *)dot11_hdr;
DBG_8723A("RTW_Tx:da =" MAC_FMT " via %s(%s)\n", DBG_8723A("RTW_Tx:da=%pM via %s(%s)\n",
MAC_ARG(mgmt->da), __func__, ndev->name); mgmt->da, __func__, ndev->name);
category = mgmt->u.action.category; category = mgmt->u.action.category;
action = mgmt->u.action.u.wme_action.action_code; action = mgmt->u.action.u.wme_action.action_code;
DBG_8723A("RTW_Tx:category(%u), action(%u)\n", DBG_8723A("RTW_Tx:category(%u), action(%u)\n",
...@@ -2877,7 +2876,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, ...@@ -2877,7 +2876,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy,
return ret; return ret;
} }
DBG_8723A("free sta macaddr =" MAC_FMT "\n", MAC_ARG(mac)); DBG_8723A("free sta macaddr=%pM\n", mac);
if (is_broadcast_ether_addr(mac)) if (is_broadcast_ether_addr(mac))
return -EINVAL; return -EINVAL;
...@@ -3053,8 +3052,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, ...@@ -3053,8 +3052,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
cfg80211_mgmt_tx_status(padapter->rtw_wdev, *cookie, buf, len, ack, cfg80211_mgmt_tx_status(padapter->rtw_wdev, *cookie, buf, len, ack,
GFP_KERNEL); GFP_KERNEL);
DBG_8723A("RTW_Tx:tx_ch =%d, da =" MAC_FMT "\n", tx_ch, DBG_8723A("RTW_Tx:tx_ch =%d, da =%pM\n", tx_ch, hdr->da);
MAC_ARG(hdr->da));
category = hdr->u.action.category; category = hdr->u.action.category;
action = hdr->u.action.u.wme_action.action_code; action = hdr->u.action.u.wme_action.action_code;
DBG_8723A("RTW_Tx:category(%u), action(%u)\n", category, action); DBG_8723A("RTW_Tx:category(%u), action(%u)\n", category, action);
......
...@@ -594,8 +594,8 @@ static int _rtw_drv_register_netdev(struct rtw_adapter *padapter, char *name) ...@@ -594,8 +594,8 @@ static int _rtw_drv_register_netdev(struct rtw_adapter *padapter, char *name)
ret = _FAIL; ret = _FAIL;
goto error_register_netdev; goto error_register_netdev;
} }
DBG_8723A("%s, MAC Address (if%d) = " MAC_FMT "\n", __func__, DBG_8723A("%s, MAC Address (if%d) = %pM\n",
(padapter->iface_id + 1), MAC_ARG(pnetdev->dev_addr)); __func__, padapter->iface_id + 1, pnetdev->dev_addr);
return ret; return ret;
error_register_netdev: error_register_netdev:
...@@ -666,8 +666,7 @@ int netdev_open23a(struct net_device *pnetdev) ...@@ -666,8 +666,7 @@ int netdev_open23a(struct net_device *pnetdev)
goto netdev_open23a_error; goto netdev_open23a_error;
} }
DBG_8723A("MAC Address = "MAC_FMT"\n", DBG_8723A("MAC Address = %pM\n", pnetdev->dev_addr);
MAC_ARG(pnetdev->dev_addr));
if (init_hw_mlme_ext23a(padapter) == _FAIL) { if (init_hw_mlme_ext23a(padapter) == _FAIL) {
DBG_8723A("can't init mlme_ext_priv\n"); DBG_8723A("can't init mlme_ext_priv\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment