/* Wrapper to call a standard Wireless Extension handler. We do various checks and also take care of moving data between user space and kernel space.  */
static int ioctl_standard_call(struct net_device *dev, struct iwreq *iwr, unsigned int cmd, struct iw_request_info *info, iw_handler handler)
/* Wrapper to call a standard Wireless Extension handler. We do various checks and also take care of moving data between user space and kernel space.  */
static int ioctl_standard_call(struct net_device *dev, struct iwreq *iwr, unsigned int cmd, struct iw_request_info *info, iw_handler handler)
{
	const struct iw_ioctl_description *	descr;
	int					ret = -EINVAL;
	if ((cmd - SIOCIWFIRST) >= standard_ioctl_num)
		return -EOPNOTSUPP;
	descr = &(standard_ioctl[cmd - SIOCIWFIRST]);
	if (descr->header_type != IW_HEADER_TYPE_POINT) {
		ret = handler(dev, info, &(iwr->u), NULL);
		if ((descr->flags & IW_DESCR_FLAG_EVENT) &&
		   ((ret == 0) || (ret == -EIWCOMMIT)))
			wireless_send_event(dev, cmd, &(iwr->u), NULL);
	} else {
		ret = ioctl_standard_iw_point(&iwr->u.data, cmd, descr,
					      handler, dev, info);
	}
	if (ret == -EIWCOMMIT)
		ret = call_commit_handler(dev);
	return ret;
}