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: <20131030114627.GC8763@amd.pavel.ucw.cz>
Date:	Wed, 30 Oct 2013 12:46:27 +0100
From:	Pavel Machek <pavel@....cz>
To:	Pali Rohár <pali.rohar@...il.com>
Cc:	Luciano Coelho <luca@...lho.fi>,
	"John W. Linville" <linville@...driver.com>,
	Johannes Berg <johannes@...solutions.net>,
	"David S. Miller" <davem@...emloft.net>,
	linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, freemangordon@....bg,
	aaro.koskinen@....fi, sre@...g0.de, joni.lapilainen@...il.com,
	David Gnedt <david.gnedt@...izone.at>
Subject: Re: [PATCH 09/16] wl1251: disable power saving in monitor mode

On Sat 2013-10-26 22:34:08, Pali Rohár wrote:
> From: David Gnedt <david.gnedt@...izone.at>
> 
> Force power saving off while monitor interface is present.
> 
> Signed-off-by: David Gnedt <david.gnedt@...izone.at>
> ---
>  drivers/net/wireless/ti/wl1251/main.c |    7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c
> index 727f2ee..62cb374 100644
> --- a/drivers/net/wireless/ti/wl1251/main.c
> +++ b/drivers/net/wireless/ti/wl1251/main.c
> @@ -617,7 +617,8 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
>  			goto out_sleep;
>  	}
>  
> -	if (conf->flags & IEEE80211_CONF_PS && !wl->psm_requested) {
> +	if (conf->flags & IEEE80211_CONF_PS && !wl->psm_requested &&
> +	    !wl->monitor_present) {
>  		wl1251_debug(DEBUG_PSM, "psm enabled");
>  
>  		wl->psm_requested = true;
> @@ -633,8 +634,8 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
>  		ret = wl1251_ps_set_mode(wl, STATION_POWER_SAVE_MODE);
>  		if (ret < 0)
>  			goto out_sleep;
> -	} else if (!(conf->flags & IEEE80211_CONF_PS) &&
> -		   wl->psm_requested) {
> +	} else if ((!(conf->flags & IEEE80211_CONF_PS) || wl->monitor_present)
> +		   && wl->psm_requested) {
>  		wl1251_debug(DEBUG_PSM, "psm disabled");
>  

These boolean expressions make my head spin. Introduce helper function 

can_do_pm()... return (conf->flags & IEEE80211_CONF_PS) &&
!wl->monitor_present

?

Thanks,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ