提交 037b559a 编写于 作者: A Andy Shevchenko 提交者: John W. Linville

wireless: mwifiex: print hw address via %pM

Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Bing Zhao <bzhao@marvell.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 8f895026
...@@ -216,28 +216,19 @@ mwifiex_info_read(struct file *file, char __user *ubuf, ...@@ -216,28 +216,19 @@ mwifiex_info_read(struct file *file, char __user *ubuf,
p += sprintf(p, "bss_mode=\"%s\"\n", bss_modes[info.bss_mode]); p += sprintf(p, "bss_mode=\"%s\"\n", bss_modes[info.bss_mode]);
p += sprintf(p, "media_state=\"%s\"\n", p += sprintf(p, "media_state=\"%s\"\n",
(!priv->media_connected ? "Disconnected" : "Connected")); (!priv->media_connected ? "Disconnected" : "Connected"));
p += sprintf(p, "mac_address=\"%02x:%02x:%02x:%02x:%02x:%02x\"\n", p += sprintf(p, "mac_address=\"%pM\"\n", netdev->dev_addr);
netdev->dev_addr[0], netdev->dev_addr[1],
netdev->dev_addr[2], netdev->dev_addr[3],
netdev->dev_addr[4], netdev->dev_addr[5]);
if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA) { if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA) {
p += sprintf(p, "multicast_count=\"%d\"\n", p += sprintf(p, "multicast_count=\"%d\"\n",
netdev_mc_count(netdev)); netdev_mc_count(netdev));
p += sprintf(p, "essid=\"%s\"\n", info.ssid.ssid); p += sprintf(p, "essid=\"%s\"\n", info.ssid.ssid);
p += sprintf(p, "bssid=\"%02x:%02x:%02x:%02x:%02x:%02x\"\n", p += sprintf(p, "bssid=\"%pM\"\n", info.bssid);
info.bssid[0], info.bssid[1],
info.bssid[2], info.bssid[3],
info.bssid[4], info.bssid[5]);
p += sprintf(p, "channel=\"%d\"\n", (int) info.bss_chan); p += sprintf(p, "channel=\"%d\"\n", (int) info.bss_chan);
p += sprintf(p, "region_code = \"%02x\"\n", info.region_code); p += sprintf(p, "region_code = \"%02x\"\n", info.region_code);
netdev_for_each_mc_addr(ha, netdev) netdev_for_each_mc_addr(ha, netdev)
p += sprintf(p, "multicast_address[%d]=" p += sprintf(p, "multicast_address[%d]=\"%pM\"\n",
"\"%02x:%02x:%02x:%02x:%02x:%02x\"\n", i++, i++, ha->addr);
ha->addr[0], ha->addr[1],
ha->addr[2], ha->addr[3],
ha->addr[4], ha->addr[5]);
} }
p += sprintf(p, "num_tx_bytes = %lu\n", priv->stats.tx_bytes); 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,26 +442,18 @@ mwifiex_debug_read(struct file *file, char __user *ubuf,
if (info.tx_tbl_num) { if (info.tx_tbl_num) {
p += sprintf(p, "Tx BA stream table:\n"); p += sprintf(p, "Tx BA stream table:\n");
for (i = 0; i < info.tx_tbl_num; i++) for (i = 0; i < info.tx_tbl_num; i++)
p += sprintf(p, "tid = %d, " p += sprintf(p, "tid = %d, ra = %pM\n",
"ra = %02x:%02x:%02x:%02x:%02x:%02x\n", info.tx_tbl[i].tid, info.tx_tbl[i].ra);
info.tx_tbl[i].tid, info.tx_tbl[i].ra[0],
info.tx_tbl[i].ra[1], info.tx_tbl[i].ra[2],
info.tx_tbl[i].ra[3], info.tx_tbl[i].ra[4],
info.tx_tbl[i].ra[5]);
} }
if (info.rx_tbl_num) { if (info.rx_tbl_num) {
p += sprintf(p, "Rx reorder table:\n"); p += sprintf(p, "Rx reorder table:\n");
for (i = 0; i < info.rx_tbl_num; i++) { for (i = 0; i < info.rx_tbl_num; i++) {
p += sprintf(p, "tid = %d, ta = %pM, "
p += sprintf(p, "tid = %d, "
"ta = %02x:%02x:%02x:%02x:%02x:%02x, "
"start_win = %d, " "start_win = %d, "
"win_size = %d, buffer: ", "win_size = %d, buffer: ",
info.rx_tbl[i].tid, info.rx_tbl[i].tid,
info.rx_tbl[i].ta[0], info.rx_tbl[i].ta[1], info.rx_tbl[i].ta,
info.rx_tbl[i].ta[2], info.rx_tbl[i].ta[3],
info.rx_tbl[i].ta[4], info.rx_tbl[i].ta[5],
info.rx_tbl[i].start_win, info.rx_tbl[i].start_win,
info.rx_tbl[i].win_size); info.rx_tbl[i].win_size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册