cmd.action = cpu_to_le16(enable);
cmd.channel = cpu_to_le16(chan);
cmd.type = cpu_to_le16(priv->mesh_tlv);
-
+
if (enable) {
cmd.length = cpu_to_le16(priv->mesh_ssid_len);
memcpy(cmd.data, priv->mesh_ssid, priv->mesh_ssid_len);
#define lbs_cmd_with_response(priv, cmdnr, cmd) \
lbs_cmd(priv, cmdnr, cmd, lbs_cmd_copyback, (unsigned long) (cmd))
-
+
int __lbs_cmd(struct lbs_private *priv, uint16_t command,
- struct cmd_header *in_cmd, int in_cmd_size,
+ struct cmd_header *in_cmd, int in_cmd_size,
int (*callback)(struct lbs_private *, unsigned long, struct cmd_header *),
unsigned long callback_arg);
if (!buf)
return -ENOMEM;
-
+
buf_size = min(count, len - 1);
if (copy_from_user(buf, userbuf, buf_size)) {
res = -EFAULT;
* current block size.
*
* As SDIO is still new to the kernel, it is unfortunately common with
- * bugs in the host controllers related to that. One such bug is that
+ * bugs in the host controllers related to that. One such bug is that
* controllers cannot do transfers that aren't a multiple of 4 bytes.
* If you don't have time to fix the host controller driver, you can
* work around the problem by modifying if_sdio_host_to_card() and
setup_timer(&cardp->fw_timeout, if_usb_fw_timeo, (unsigned long)cardp);
init_waitqueue_head(&cardp->fw_wq);
-
+
cardp->udev = udev;
iface_desc = intf->cur_altsetting;
/* ... and wait for the process to complete */
wait_event_interruptible(cardp->fw_wq, cardp->surprise_removed || cardp->fwdnldover);
-
+
del_timer_sync(&cardp->fw_timeout);
usb_kill_urb(cardp->rx_urb);
static void lbs_remove_rtap(struct lbs_private *priv);
static int lbs_add_mesh(struct lbs_private *priv);
static void lbs_remove_mesh(struct lbs_private *priv);
-
+
/**
* Get function for sysfs attribute rtap
ret = lbs_mesh_config(priv, enable, priv->curbssparams.channel);
if (ret)
return ret;
-
+
if (enable)
lbs_add_mesh(priv);
else
netif_carrier_on(dev);
} else {
priv->infra_open = 1;
-
+
if (priv->connect_status == LBS_CONNECTED)
netif_carrier_on(dev);
else
netif_stop_queue(dev);
netif_carrier_off(dev);
-
+
spin_unlock_irq(&priv->driver_lock);
return 0;
}
priv->infra_open = 0;
netif_stop_queue(dev);
-
+
spin_unlock_irq(&priv->driver_lock);
return 0;
}
}
memset(&cmd, 0, sizeof(cmd));
-
+
ret = __lbs_cmd(priv, CMD_802_11_HOST_SLEEP_ACTIVATE, &cmd,
sizeof(cmd), lbs_suspend_callback, 0);
if (ret)
/* Enable mesh, if supported, and work out which TLV it uses.
0x100 + 291 is an unofficial value used in 5.110.20.pXX
0x100 + 37 is the official value used in 5.110.21.pXX
- but we check them in that order because 20.pXX doesn't
+ but we check them in that order because 20.pXX doesn't
give an error -- it just silently fails. */
/* 5.110.20.pXX firmware will fail the command if the channel
netif_stop_queue(priv->mesh_dev);
if (priv->tx_pending_len) {
- /* This can happen if packets come in on the mesh and eth
- device simultaneously -- there's no mutual exclusion on
+ /* This can happen if packets come in on the mesh and eth
+ device simultaneously -- there's no mutual exclusion on
hard_start_xmit() calls between devices. */
lbs_deb_tx("Packet on %s while busy\n", dev->name);
ret = NETDEV_TX_BUSY;