358-v5.4-brcmfmac-use-ph-to-print-small-buffer.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. From 0e48b86d9a8f5c695bb02c9c02f6dc7d2ec8f2e2 Mon Sep 17 00:00:00 2001
  2. From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  3. Date: Wed, 4 Sep 2019 20:50:52 +0300
  4. Subject: [PATCH] brcmfmac: use %*ph to print small buffer
  5. Use %*ph format to print small buffer as hex string.
  6. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  7. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  8. ---
  9. .../broadcom/brcm80211/brcmfmac/cfg80211.c | 18 ++++++------------
  10. 1 file changed, 6 insertions(+), 12 deletions(-)
  11. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
  12. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
  13. @@ -4258,10 +4258,8 @@ brcmf_parse_vndr_ies(const u8 *vndr_ie_b
  14. vndr_ies->count++;
  15. - brcmf_dbg(TRACE, "** OUI %02x %02x %02x, type 0x%02x\n",
  16. - parsed_info->vndrie.oui[0],
  17. - parsed_info->vndrie.oui[1],
  18. - parsed_info->vndrie.oui[2],
  19. + brcmf_dbg(TRACE, "** OUI %3ph, type 0x%02x\n",
  20. + parsed_info->vndrie.oui,
  21. parsed_info->vndrie.oui_type);
  22. if (vndr_ies->count >= VNDR_IE_PARSE_LIMIT)
  23. @@ -4385,12 +4383,10 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
  24. for (i = 0; i < old_vndr_ies.count; i++) {
  25. vndrie_info = &old_vndr_ies.ie_info[i];
  26. - brcmf_dbg(TRACE, "DEL ID : %d, Len: %d , OUI:%02x:%02x:%02x\n",
  27. + brcmf_dbg(TRACE, "DEL ID : %d, Len: %d , OUI:%3ph\n",
  28. vndrie_info->vndrie.id,
  29. vndrie_info->vndrie.len,
  30. - vndrie_info->vndrie.oui[0],
  31. - vndrie_info->vndrie.oui[1],
  32. - vndrie_info->vndrie.oui[2]);
  33. + vndrie_info->vndrie.oui);
  34. del_add_ie_buf_len = brcmf_vndr_ie(curr_ie_buf, pktflag,
  35. vndrie_info->ie_ptr,
  36. @@ -4422,12 +4418,10 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
  37. remained_buf_len -= (vndrie_info->ie_len +
  38. VNDR_IE_VSIE_OFFSET);
  39. - brcmf_dbg(TRACE, "ADDED ID : %d, Len: %d, OUI:%02x:%02x:%02x\n",
  40. + brcmf_dbg(TRACE, "ADDED ID : %d, Len: %d, OUI:%3ph\n",
  41. vndrie_info->vndrie.id,
  42. vndrie_info->vndrie.len,
  43. - vndrie_info->vndrie.oui[0],
  44. - vndrie_info->vndrie.oui[1],
  45. - vndrie_info->vndrie.oui[2]);
  46. + vndrie_info->vndrie.oui);
  47. del_add_ie_buf_len = brcmf_vndr_ie(curr_ie_buf, pktflag,
  48. vndrie_info->ie_ptr,