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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1461055475.1917.17.camel@perches.com>
Date:	Tue, 19 Apr 2016 01:44:35 -0700
From:	Joe Perches <joe@...ches.com>
To:	Bjorn Andersson <bjorn.andersson@...aro.org>,
	Eugene Krasnikov <k.eugene.e@...il.com>,
	Kalle Valo <kvalo@...eaurora.org>
Cc:	Pontus Fuchs <pontus.fuchs@...il.com>,
	linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 06/18] wcn36xx: Add helper macros to cast sta to priv

On Mon, 2016-04-18 at 22:00 -0700, Bjorn Andersson wrote:
> From: Pontus Fuchs <pontus.fuchs@...il.com>
> 
> While poking at this I also change two related things. I rename one
> variable to make the names consistent. I also move one assignment of
> priv_sta to the declaration to save a few lines.

trivia:

The commit subject is a bit misleading as this adds
the preferred static
inline not a macro.

> diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
[]
> @@ -275,4 +275,10 @@ struct ieee80211_vif *wcn36xx_priv_to_vif(struct wcn36xx_vif *vif_priv)
>  	return container_of((void *) vif_priv, struct ieee80211_vif, drv_priv);
>  }
>  
> +static inline
> +struct wcn36xx_sta *wcn36xx_sta_to_priv(struct ieee80211_sta *sta)
> +{
> +	return (struct wcn36xx_sta *)sta->drv_priv;
> +}
> +
>  #endif	/* _WCN36XX_H_ */

And this could be const struct ieee8021_sta *sta

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ