2011-02-21 02:20:00

by Sujith

[permalink] [raw]
Subject: [PATCH 16/23] ath9k_htc: Disable powersave if an AP interface is present

From: Sujith Manoharan <[email protected]>

Signed-off-by: Sujith Manoharan <[email protected]>
---
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index f384b35..4779bb1 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1393,7 +1393,8 @@ static int ath9k_htc_config(struct ieee80211_hw *hw, u32 changed)

}

- if (changed & IEEE80211_CONF_CHANGE_PS) {
+ if ((priv->ah->opmode != NL80211_IFTYPE_AP) &&
+ (changed & IEEE80211_CONF_CHANGE_PS)) {
if (conf->flags & IEEE80211_CONF_PS) {
ath9k_htc_setpower(priv, ATH9K_PM_NETWORK_SLEEP);
priv->ps_enabled = true;
--
1.7.4.1



2011-02-21 07:42:52

by Sujith

[permalink] [raw]
Subject: Re: [PATCH 16/23] ath9k_htc: Disable powersave if an AP interface is present

Vasanthakumar Thiagarajan wrote:
> On Mon, Feb 21, 2011 at 07:49:46AM +0530, Sujith wrote:
> > From: Sujith Manoharan <[email protected]>
> >
> > Signed-off-by: Sujith Manoharan <[email protected]>
> > ---
> > drivers/net/wireless/ath/ath9k/htc_drv_main.c | 3 ++-
> > 1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> > index f384b35..4779bb1 100644
> > --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> > +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> > @@ -1393,7 +1393,8 @@ static int ath9k_htc_config(struct ieee80211_hw *hw, u32 changed)
> >
> > }
> >
> > - if (changed & IEEE80211_CONF_CHANGE_PS) {
> > + if ((priv->ah->opmode != NL80211_IFTYPE_AP) &&
> > + (changed & IEEE80211_CONF_CHANGE_PS)) {
> > if (conf->flags & IEEE80211_CONF_PS) {
> > ath9k_htc_setpower(priv, ATH9K_PM_NETWORK_SLEEP);
> > priv->ps_enabled = true;
>
> Is it not that mac80211 already takes care of that?.

Yeah, it appears to have been fixed recently in mac80211.
So this patch can be dropped.

Sujith

Subject: Re: [PATCH 16/23] ath9k_htc: Disable powersave if an AP interface is present

On Mon, Feb 21, 2011 at 07:49:46AM +0530, Sujith wrote:
> From: Sujith Manoharan <[email protected]>
>
> Signed-off-by: Sujith Manoharan <[email protected]>
> ---
> drivers/net/wireless/ath/ath9k/htc_drv_main.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> index f384b35..4779bb1 100644
> --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> @@ -1393,7 +1393,8 @@ static int ath9k_htc_config(struct ieee80211_hw *hw, u32 changed)
>
> }
>
> - if (changed & IEEE80211_CONF_CHANGE_PS) {
> + if ((priv->ah->opmode != NL80211_IFTYPE_AP) &&
> + (changed & IEEE80211_CONF_CHANGE_PS)) {
> if (conf->flags & IEEE80211_CONF_PS) {
> ath9k_htc_setpower(priv, ATH9K_PM_NETWORK_SLEEP);
> priv->ps_enabled = true;

Is it not that mac80211 already takes care of that?.

Vasanth