Search Linux Wireless

Re: [PATCH 3/4] cfg80211: wext compat code

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

 



On Fri, 2007-02-09 at 17:27 +0100, johannes@xxxxxxxxxxxxxxxx wrote:

> +#ifdef CONFIG_CFG80211_WEXT_COMPAT
> +	rtnl_lock();
> +	ret = call_cfg80211_wext_ioctl(ifr, cmd);
> +	rtnl_unlock();

No need to take the rtnl here if we change the compat code slightly.

> +static struct cfg80211_config *cfg80211_ensure_pending_cfg(
> +	struct cfg80211_registered_driver *drv)
> +{
> +	struct cfg80211_config *cfg = drv->wext_pending_config;
> +	if (!cfg)
> +		cfg = kmalloc(sizeof(*cfg)+32, GFP_KERNEL);
> +	if (cfg) {
> +		cfg->ssid = (char*)cfg + sizeof(*cfg);
> +		drv->wext_pending_config = cfg;

This is a problem. It means that every driver can only have a single
interface that is configurable via wext, or if you try multiple ones
we'll run into a lot of trouble. The solution is to implement a list of
pending configs that each have a netdev pointer in them. Bit icky.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[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