linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Sujith Manoharan <sujith@msujith.org>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com
Subject: Re: [PATCH 2/2] ath9k: implement p2p client powersave support
Date: Wed, 12 Feb 2014 16:32:46 +0100	[thread overview]
Message-ID: <52FB941E.1020300@openwrt.org> (raw)
In-Reply-To: <21243.36697.649170.35540@gargle.gargle.HOWL>

On 2014-02-12 16:12, Sujith Manoharan wrote:
> Felix Fietkau wrote:
>> +	sc->p2p_ps_timer = ath_gen_timer_alloc(sc->sc_ah, ath9k_p2p_ps_timer,
>> +		NULL, sc, AR_FIRST_NDP_TIMER);
>> +
>>  	ath9k_cmn_init_crypto(sc->sc_ah);
>>  	ath9k_init_misc(sc);
>>  	ath_fill_led_pin(sc);
>> @@ -1067,6 +1070,9 @@ static void ath9k_deinit_softc(struct ath_softc *sc)
>>  {
>>  	int i = 0;
>>  
>> +	if (sc->p2p_ps_timer)
>> +		ath_gen_timer_free(sc->sc_ah, sc->p2p_ps_timer);
>> +
> 
> Why do this in the global init/deinit routines ? Wouldn't the
> add/remove interface callbacks be a better place for this (based on
> vif->p2p), since this timer is needed only for p2p interfaces ?
It only allocates a very small struct. Doing this in the interface
add/remove callback means I'd have to handle interface change as well. I
figured keeping it simple is better than micro-optimizing a single small
memory allocation.

>> +	if (sc->ps_flags & PS_BEACON_SYNC)
>> +		return;
> 
> I think sc_pm_lock is required to use sc->ps_flags.
OK, will send v2 later.

- Felix

  reply	other threads:[~2014-02-12 15:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11 10:18 [PATCH 1/2] ath9k: support only one P2P interface Felix Fietkau
2014-02-11 10:18 ` [PATCH 2/2] ath9k: implement p2p client powersave support Felix Fietkau
2014-02-12 15:12   ` Sujith Manoharan
2014-02-12 15:32     ` Felix Fietkau [this message]
2014-02-12 15:44       ` Sujith Manoharan
2014-02-12 15:52         ` Felix Fietkau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52FB941E.1020300@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=sujith@msujith.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).