Search Linux Wireless

Re: [PATCH 2/2] ath9k: implement p2p client powersave support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux