Lines Matching +full:pre +full:- +full:filled

6  * Copyright (C) 2007-2008 Intel Corporation <linux-wimax@intel.com>
7 * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
21 * 02110-1301, USA.
28 * This is intended for device-specific features, vendor quirks, etc.
48 * to the driver calling wimax_dev->op_msg_from_user(). The return
68 * wimax_dev->op_msg_from_user() Delivery of message to the driver
81 #include "wimax-internal.h"
85 #include "debug-levels.h"
89 * wimax_msg_alloc - Create a new skb for sending a message to userspace
111 * wimax_msg_send() depends on skb->data being placed at the
116 * wimax_dev->net_dev pointer is set to point to a proper
134 result = -ENOMEM; in wimax_msg_alloc()
145 wimax_dev->net_dev->ifindex); in wimax_msg_alloc()
177 * wimax_msg_data_len - Return a pointer and size of a message's payload
186 struct nlmsghdr *nlh = (void *) msg->head; in wimax_msg_data_len()
202 * wimax_msg_data - Return a pointer to a message's payload
208 struct nlmsghdr *nlh = (void *) msg->head; in wimax_msg_data()
223 * wimax_msg_len - Return a message's payload length
229 struct nlmsghdr *nlh = (void *) msg->head; in wimax_msg_len()
236 return -EINVAL; in wimax_msg_len()
244 * wimax_msg_send - Send a pre-allocated message to user space
255 * Sends a free-form message that was preallocated with
256 * wimax_msg_alloc() and filled up.
264 * wimax_msg_send() depends on skb->data being placed at the
269 * wimax_dev->net_dev pointer is set to point to a proper
276 void *msg = skb->data; in wimax_msg_send()
277 size_t size = skb->len; in wimax_msg_send()
290 * wimax_msg - Send a message to user space
302 * Sends a free-form message to user space on the device @wimax_dev.
312 int result = -ENOMEM; in wimax_msg()
338 * The skb is passed to the driver-specific function with the netlink
349 struct nlmsghdr *nlh = info->nlhdr; in wimax_gnl_doit_msg_from_user()
356 result = -ENODEV; in wimax_gnl_doit_msg_from_user()
357 if (info->attrs[WIMAX_GNL_MSG_IFIDX] == NULL) { in wimax_gnl_doit_msg_from_user()
362 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_MSG_IFIDX]); in wimax_gnl_doit_msg_from_user()
369 result = -EINVAL; in wimax_gnl_doit_msg_from_user()
370 if (info->attrs[WIMAX_GNL_MSG_DATA] == NULL) { in wimax_gnl_doit_msg_from_user()
375 msg_buf = nla_data(info->attrs[WIMAX_GNL_MSG_DATA]); in wimax_gnl_doit_msg_from_user()
376 msg_len = nla_len(info->attrs[WIMAX_GNL_MSG_DATA]); in wimax_gnl_doit_msg_from_user()
378 if (info->attrs[WIMAX_GNL_MSG_PIPE_NAME] == NULL) in wimax_gnl_doit_msg_from_user()
381 struct nlattr *attr = info->attrs[WIMAX_GNL_MSG_PIPE_NAME]; in wimax_gnl_doit_msg_from_user()
383 /* libnl-1.1 does not yet support NLA_NUL_STRING */ in wimax_gnl_doit_msg_from_user()
384 result = -ENOMEM; in wimax_gnl_doit_msg_from_user()
390 mutex_lock(&wimax_dev->mutex); in wimax_gnl_doit_msg_from_user()
392 if (result == -ENOMEDIUM) in wimax_gnl_doit_msg_from_user()
396 result = -ENOSYS; in wimax_gnl_doit_msg_from_user()
397 if (wimax_dev->op_msg_from_user == NULL) in wimax_gnl_doit_msg_from_user()
402 nlh->nlmsg_len, nlh->nlmsg_type, nlh->nlmsg_flags, in wimax_gnl_doit_msg_from_user()
403 nlh->nlmsg_seq, nlh->nlmsg_pid); in wimax_gnl_doit_msg_from_user()
407 result = wimax_dev->op_msg_from_user(wimax_dev, pipe_name, in wimax_gnl_doit_msg_from_user()
411 mutex_unlock(&wimax_dev->mutex); in wimax_gnl_doit_msg_from_user()
415 dev_put(wimax_dev->net_dev); in wimax_gnl_doit_msg_from_user()