Search Linux Wireless

Re: [PATCH] mac80211: do not print WARN if config interface fails during reconfigure

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

 



On Mon, 2009-04-20 at 15:36 -0700, Reinette Chatre wrote:
> It is expected that config interface will always succeed as mac80211
> will only request what driver supports. The exception here is when a
> device has rfkill enabled. At this time the rfkill state is unknown to
> mac80211 and config interface can fail. When this happens we deal with
> this error instead of printing a WARN.

Thanks. Just to make sure -- this really is just papering over the
warning, not actually fixing it. I hope we can fix it soon by making
mac80211 aware of rfkill.

johannes

> Signed-off-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
> ---
>  net/mac80211/util.c |   15 +++++++++++++--
>  1 files changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/net/mac80211/util.c b/net/mac80211/util.c
> index 52ef8d4..0ee74e8 100644
> --- a/net/mac80211/util.c
> +++ b/net/mac80211/util.c
> @@ -1047,8 +1047,19 @@ int ieee80211_reconfig(struct ieee80211_local *local)
>  		case NL80211_IFTYPE_ADHOC:
>  		case NL80211_IFTYPE_AP:
>  		case NL80211_IFTYPE_MESH_POINT:
> -			WARN_ON(ieee80211_if_config(sdata, changed));
> -			ieee80211_bss_info_change_notify(sdata, ~0);
> +			/*
> +			 * Driver's config_interface can fail if rfkill is
> +			 * enabled. Accommodate this return code.
> +			 * FIXME: When mac80211 has knowledge of rfkill
> +			 * state the code below can change back to:
> +			 *   WARN(ieee80211_if_config(sdata, changed));
> +			 *   ieee80211_bss_info_change_notify(sdata, ~0);
> +			 */
> +			if (ieee80211_if_config(sdata, changed))
> +				printk(KERN_DEBUG "%s: failed to reconfigure interface\n",
> +				       sdata->dev->name);
> +			else
> +				ieee80211_bss_info_change_notify(sdata, ~0);
>  			break;
>  		case NL80211_IFTYPE_WDS:
>  			break;

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