[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1227779910.3809.48.camel@johannes.berg>
Date: Thu, 27 Nov 2008 10:58:30 +0100
From: Johannes Berg <johannes@...solutions.net>
To: Inaky Perez-Gonzalez <inaky@...ux.intel.com>
Cc: netdev <netdev@...r.kernel.org>, Thomas Graf <tgraf@...g.ch>
Subject: Re: [PATCH 12/39] wimax: API call to reset a WiMAX device
On Wed, 2008-11-26 at 15:07 -0800, Inaky Perez-Gonzalez wrote:
> Provides wimax_reset() for the kernel to reset a wimax device as
> needed.
>
> Exports wimax_reset() over generic netlink to user space.
> +struct genl_ops wimax_gnl_reset = {
> + .cmd = WIMAX_GNL_OP_RESET,
> + .flags = 0,
permission check again
> + /* Execute the operation and send the result back to user space */
> + result = wimax_reset(wimax_dev);
> + result2 = wimax_gnl_send_rp_result(wimax_dev, info, result);
> + if (result2 < 0)
> + dev_err(dev, "WIMAX_GNL_RESET: can't send result %d to "
> + "userspace: %d\n", result, result2);
> + result = 0;
> + dev_put(wimax_dev->net_dev);
> +error_no_wimax_dev:
> +error_perm:
> + d_fnend(3, NULL, "(skb %p info %p) = %d\n", skb, info, result);
> + return result;
This is strange. Can you show your corresponding userspace code? It
shouldn't be necessary with generic netlink to explicitly send the
result, if you just return the result from wimax_reset() it'll be part
of the ACK message and thus already be relayed to userspace. I think
you're not using genl correctly here.
johannes
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists