Search Linux Wireless

Re: [PATCH] Fix oops when set_monitor_enabled() not defined in the struct cfg80211_ops

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

 



On Sun, 2012-07-08 at 14:08 +0300, Vladimir Kondratiev wrote:
> Quick fix for method being invoked without checking its existence
> 
> Signed-off-by: Vladimir Kondratiev <qca_vkondrat@xxxxxxxxxxxxxxxx>
> ---
>  net/wireless/core.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/net/wireless/core.c b/net/wireless/core.c
> index eb60410..e42a97b 100644
> --- a/net/wireless/core.c
> +++ b/net/wireless/core.c
> @@ -774,8 +774,9 @@ void cfg80211_update_iface_num(struct cfg80211_registered_device *rdev,
>  
>  	has_monitors_only_new = cfg80211_has_monitors_only(rdev);
>  	if (has_monitors_only_new != has_monitors_only_old) {
> -		rdev->ops->set_monitor_enabled(&rdev->wiphy,
> -					       has_monitors_only_new);
> +		if (rdev->ops->set_monitor_enabled)
> +			rdev->ops->set_monitor_enabled(&rdev->wiphy,
> +						       has_monitors_only_new);

Oh, good catch, applied

johannes

--
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