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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 8 Oct 2019 14:59:27 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Jerome Pouiller <Jerome.Pouiller@...abs.com>
Cc:     "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/7] staging: wfx: simplify memory allocation in
 wfx_update_filtering()

These patches are good.  I just have a few nits to point out for future
reference.

On Tue, Oct 08, 2019 at 09:42:58AM +0000, Jerome Pouiller wrote:
>  static inline int hif_set_beacon_filter_table(struct wfx_vif *wvif,
> -					      struct hif_mib_bcn_filter_table *ft)
> +					      int tbl_len,
> +					      struct hif_ie_table_entry *tbl)
>  {
> -	size_t buf_len = struct_size(ft, ie_table, ft->num_of_info_elmts);
> +	int ret;
> +	struct hif_mib_bcn_filter_table *val;
> +	int buf_len = struct_size(val, ie_table, tbl_len);

This is fine for now, but since this is networking code, in the future
could you write your declarations in reverse Christmas tree order?

	long laskdfjasldfj asldfkj aslkdfj alskdfj askldfj;
	mid asdfasdflkajdflasjdf lkasjdf;
	short asdfasd;
	shortest i;

>  
> -	cpu_to_le32s(&ft->num_of_info_elmts);
> -	return hif_write_mib(wvif->wdev, wvif->id,
> -			     HIF_MIB_ID_BEACON_FILTER_TABLE, ft, buf_len);

[ snip ]

> diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
> index 2855d14a709c..12198b8f3685 100644
> --- a/drivers/staging/wfx/sta.c
> +++ b/drivers/staging/wfx/sta.c
> @@ -217,14 +217,13 @@ void wfx_update_filtering(struct wfx_vif *wvif)
>  	bool filter_bssid = wvif->filter_bssid;
>  	bool fwd_probe_req = wvif->fwd_probe_req;
>  	struct hif_mib_bcn_filter_enable bf_ctrl;
> -	struct hif_mib_bcn_filter_table *bf_tbl;
> -	struct hif_ie_table_entry ie_tbl[] = {
> +	struct hif_ie_table_entry filter_ies[] = {
>  		{
>  			.ie_id        = WLAN_EID_VENDOR_SPECIFIC,
>  			.has_changed  = 1,
>  			.no_longer    = 1,
>  			.has_appeared = 1,
> -			.oui         = { 0x50, 0x6F, 0x9A},
> +			.oui          = { 0x50, 0x6F, 0x9A },

Please don't do unrelated white space changes in their own patches.

>  		}, {
>  			.ie_id        = WLAN_EID_HT_OPERATION,
>  			.has_changed  = 1,

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ