lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <477F20668A386D41ADCC57781B1F704307FFBB2835@SC-VEXCH1.marvell.com>
Date:	Wed, 20 Jul 2011 14:46:32 -0700
From:	Bing Zhao <bzhao@...vell.com>
To:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"John W. Linville" <linville@...driver.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 3/3] wireless: mwifiex: print hw address via %pM

Hi Andy,

Thanks for the patch.

> -----Original Message-----
> From: Andy Shevchenko [mailto:andriy.shevchenko@...ux.intel.com]
> Sent: Wednesday, July 20, 2011 6:35 AM
> To: linux-wireless@...r.kernel.org; netdev@...r.kernel.org; John W. Linville; linux-
> kernel@...r.kernel.org
> Cc: Andy Shevchenko; Bing Zhao
> Subject: [PATCH 3/3] wireless: mwifiex: print hw address via %pM
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Cc: Bing Zhao <bzhao@...vell.com>

Acked-by: Bing Zhao <bzhao@...vell.com>

Thanks,
Bing

> ---
>  drivers/net/wireless/mwifiex/debugfs.c |   33 +++++++------------------------
>  1 files changed, 8 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/net/wireless/mwifiex/debugfs.c b/drivers/net/wireless/mwifiex/debugfs.c
> index 1bcf9ea..d26a78b 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,
>  	p += sprintf(p, "bss_mode=\"%s\"\n", bss_modes[info.bss_mode]);
>  	p += sprintf(p, "media_state=\"%s\"\n",
>  		     (!priv->media_connected ? "Disconnected" : "Connected"));
> -	p += sprintf(p, "mac_address=\"%02x:%02x:%02x:%02x:%02x:%02x\"\n",
> -		     netdev->dev_addr[0], netdev->dev_addr[1],
> -		     netdev->dev_addr[2], netdev->dev_addr[3],
> -		     netdev->dev_addr[4], netdev->dev_addr[5]);
> +	p += sprintf(p, "mac_address=\"%pM\"\n", netdev->dev_addr);
> 
>  	if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA) {
>  		p += sprintf(p, "multicast_count=\"%d\"\n",
>  			     netdev_mc_count(netdev));
>  		p += sprintf(p, "essid=\"%s\"\n", info.ssid.ssid);
> -		p += sprintf(p, "bssid=\"%02x:%02x:%02x:%02x:%02x:%02x\"\n",
> -			     info.bssid[0], info.bssid[1],
> -			     info.bssid[2], info.bssid[3],
> -			     info.bssid[4], info.bssid[5]);
> +		p += sprintf(p, "bssid=\"%pM\"\n", info.bssid);
>  		p += sprintf(p, "channel=\"%d\"\n", (int) info.bss_chan);
>  		p += sprintf(p, "region_code = \"%02x\"\n", info.region_code);
> 
>  		netdev_for_each_mc_addr(ha, netdev)
> -			p += sprintf(p, "multicast_address[%d]="
> -				     "\"%02x:%02x:%02x:%02x:%02x:%02x\"\n", i++,
> -				     ha->addr[0], ha->addr[1],
> -				     ha->addr[2], ha->addr[3],
> -				     ha->addr[4], ha->addr[5]);
> +			p += sprintf(p, "multicast_address[%d]=\"%pM\"\n",
> +					i++, ha->addr);
>  	}
> 
>  	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,
>  	if (info.tx_tbl_num) {
>  		p += sprintf(p, "Tx BA stream table:\n");
>  		for (i = 0; i < info.tx_tbl_num; i++)
> -			p += sprintf(p, "tid = %d, "
> -				     "ra = %02x:%02x:%02x:%02x:%02x:%02x\n",
> -				     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]);
> +			p += sprintf(p, "tid = %d, ra = %pM\n",
> +				     info.tx_tbl[i].tid, info.tx_tbl[i].ra);
>  	}
> 
>  	if (info.rx_tbl_num) {
>  		p += sprintf(p, "Rx reorder table:\n");
>  		for (i = 0; i < info.rx_tbl_num; i++) {
> -
> -			p += sprintf(p, "tid = %d, "
> -				     "ta = %02x:%02x:%02x:%02x:%02x:%02x, "
> +			p += sprintf(p, "tid = %d, ta = %pM, "
>  				     "start_win = %d, "
>  				     "win_size = %d, buffer: ",
>  				     info.rx_tbl[i].tid,
> -				     info.rx_tbl[i].ta[0], info.rx_tbl[i].ta[1],
> -				     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].ta,
>  				     info.rx_tbl[i].start_win,
>  				     info.rx_tbl[i].win_size);
> 
> --
> 1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ