aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/debugfs.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2011-07-20 09:34:31 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-20 15:04:40 -0400
commit037b559a167c76f3457582d1b84b4d1e36e38925 (patch)
tree8d36922c61477326f640906425bf1010e730b388 /drivers/net/wireless/mwifiex/debugfs.c
parent8f895026e8ef26419c38851a958c16286fffb43a (diff)
wireless: mwifiex: print hw address via %pM
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/debugfs.c')
-rw-r--r--drivers/net/wireless/mwifiex/debugfs.c33
1 files changed, 8 insertions, 25 deletions
diff --git a/drivers/net/wireless/mwifiex/debugfs.c b/drivers/net/wireless/mwifiex/debugfs.c
index 1bcf9eaa107d..d26a78b6b3c4 100644
--- a/drivers/net/wireless/mwifiex/debugfs.c
+++ b/drivers/net/wireless/mwifiex/debugfs.c
@@ -216,28 +216,19 @@ mwifiex_info_read(struct file *file, char __user *ubuf,
216 p += sprintf(p, "bss_mode=\"%s\"\n", bss_modes[info.bss_mode]); 216 p += sprintf(p, "bss_mode=\"%s\"\n", bss_modes[info.bss_mode]);
217 p += sprintf(p, "media_state=\"%s\"\n", 217 p += sprintf(p, "media_state=\"%s\"\n",
218 (!priv->media_connected ? "Disconnected" : "Connected")); 218 (!priv->media_connected ? "Disconnected" : "Connected"));
219 p += sprintf(p, "mac_address=\"%02x:%02x:%02x:%02x:%02x:%02x\"\n", 219 p += sprintf(p, "mac_address=\"%pM\"\n", netdev->dev_addr);
220 netdev->dev_addr[0], netdev->dev_addr[1],
221 netdev->dev_addr[2], netdev->dev_addr[3],
222 netdev->dev_addr[4], netdev->dev_addr[5]);
223 220
224 if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA) { 221 if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA) {
225 p += sprintf(p, "multicast_count=\"%d\"\n", 222 p += sprintf(p, "multicast_count=\"%d\"\n",
226 netdev_mc_count(netdev)); 223 netdev_mc_count(netdev));
227 p += sprintf(p, "essid=\"%s\"\n", info.ssid.ssid); 224 p += sprintf(p, "essid=\"%s\"\n", info.ssid.ssid);
228 p += sprintf(p, "bssid=\"%02x:%02x:%02x:%02x:%02x:%02x\"\n", 225 p += sprintf(p, "bssid=\"%pM\"\n", info.bssid);
229 info.bssid[0], info.bssid[1],
230 info.bssid[2], info.bssid[3],
231 info.bssid[4], info.bssid[5]);
232 p += sprintf(p, "channel=\"%d\"\n", (int) info.bss_chan); 226 p += sprintf(p, "channel=\"%d\"\n", (int) info.bss_chan);
233 p += sprintf(p, "region_code = \"%02x\"\n", info.region_code); 227 p += sprintf(p, "region_code = \"%02x\"\n", info.region_code);
234 228
235 netdev_for_each_mc_addr(ha, netdev) 229 netdev_for_each_mc_addr(ha, netdev)
236 p += sprintf(p, "multicast_address[%d]=" 230 p += sprintf(p, "multicast_address[%d]=\"%pM\"\n",
237 "\"%02x:%02x:%02x:%02x:%02x:%02x\"\n", i++, 231 i++, ha->addr);
238 ha->addr[0], ha->addr[1],
239 ha->addr[2], ha->addr[3],
240 ha->addr[4], ha->addr[5]);
241 } 232 }
242 233
243 p += sprintf(p, "num_tx_bytes = %lu\n", priv->stats.tx_bytes); 234 p += sprintf(p, "num_tx_bytes = %lu\n", priv->stats.tx_bytes);
@@ -451,26 +442,18 @@ mwifiex_debug_read(struct file *file, char __user *ubuf,
451 if (info.tx_tbl_num) { 442 if (info.tx_tbl_num) {
452 p += sprintf(p, "Tx BA stream table:\n"); 443 p += sprintf(p, "Tx BA stream table:\n");
453 for (i = 0; i < info.tx_tbl_num; i++) 444 for (i = 0; i < info.tx_tbl_num; i++)
454 p += sprintf(p, "tid = %d, " 445 p += sprintf(p, "tid = %d, ra = %pM\n",
455 "ra = %02x:%02x:%02x:%02x:%02x:%02x\n", 446 info.tx_tbl[i].tid, info.tx_tbl[i].ra);
456 info.tx_tbl[i].tid, info.tx_tbl[i].ra[0],
457 info.tx_tbl[i].ra[1], info.tx_tbl[i].ra[2],
458 info.tx_tbl[i].ra[3], info.tx_tbl[i].ra[4],
459 info.tx_tbl[i].ra[5]);
460 } 447 }
461 448
462 if (info.rx_tbl_num) { 449 if (info.rx_tbl_num) {
463 p += sprintf(p, "Rx reorder table:\n"); 450 p += sprintf(p, "Rx reorder table:\n");
464 for (i = 0; i < info.rx_tbl_num; i++) { 451 for (i = 0; i < info.rx_tbl_num; i++) {
465 452 p += sprintf(p, "tid = %d, ta = %pM, "
466 p += sprintf(p, "tid = %d, "
467 "ta = %02x:%02x:%02x:%02x:%02x:%02x, "
468 "start_win = %d, " 453 "start_win = %d, "
469 "win_size = %d, buffer: ", 454 "win_size = %d, buffer: ",
470 info.rx_tbl[i].tid, 455 info.rx_tbl[i].tid,
471 info.rx_tbl[i].ta[0], info.rx_tbl[i].ta[1], 456 info.rx_tbl[i].ta,
472 info.rx_tbl[i].ta[2], info.rx_tbl[i].ta[3],
473 info.rx_tbl[i].ta[4], info.rx_tbl[i].ta[5],
474 info.rx_tbl[i].start_win, 457 info.rx_tbl[i].start_win,
475 info.rx_tbl[i].win_size); 458 info.rx_tbl[i].win_size);
476 459