Search Linux Wireless

Re: [PATCH 4/4] ath6kl: Allow enabling of P2P support

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

 



On Tue, Sep 06, 2011 at 10:51:55AM +0300, Kalle Valo wrote:
> I was more thinking that ath6kl_p2p would not be exposed outside init.c,
> instead you would set the appropriate conf_flag in ath6kl_core_init() or
> similar function. But leave the module_param as it is for now, I will
> cleanup the module parameters anyway soon.

This and the change to using ar->conf_flags instead of ar->p2p turned
out to be more complex changes. The main problem behind this is in the
order that the driver is allocating and initializing the data
structures. In theory, this sounds great and should be the longer term
direction, but with the current initialization code path, changing the
struct ath6kl data within ath6kl_core_alloc() (including cfg80211 alloc
and registration) and ath6kl_core_init() can conflict pretty easily. For
example, conf_flags are initialized in ath6kl_init() which is called
from ath6kl_core_init(), but this is done only after ath6kl_core_alloc()
has already returned and the P2P flags are needed there before cfg80211
registration..

I think that the initialization steps need to be reordered in a way
that cfg80211 registration happens somewhere near the end of init()
rather than in alloc(). Once this is done, the conf_flags can be set
based on firmware and target information and those can then be used to
set up the cfg80211 information before calling wiphy_register(). Until
that gets done, it seems safest to apply this P2P enabling patch as-is
and do the proposed clean up separately after the wiphy_register() call
is moved.

-- 
Jouni Malinen                                            PGP id EFC895FA
--
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 Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux