Merge "wil6210: use print_hex_dump_debug instead of print_hex_dump_bytes"

This commit is contained in:
Linux Build Service Account 2017-04-06 22:31:38 -07:00 committed by Gerrit - the friendly Code Review server
commit 5da4139c92
2 changed files with 33 additions and 20 deletions

View file

@ -501,9 +501,9 @@ static int wil_cfg80211_scan(struct wiphy *wiphy,
for (i = 0; i < request->n_ssids; i++) { for (i = 0; i < request->n_ssids; i++) {
wil_dbg_misc(wil, "SSID[%d]", i); wil_dbg_misc(wil, "SSID[%d]", i);
print_hex_dump_bytes("SSID ", DUMP_PREFIX_OFFSET, wil_hex_dump_misc("SSID ", DUMP_PREFIX_OFFSET, 16, 1,
request->ssids[i].ssid, request->ssids[i].ssid,
request->ssids[i].ssid_len); request->ssids[i].ssid_len, true);
} }
if (request->n_ssids) if (request->n_ssids)
@ -540,8 +540,8 @@ static int wil_cfg80211_scan(struct wiphy *wiphy,
} }
if (request->ie_len) if (request->ie_len)
print_hex_dump_bytes("Scan IE ", DUMP_PREFIX_OFFSET, wil_hex_dump_misc("Scan IE ", DUMP_PREFIX_OFFSET, 16, 1,
request->ie, request->ie_len); request->ie, request->ie_len, true);
else else
wil_dbg_misc(wil, "Scan has no IE's\n"); wil_dbg_misc(wil, "Scan has no IE's\n");
@ -847,7 +847,8 @@ int wil_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
*/ */
wil_dbg_misc(wil, "mgmt_tx\n"); wil_dbg_misc(wil, "mgmt_tx\n");
print_hex_dump_bytes("mgmt tx frame ", DUMP_PREFIX_OFFSET, buf, len); wil_hex_dump_misc("mgmt tx frame ", DUMP_PREFIX_OFFSET, 16, 1, buf,
len, true);
cmd = kmalloc(sizeof(*cmd) + len, GFP_KERNEL); cmd = kmalloc(sizeof(*cmd) + len, GFP_KERNEL);
if (!cmd) { if (!cmd) {
@ -1180,18 +1181,18 @@ static int _wil_cfg80211_merge_extra_ies(const u8 *ies1, u16 ies1_len,
static void wil_print_bcon_data(struct cfg80211_beacon_data *b) static void wil_print_bcon_data(struct cfg80211_beacon_data *b)
{ {
print_hex_dump_bytes("head ", DUMP_PREFIX_OFFSET, wil_hex_dump_misc("head ", DUMP_PREFIX_OFFSET, 16, 1,
b->head, b->head_len); b->head, b->head_len, true);
print_hex_dump_bytes("tail ", DUMP_PREFIX_OFFSET, wil_hex_dump_misc("tail ", DUMP_PREFIX_OFFSET, 16, 1,
b->tail, b->tail_len); b->tail, b->tail_len, true);
print_hex_dump_bytes("BCON IE ", DUMP_PREFIX_OFFSET, wil_hex_dump_misc("BCON IE ", DUMP_PREFIX_OFFSET, 16, 1,
b->beacon_ies, b->beacon_ies_len); b->beacon_ies, b->beacon_ies_len, true);
print_hex_dump_bytes("PROBE ", DUMP_PREFIX_OFFSET, wil_hex_dump_misc("PROBE ", DUMP_PREFIX_OFFSET, 16, 1,
b->probe_resp, b->probe_resp_len); b->probe_resp, b->probe_resp_len, true);
print_hex_dump_bytes("PROBE IE ", DUMP_PREFIX_OFFSET, wil_hex_dump_misc("PROBE IE ", DUMP_PREFIX_OFFSET, 16, 1,
b->proberesp_ies, b->proberesp_ies_len); b->proberesp_ies, b->proberesp_ies_len, true);
print_hex_dump_bytes("ASSOC IE ", DUMP_PREFIX_OFFSET, wil_hex_dump_misc("ASSOC IE ", DUMP_PREFIX_OFFSET, 16, 1,
b->assocresp_ies, b->assocresp_ies_len); b->assocresp_ies, b->assocresp_ies_len, true);
} }
/* internal functions for device reset and starting AP */ /* internal functions for device reset and starting AP */
@ -1387,8 +1388,8 @@ static int wil_cfg80211_start_ap(struct wiphy *wiphy,
wil_dbg_misc(wil, "BI %d DTIM %d\n", info->beacon_interval, wil_dbg_misc(wil, "BI %d DTIM %d\n", info->beacon_interval,
info->dtim_period); info->dtim_period);
wil_dbg_misc(wil, "PBSS %d\n", info->pbss); wil_dbg_misc(wil, "PBSS %d\n", info->pbss);
print_hex_dump_bytes("SSID ", DUMP_PREFIX_OFFSET, wil_hex_dump_misc("SSID ", DUMP_PREFIX_OFFSET, 16, 1,
info->ssid, info->ssid_len); info->ssid, info->ssid_len, true);
wil_print_bcon_data(bcon); wil_print_bcon_data(bcon);
wil_print_crypto(wil, crypto); wil_print_crypto(wil, crypto);

View file

@ -778,6 +778,12 @@ static inline void wil_c(struct wil6210_priv *wil, u32 reg, u32 val)
print_hex_dump_debug("DBG[ WMI]" prefix_str,\ print_hex_dump_debug("DBG[ WMI]" prefix_str,\
prefix_type, rowsize, \ prefix_type, rowsize, \
groupsize, buf, len, ascii) groupsize, buf, len, ascii)
#define wil_hex_dump_misc(prefix_str, prefix_type, rowsize, \
groupsize, buf, len, ascii) \
print_hex_dump_debug("DBG[MISC]" prefix_str,\
prefix_type, rowsize, \
groupsize, buf, len, ascii)
#else /* defined(CONFIG_DYNAMIC_DEBUG) */ #else /* defined(CONFIG_DYNAMIC_DEBUG) */
static inline static inline
void wil_hex_dump_txrx(const char *prefix_str, int prefix_type, int rowsize, void wil_hex_dump_txrx(const char *prefix_str, int prefix_type, int rowsize,
@ -790,6 +796,12 @@ void wil_hex_dump_wmi(const char *prefix_str, int prefix_type, int rowsize,
int groupsize, const void *buf, size_t len, bool ascii) int groupsize, const void *buf, size_t len, bool ascii)
{ {
} }
static inline
void wil_hex_dump_misc(const char *prefix_str, int prefix_type, int rowsize,
int groupsize, const void *buf, size_t len, bool ascii)
{
}
#endif /* defined(CONFIG_DYNAMIC_DEBUG) */ #endif /* defined(CONFIG_DYNAMIC_DEBUG) */
void wil_memcpy_fromio_32(void *dst, const volatile void __iomem *src, void wil_memcpy_fromio_32(void *dst, const volatile void __iomem *src,