Search Linux Wireless

Re: [PATCH 06/16] wl1251: split RX and TX data path initialisation

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

 



Hi!

> Split up data path initialisation into RX and TX data path initialisation
> functions. This change is required for channel switching in monitor mode.
> 
> Signed-off-by: David Gnedt <david.gnedt@xxxxxxxxxxx>
> ---
>  drivers/net/wireless/ti/wl1251/cmd.c  |   37 ++++++++++++++++++++++++++-------
>  drivers/net/wireless/ti/wl1251/cmd.h  |    3 ++-
>  drivers/net/wireless/ti/wl1251/init.c |    9 ++++++--
>  3 files changed, 39 insertions(+), 10 deletions(-)
> 
> @@ -238,6 +235,32 @@ int wl1251_cmd_data_path(struct wl1251 *wl, u8 channel, bool enable)
>  	wl1251_debug(DEBUG_BOOT, "rx %s cmd channel %d",
>  		     enable ? "start" : "stop", channel);
>  
> +out:
> +	kfree(cmd);
> +	return ret;
> +}
> +
> +int wl1251_cmd_data_path_tx(struct wl1251 *wl, u8 channel, bool enable)
> +{
> +	struct cmd_enabledisable_path *cmd;
> +	int ret;
> +	u16 cmd_tx;
> +
> +	wl1251_debug(DEBUG_CMD, "cmd data path");
> +
> +	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
> +	if (!cmd) {
> +		ret = -ENOMEM;
> +		goto out;
> +	}

Again, doing jump just to kfree(NULL)... is probably not worth
it.

Thanks,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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