Commit 87bc0728 authored by John W. Linville's avatar John W. Linville

Merge branch 'master' of...

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem

Conflicts:
	drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h
parents f421436a 01925efd
...@@ -57,7 +57,7 @@ struct ath3k_version { ...@@ -57,7 +57,7 @@ struct ath3k_version {
unsigned char reserved[0x07]; unsigned char reserved[0x07];
}; };
static struct usb_device_id ath3k_table[] = { static const struct usb_device_id ath3k_table[] = {
/* Atheros AR3011 */ /* Atheros AR3011 */
{ USB_DEVICE(0x0CF3, 0x3000) }, { USB_DEVICE(0x0CF3, 0x3000) },
...@@ -112,7 +112,7 @@ MODULE_DEVICE_TABLE(usb, ath3k_table); ...@@ -112,7 +112,7 @@ MODULE_DEVICE_TABLE(usb, ath3k_table);
#define BTUSB_ATH3012 0x80 #define BTUSB_ATH3012 0x80
/* This table is to load patch and sysconfig files /* This table is to load patch and sysconfig files
* for AR3012 */ * for AR3012 */
static struct usb_device_id ath3k_blist_tbl[] = { static const struct usb_device_id ath3k_blist_tbl[] = {
/* Atheros AR3012 with sflash firmware*/ /* Atheros AR3012 with sflash firmware*/
{ USB_DEVICE(0x0CF3, 0x0036), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0CF3, 0x0036), .driver_info = BTUSB_ATH3012 },
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
static struct usb_driver bfusb_driver; static struct usb_driver bfusb_driver;
static struct usb_device_id bfusb_table[] = { static const struct usb_device_id bfusb_table[] = {
/* AVM BlueFRITZ! USB */ /* AVM BlueFRITZ! USB */
{ USB_DEVICE(0x057c, 0x2200) }, { USB_DEVICE(0x057c, 0x2200) },
...@@ -318,7 +318,6 @@ static inline int bfusb_recv_block(struct bfusb_data *data, int hdr, unsigned ch ...@@ -318,7 +318,6 @@ static inline int bfusb_recv_block(struct bfusb_data *data, int hdr, unsigned ch
return -ENOMEM; return -ENOMEM;
} }
skb->dev = (void *) data->hdev;
bt_cb(skb)->pkt_type = pkt_type; bt_cb(skb)->pkt_type = pkt_type;
data->reassembly = skb; data->reassembly = skb;
...@@ -333,7 +332,7 @@ static inline int bfusb_recv_block(struct bfusb_data *data, int hdr, unsigned ch ...@@ -333,7 +332,7 @@ static inline int bfusb_recv_block(struct bfusb_data *data, int hdr, unsigned ch
memcpy(skb_put(data->reassembly, len), buf, len); memcpy(skb_put(data->reassembly, len), buf, len);
if (hdr & 0x08) { if (hdr & 0x08) {
hci_recv_frame(data->reassembly); hci_recv_frame(data->hdev, data->reassembly);
data->reassembly = NULL; data->reassembly = NULL;
} }
...@@ -465,26 +464,18 @@ static int bfusb_close(struct hci_dev *hdev) ...@@ -465,26 +464,18 @@ static int bfusb_close(struct hci_dev *hdev)
return 0; return 0;
} }
static int bfusb_send_frame(struct sk_buff *skb) static int bfusb_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
{ {
struct hci_dev *hdev = (struct hci_dev *) skb->dev; struct bfusb_data *data = hci_get_drvdata(hdev);
struct bfusb_data *data;
struct sk_buff *nskb; struct sk_buff *nskb;
unsigned char buf[3]; unsigned char buf[3];
int sent = 0, size, count; int sent = 0, size, count;
BT_DBG("hdev %p skb %p type %d len %d", hdev, skb, bt_cb(skb)->pkt_type, skb->len); BT_DBG("hdev %p skb %p type %d len %d", hdev, skb, bt_cb(skb)->pkt_type, skb->len);
if (!hdev) {
BT_ERR("Frame for unknown HCI device (hdev=NULL)");
return -ENODEV;
}
if (!test_bit(HCI_RUNNING, &hdev->flags)) if (!test_bit(HCI_RUNNING, &hdev->flags))
return -EBUSY; return -EBUSY;
data = hci_get_drvdata(hdev);
switch (bt_cb(skb)->pkt_type) { switch (bt_cb(skb)->pkt_type) {
case HCI_COMMAND_PKT: case HCI_COMMAND_PKT:
hdev->stat.cmd_tx++; hdev->stat.cmd_tx++;
...@@ -544,11 +535,6 @@ static int bfusb_send_frame(struct sk_buff *skb) ...@@ -544,11 +535,6 @@ static int bfusb_send_frame(struct sk_buff *skb)
return 0; return 0;
} }
static int bfusb_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long arg)
{
return -ENOIOCTLCMD;
}
static int bfusb_load_firmware(struct bfusb_data *data, static int bfusb_load_firmware(struct bfusb_data *data,
const unsigned char *firmware, int count) const unsigned char *firmware, int count)
{ {
...@@ -699,11 +685,10 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i ...@@ -699,11 +685,10 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
hci_set_drvdata(hdev, data); hci_set_drvdata(hdev, data);
SET_HCIDEV_DEV(hdev, &intf->dev); SET_HCIDEV_DEV(hdev, &intf->dev);
hdev->open = bfusb_open; hdev->open = bfusb_open;
hdev->close = bfusb_close; hdev->close = bfusb_close;
hdev->flush = bfusb_flush; hdev->flush = bfusb_flush;
hdev->send = bfusb_send_frame; hdev->send = bfusb_send_frame;
hdev->ioctl = bfusb_ioctl;
if (hci_register_dev(hdev) < 0) { if (hci_register_dev(hdev) < 0) {
BT_ERR("Can't register HCI device"); BT_ERR("Can't register HCI device");
......
...@@ -399,7 +399,6 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset) ...@@ -399,7 +399,6 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)
if (info->rx_state == RECV_WAIT_PACKET_TYPE) { if (info->rx_state == RECV_WAIT_PACKET_TYPE) {
info->rx_skb->dev = (void *) info->hdev;
bt_cb(info->rx_skb)->pkt_type = buf[i]; bt_cb(info->rx_skb)->pkt_type = buf[i];
switch (bt_cb(info->rx_skb)->pkt_type) { switch (bt_cb(info->rx_skb)->pkt_type) {
...@@ -477,7 +476,7 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset) ...@@ -477,7 +476,7 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)
break; break;
case RECV_WAIT_DATA: case RECV_WAIT_DATA:
hci_recv_frame(info->rx_skb); hci_recv_frame(info->hdev, info->rx_skb);
info->rx_skb = NULL; info->rx_skb = NULL;
break; break;
...@@ -659,17 +658,9 @@ static int bluecard_hci_close(struct hci_dev *hdev) ...@@ -659,17 +658,9 @@ static int bluecard_hci_close(struct hci_dev *hdev)
} }
static int bluecard_hci_send_frame(struct sk_buff *skb) static int bluecard_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
{ {
bluecard_info_t *info; bluecard_info_t *info = hci_get_drvdata(hdev);
struct hci_dev *hdev = (struct hci_dev *)(skb->dev);
if (!hdev) {
BT_ERR("Frame for unknown HCI device (hdev=NULL)");
return -ENODEV;
}
info = hci_get_drvdata(hdev);
switch (bt_cb(skb)->pkt_type) { switch (bt_cb(skb)->pkt_type) {
case HCI_COMMAND_PKT: case HCI_COMMAND_PKT:
...@@ -693,12 +684,6 @@ static int bluecard_hci_send_frame(struct sk_buff *skb) ...@@ -693,12 +684,6 @@ static int bluecard_hci_send_frame(struct sk_buff *skb)
} }
static int bluecard_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long arg)
{
return -ENOIOCTLCMD;
}
/* ======================== Card services HCI interaction ======================== */ /* ======================== Card services HCI interaction ======================== */
...@@ -734,11 +719,10 @@ static int bluecard_open(bluecard_info_t *info) ...@@ -734,11 +719,10 @@ static int bluecard_open(bluecard_info_t *info)
hci_set_drvdata(hdev, info); hci_set_drvdata(hdev, info);
SET_HCIDEV_DEV(hdev, &info->p_dev->dev); SET_HCIDEV_DEV(hdev, &info->p_dev->dev);
hdev->open = bluecard_hci_open; hdev->open = bluecard_hci_open;
hdev->close = bluecard_hci_close; hdev->close = bluecard_hci_close;
hdev->flush = bluecard_hci_flush; hdev->flush = bluecard_hci_flush;
hdev->send = bluecard_hci_send_frame; hdev->send = bluecard_hci_send_frame;
hdev->ioctl = bluecard_hci_ioctl;
id = inb(iobase + 0x30); id = inb(iobase + 0x30);
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#define VERSION "0.10" #define VERSION "0.10"
static struct usb_device_id bpa10x_table[] = { static const struct usb_device_id bpa10x_table[] = {
/* Tektronix BPA 100/105 (Digianswer) */ /* Tektronix BPA 100/105 (Digianswer) */
{ USB_DEVICE(0x08fd, 0x0002) }, { USB_DEVICE(0x08fd, 0x0002) },
...@@ -129,8 +129,6 @@ static int bpa10x_recv(struct hci_dev *hdev, int queue, void *buf, int count) ...@@ -129,8 +129,6 @@ static int bpa10x_recv(struct hci_dev *hdev, int queue, void *buf, int count)
return -ENOMEM; return -ENOMEM;
} }
skb->dev = (void *) hdev;
data->rx_skb[queue] = skb; data->rx_skb[queue] = skb;
scb = (void *) skb->cb; scb = (void *) skb->cb;
...@@ -155,7 +153,7 @@ static int bpa10x_recv(struct hci_dev *hdev, int queue, void *buf, int count) ...@@ -155,7 +153,7 @@ static int bpa10x_recv(struct hci_dev *hdev, int queue, void *buf, int count)
data->rx_skb[queue] = NULL; data->rx_skb[queue] = NULL;
bt_cb(skb)->pkt_type = scb->type; bt_cb(skb)->pkt_type = scb->type;
hci_recv_frame(skb); hci_recv_frame(hdev, skb);
} }
count -= len; buf += len; count -= len; buf += len;
...@@ -352,9 +350,8 @@ static int bpa10x_flush(struct hci_dev *hdev) ...@@ -352,9 +350,8 @@ static int bpa10x_flush(struct hci_dev *hdev)
return 0; return 0;
} }
static int bpa10x_send_frame(struct sk_buff *skb) static int bpa10x_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
{ {
struct hci_dev *hdev = (struct hci_dev *) skb->dev;
struct bpa10x_data *data = hci_get_drvdata(hdev); struct bpa10x_data *data = hci_get_drvdata(hdev);
struct usb_ctrlrequest *dr; struct usb_ctrlrequest *dr;
struct urb *urb; struct urb *urb;
...@@ -366,6 +363,8 @@ static int bpa10x_send_frame(struct sk_buff *skb) ...@@ -366,6 +363,8 @@ static int bpa10x_send_frame(struct sk_buff *skb)
if (!test_bit(HCI_RUNNING, &hdev->flags)) if (!test_bit(HCI_RUNNING, &hdev->flags))
return -EBUSY; return -EBUSY;
skb->dev = (void *) hdev;
urb = usb_alloc_urb(0, GFP_ATOMIC); urb = usb_alloc_urb(0, GFP_ATOMIC);
if (!urb) if (!urb)
return -ENOMEM; return -ENOMEM;
......
...@@ -247,7 +247,6 @@ static void bt3c_receive(bt3c_info_t *info) ...@@ -247,7 +247,6 @@ static void bt3c_receive(bt3c_info_t *info)
if (info->rx_state == RECV_WAIT_PACKET_TYPE) { if (info->rx_state == RECV_WAIT_PACKET_TYPE) {
info->rx_skb->dev = (void *) info->hdev;
bt_cb(info->rx_skb)->pkt_type = inb(iobase + DATA_L); bt_cb(info->rx_skb)->pkt_type = inb(iobase + DATA_L);
inb(iobase + DATA_H); inb(iobase + DATA_H);
//printk("bt3c: PACKET_TYPE=%02x\n", bt_cb(info->rx_skb)->pkt_type); //printk("bt3c: PACKET_TYPE=%02x\n", bt_cb(info->rx_skb)->pkt_type);
...@@ -318,7 +317,7 @@ static void bt3c_receive(bt3c_info_t *info) ...@@ -318,7 +317,7 @@ static void bt3c_receive(bt3c_info_t *info)
break; break;
case RECV_WAIT_DATA: case RECV_WAIT_DATA:
hci_recv_frame(info->rx_skb); hci_recv_frame(info->hdev, info->rx_skb);
info->rx_skb = NULL; info->rx_skb = NULL;
break; break;
...@@ -416,19 +415,11 @@ static int bt3c_hci_close(struct hci_dev *hdev) ...@@ -416,19 +415,11 @@ static int bt3c_hci_close(struct hci_dev *hdev)
} }
static int bt3c_hci_send_frame(struct sk_buff *skb) static int bt3c_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
{ {
bt3c_info_t *info; bt3c_info_t *info = hci_get_drvdata(hdev);
struct hci_dev *hdev = (struct hci_dev *)(skb->dev);
unsigned long flags; unsigned long flags;
if (!hdev) {
BT_ERR("Frame for unknown HCI device (hdev=NULL)");
return -ENODEV;
}
info = hci_get_drvdata(hdev);
switch (bt_cb(skb)->pkt_type) { switch (bt_cb(skb)->pkt_type) {
case HCI_COMMAND_PKT: case HCI_COMMAND_PKT:
hdev->stat.cmd_tx++; hdev->stat.cmd_tx++;
...@@ -455,12 +446,6 @@ static int bt3c_hci_send_frame(struct sk_buff *skb) ...@@ -455,12 +446,6 @@ static int bt3c_hci_send_frame(struct sk_buff *skb)
} }
static int bt3c_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long arg)
{
return -ENOIOCTLCMD;
}
/* ======================== Card services HCI interaction ======================== */ /* ======================== Card services HCI interaction ======================== */
...@@ -577,11 +562,10 @@ static int bt3c_open(bt3c_info_t *info) ...@@ -577,11 +562,10 @@ static int bt3c_open(bt3c_info_t *info)
hci_set_drvdata(hdev, info); hci_set_drvdata(hdev, info);
SET_HCIDEV_DEV(hdev, &info->p_dev->dev); SET_HCIDEV_DEV(hdev, &info->p_dev->dev);
hdev->open = bt3c_hci_open; hdev->open = bt3c_hci_open;
hdev->close = bt3c_hci_close; hdev->close = bt3c_hci_close;
hdev->flush = bt3c_hci_flush; hdev->flush = bt3c_hci_flush;
hdev->send = bt3c_hci_send_frame; hdev->send = bt3c_hci_send_frame;
hdev->ioctl = bt3c_hci_ioctl;
/* Load firmware */ /* Load firmware */
err = request_firmware(&firmware, "BT3CPCC.bin", &info->p_dev->dev); err = request_firmware(&firmware, "BT3CPCC.bin", &info->p_dev->dev);
......
...@@ -187,7 +187,6 @@ static int btmrvl_send_sync_cmd(struct btmrvl_private *priv, u16 cmd_no, ...@@ -187,7 +187,6 @@ static int btmrvl_send_sync_cmd(struct btmrvl_private *priv, u16 cmd_no,
bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT; bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT;
skb->dev = (void *) priv->btmrvl_dev.hcidev;
skb_queue_head(&priv->adapter->tx_queue, skb); skb_queue_head(&priv->adapter->tx_queue, skb);
priv->btmrvl_dev.sendcmdflag = true; priv->btmrvl_dev.sendcmdflag = true;
...@@ -356,26 +355,12 @@ static void btmrvl_free_adapter(struct btmrvl_private *priv) ...@@ -356,26 +355,12 @@ static void btmrvl_free_adapter(struct btmrvl_private *priv)
priv->adapter = NULL; priv->adapter = NULL;
} }
static int btmrvl_ioctl(struct hci_dev *hdev, static int btmrvl_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
unsigned int cmd, unsigned long arg)
{ {
return -ENOIOCTLCMD; struct btmrvl_private *priv = hci_get_drvdata(hdev);
}
static int btmrvl_send_frame(struct sk_buff *skb)
{
struct hci_dev *hdev = (struct hci_dev *) skb->dev;
struct btmrvl_private *priv = NULL;
BT_DBG("type=%d, len=%d", skb->pkt_type, skb->len); BT_DBG("type=%d, len=%d", skb->pkt_type, skb->len);
if (!hdev) {
BT_ERR("Frame for unknown HCI device");
return -ENODEV;
}
priv = hci_get_drvdata(hdev);
if (!test_bit(HCI_RUNNING, &hdev->flags)) { if (!test_bit(HCI_RUNNING, &hdev->flags)) {
BT_ERR("Failed testing HCI_RUNING, flags=%lx", hdev->flags); BT_ERR("Failed testing HCI_RUNING, flags=%lx", hdev->flags);
print_hex_dump_bytes("data: ", DUMP_PREFIX_OFFSET, print_hex_dump_bytes("data: ", DUMP_PREFIX_OFFSET,
...@@ -650,12 +635,11 @@ int btmrvl_register_hdev(struct btmrvl_private *priv) ...@@ -650,12 +635,11 @@ int btmrvl_register_hdev(struct btmrvl_private *priv)
priv->btmrvl_dev.hcidev = hdev; priv->btmrvl_dev.hcidev = hdev;
hci_set_drvdata(hdev, priv); hci_set_drvdata(hdev, priv);
hdev->bus = HCI_SDIO; hdev->bus = HCI_SDIO;
hdev->open = btmrvl_open; hdev->open = btmrvl_open;
hdev->close = btmrvl_close; hdev->close = btmrvl_close;
hdev->flush = btmrvl_flush; hdev->flush = btmrvl_flush;
hdev->send = btmrvl_send_frame; hdev->send = btmrvl_send_frame;
hdev->ioctl = btmrvl_ioctl;
hdev->setup = btmrvl_setup; hdev->setup = btmrvl_setup;
hdev->dev_type = priv->btmrvl_dev.dev_type; hdev->dev_type = priv->btmrvl_dev.dev_type;
......
...@@ -600,15 +600,14 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv) ...@@ -600,15 +600,14 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
case HCI_SCODATA_PKT: case HCI_SCODATA_PKT:
case HCI_EVENT_PKT: case HCI_EVENT_PKT:
bt_cb(skb)->pkt_type = type; bt_cb(skb)->pkt_type = type;
skb->dev = (void *)hdev;
skb_put(skb, buf_len); skb_put(skb, buf_len);
skb_pull(skb, SDIO_HEADER_LEN); skb_pull(skb, SDIO_HEADER_LEN);
if (type == HCI_EVENT_PKT) { if (type == HCI_EVENT_PKT) {
if (btmrvl_check_evtpkt(priv, skb)) if (btmrvl_check_evtpkt(priv, skb))
hci_recv_frame(skb); hci_recv_frame(hdev, skb);
} else { } else {
hci_recv_frame(skb); hci_recv_frame(hdev, skb);
} }
hdev->stat.byte_rx += buf_len; hdev->stat.byte_rx += buf_len;
...@@ -616,12 +615,11 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv) ...@@ -616,12 +615,11 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
case MRVL_VENDOR_PKT: case MRVL_VENDOR_PKT:
bt_cb(skb)->pkt_type = HCI_VENDOR_PKT; bt_cb(skb)->pkt_type = HCI_VENDOR_PKT;
skb->dev = (void *)hdev;
skb_put(skb, buf_len); skb_put(skb, buf_len);
skb_pull(skb, SDIO_HEADER_LEN); skb_pull(skb, SDIO_HEADER_LEN);
if (btmrvl_process_event(priv, skb)) if (btmrvl_process_event(priv, skb))
hci_recv_frame(skb); hci_recv_frame(hdev, skb);
hdev->stat.byte_rx += buf_len; hdev->stat.byte_rx += buf_len;
break; break;
......
...@@ -157,10 +157,9 @@ static int btsdio_rx_packet(struct btsdio_data *data) ...@@ -157,10 +157,9 @@ static int btsdio_rx_packet(struct btsdio_data *data)
data->hdev->stat.byte_rx += len; data->hdev->stat.byte_rx += len;
skb->dev = (void *) data->hdev;
bt_cb(skb)->pkt_type = hdr[3]; bt_cb(skb)->pkt_type = hdr[3];
err = hci_recv_frame(skb); err = hci_recv_frame(data->hdev, skb);
if (err < 0) if (err < 0)
return err; return err;
...@@ -255,9 +254,8 @@ static int btsdio_flush(struct hci_dev *hdev) ...@@ -255,9 +254,8 @@ static int btsdio_flush(struct hci_dev *hdev)
return 0; return 0;
} }
static int btsdio_send_frame(struct sk_buff *skb) static int btsdio_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
{ {
struct hci_dev *hdev = (struct hci_dev *) skb->dev;
struct btsdio_data *data = hci_get_drvdata(hdev); struct btsdio_data *data = hci_get_drvdata(hdev);
BT_DBG("%s", hdev->name); BT_DBG("%s", hdev->name);
......
...@@ -198,7 +198,6 @@ static void btuart_receive(btuart_info_t *info) ...@@ -198,7 +198,6 @@ static void btuart_receive(btuart_info_t *info)
if (info->rx_state == RECV_WAIT_PACKET_TYPE) { if (info->rx_state == RECV_WAIT_PACKET_TYPE) {
info->rx_skb->dev = (void *) info->hdev;
bt_cb(info->rx_skb)->pkt_type = inb(iobase + UART_RX); bt_cb(info->rx_skb)->pkt_type = inb(iobase + UART_RX);
switch (bt_cb(info->rx_skb)->pkt_type) { switch (bt_cb(info->rx_skb)->pkt_type) {
...@@ -265,7 +264,7 @@ static void btuart_receive(btuart_info_t *info) ...@@ -265,7 +264,7 @@ static void btuart_receive(btuart_info_t *info)
break; break;
case RECV_WAIT_DATA: case RECV_WAIT_DATA:
hci_recv_frame(info->rx_skb); hci_recv_frame(info->hdev, info->rx_skb);
info->rx_skb = NULL; info->rx_skb = NULL;
break; break;
...@@ -424,17 +423,9 @@ static int btuart_hci_close(struct hci_dev *hdev) ...@@ -424,17 +423,9 @@ static int btuart_hci_close(struct hci_dev *hdev)
} }
static int btuart_hci_send_frame(struct sk_buff *skb) static int btuart_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
{ {
btuart_info_t *info; btuart_info_t *info = hci_get_drvdata(hdev);
struct hci_dev *hdev = (struct hci_dev *)(skb->dev);
if (!hdev) {
BT_ERR("Frame for unknown HCI device (hdev=NULL)");
return -ENODEV;
}
info = hci_get_drvdata(hdev);
switch (bt_cb(skb)->pkt_type) { switch (bt_cb(skb)->pkt_type) {
case HCI_COMMAND_PKT: case HCI_COMMAND_PKT:
...@@ -458,12 +449,6 @@ static int btuart_hci_send_frame(struct sk_buff *skb) ...@@ -458,12 +449,6 @@ static int btuart_hci_send_frame(struct sk_buff *skb)
} }
static int btuart_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long arg)
{
return -ENOIOCTLCMD;
}
/* ======================== Card services HCI interaction ======================== */ /* ======================== Card services HCI interaction ======================== */
...@@ -495,11 +480,10 @@ static int btuart_open(btuart_info_t *info) ...@@ -495,11 +480,10 @@ static int btuart_open(btuart_info_t *info)
hci_set_drvdata(hdev, info); hci_set_drvdata(hdev, info);
SET_HCIDEV_DEV(hdev, &info->p_dev->dev); SET_HCIDEV_DEV(hdev, &info->p_dev->dev);
hdev->open = btuart_hci_open; hdev->open = btuart_hci_open;
hdev->close = btuart_hci_close; hdev->close = btuart_hci_close;
hdev->flush = btuart_hci_flush; hdev->flush = btuart_hci_flush;
hdev->send = btuart_hci_send_frame; hdev->send = btuart_hci_send_frame;
hdev->ioctl = btuart_hci_ioctl;
spin_lock_irqsave(&(info->lock), flags); spin_lock_irqsave(&(info->lock), flags);
......
...@@ -50,7 +50,7 @@ static struct usb_driver btusb_driver; ...@@ -50,7 +50,7 @@ static struct usb_driver btusb_driver;
#define BTUSB_ATH3012 0x80 #define BTUSB_ATH3012 0x80
#define BTUSB_INTEL 0x100 #define BTUSB_INTEL 0x100
static struct usb_device_id btusb_table[] = { static const struct usb_device_id btusb_table[] = {
/* Generic Bluetooth USB device */ /* Generic Bluetooth USB device */
{ USB_DEVICE_INFO(0xe0, 0x01, 0x01) }, { USB_DEVICE_INFO(0xe0, 0x01, 0x01) },
...@@ -121,7 +121,7 @@ static struct usb_device_id btusb_table[] = { ...@@ -121,7 +121,7 @@ static struct usb_device_id btusb_table[] = {
MODULE_DEVICE_TABLE(usb, btusb_table); MODULE_DEVICE_TABLE(usb, btusb_table);
static struct usb_device_id blacklist_table[] = { static const struct usb_device_id blacklist_table[] = {
/* CSR BlueCore devices */ /* CSR BlueCore devices */
{ USB_DEVICE(0x0a12, 0x0001), .driver_info = BTUSB_CSR }, { USB_DEVICE(0x0a12, 0x0001), .driver_info = BTUSB_CSR },
...@@ -716,9 +716,8 @@ static int btusb_flush(struct hci_dev *hdev) ...@@ -716,9 +716,8 @@ static int btusb_flush(struct hci_dev *hdev)
return 0; return 0;
} }
static int btusb_send_frame(struct sk_buff *skb) static int btusb_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
{ {
struct hci_dev *hdev = (struct hci_dev *) skb->dev;
struct btusb_data *data = hci_get_drvdata(hdev); struct btusb_data *data = hci_get_drvdata(hdev);
struct usb_ctrlrequest *dr; struct usb_ctrlrequest *dr;
struct urb *urb; struct urb *urb;
...@@ -730,6 +729,8 @@ static int btusb_send_frame(struct sk_buff *skb) ...@@ -730,6 +729,8 @@ static int btusb_send_frame(struct sk_buff *skb)
if (!test_bit(HCI_RUNNING, &hdev->flags)) if (!test_bit(HCI_RUNNING, &hdev->flags))
return -EBUSY; return -EBUSY;
skb->dev = (void *) hdev;
switch (bt_cb(skb)->pkt_type) { switch (bt_cb(skb)->pkt_type) {
case HCI_COMMAND_PKT: case HCI_COMMAND_PKT:
urb = usb_alloc_urb(0, GFP_ATOMIC); urb = usb_alloc_urb(0, GFP_ATOMIC);
...@@ -774,7 +775,7 @@ static int btusb_send_frame(struct sk_buff *skb) ...@@ -774,7 +775,7 @@ static int btusb_send_frame(struct sk_buff *skb)
break; break;
case HCI_SCODATA_PKT: case HCI_SCODATA_PKT:
if (!data->isoc_tx_ep || hdev->conn_hash.sco_num < 1) if (!data->isoc_tx_ep || hci_conn_num(hdev, SCO_LINK) < 1)
return -ENODEV; return -ENODEV;
urb = usb_alloc_urb(BTUSB_MAX_ISOC_FRAMES, GFP_ATOMIC); urb = usb_alloc_urb(BTUSB_MAX_ISOC_FRAMES, GFP_ATOMIC);
...@@ -833,8 +834,8 @@ static void btusb_notify(struct hci_dev *hdev, unsigned int evt) ...@@ -833,8 +834,8 @@ static void btusb_notify(struct hci_dev *hdev, unsigned int evt)
BT_DBG("%s evt %d", hdev->name, evt); BT_DBG("%s evt %d", hdev->name, evt);
if (hdev->conn_hash.sco_num != data->sco_num) { if (hci_conn_num(hdev, SCO_LINK) != data->sco_num) {
data->sco_num = hdev->conn_hash.sco_num; data->sco_num = hci_conn_num(hdev, SCO_LINK);
schedule_work(&data->work); schedule_work(&data->work);
} }
} }
...@@ -889,7 +890,7 @@ static void btusb_work(struct work_struct *work) ...@@ -889,7 +890,7 @@ static void btusb_work(struct work_struct *work)
int new_alts; int new_alts;
int err; int err;
if (hdev->conn_hash.sco_num > 0) { if (data->sco_num > 0) {
if (!test_bit(BTUSB_DID_ISO_RESUME, &data->flags)) { if (!test_bit(BTUSB_DID_ISO_RESUME, &data->flags)) {
err = usb_autopm_get_interface(data->isoc ? data->isoc : data->intf); err = usb_autopm_get_interface(data->isoc ? data->isoc : data->intf);
if (err < 0) { if (err < 0) {
...@@ -903,9 +904,9 @@ static void btusb_work(struct work_struct *work) ...@@ -903,9 +904,9 @@ static void btusb_work(struct work_struct *work)
if (hdev->voice_setting & 0x0020) { if (hdev->voice_setting & 0x0020) {
static const int alts[3] = { 2, 4, 5 }; static const int alts[3] = { 2, 4, 5 };
new_alts = alts[hdev->conn_hash.sco_num - 1]; new_alts = alts[data->sco_num - 1];
} else { } else {
new_alts = hdev->conn_hash.sco_num; new_alts = data->sco_num;
} }
if (data->isoc_altsetting != new_alts) { if (data->isoc_altsetting != new_alts) {
......
...@@ -108,10 +108,8 @@ static long st_receive(void *priv_data, struct sk_buff *skb) ...@@ -108,10 +108,8 @@ static long st_receive(void *priv_data, struct sk_buff *skb)
return -EFAULT; return -EFAULT;
} }
skb->dev = (void *) lhst->hdev;
/* Forward skb to HCI core layer */ /* Forward skb to HCI core layer */
err = hci_recv_frame(skb); err = hci_recv_frame(lhst->hdev, skb);
if (err < 0) { if (err < 0) {
BT_ERR("Unable to push skb to HCI core(%d)", err); BT_ERR("Unable to push skb to HCI core(%d)", err);
return err; return err;
...@@ -253,14 +251,11 @@ static int ti_st_close(struct hci_dev *hdev) ...@@ -253,14 +251,11 @@ static int ti_st_close(struct hci_dev *hdev)
return err; return err;
} }
static int ti_st_send_frame(struct sk_buff *skb) static int ti_st_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
{ {
struct hci_dev *hdev;
struct ti_st *hst; struct ti_st *hst;
long len; long len;
hdev = (struct hci_dev *)skb->dev;
if (!test_bit(HCI_RUNNING, &hdev->flags)) if (!test_bit(HCI_RUNNING, &hdev->flags))
return -EBUSY; return -EBUSY;
......
...@@ -256,9 +256,8 @@ static void dtl1_receive(dtl1_info_t *info) ...@@ -256,9 +256,8 @@ static void dtl1_receive(dtl1_info_t *info)
case 0x83: case 0x83:
case 0x84: case 0x84:
/* send frame to the HCI layer */ /* send frame to the HCI layer */
info->rx_skb->dev = (void *) info->hdev;
bt_cb(info->rx_skb)->pkt_type &= 0x0f; bt_cb(info->rx_skb)->pkt_type &= 0x0f;
hci_recv_frame(info->rx_skb); hci_recv_frame(info->hdev, info->rx_skb);
break; break;
default: default:
/* unknown packet */ /* unknown packet */
...@@ -383,20 +382,12 @@ static int dtl1_hci_close(struct hci_dev *hdev) ...@@ -383,20 +382,12 @@ static int dtl1_hci_close(struct hci_dev *hdev)
} }
static int dtl1_hci_send_frame(struct sk_buff *skb) static int dtl1_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
{ {
dtl1_info_t *info; dtl1_info_t *info = hci_get_drvdata(hdev);
struct hci_dev *hdev = (struct hci_dev *)(skb->dev);
struct sk_buff *s; struct sk_buff *s;
nsh_t nsh; nsh_t nsh;
if (!hdev) {
BT_ERR("Frame for unknown HCI device (hdev=NULL)");
return -ENODEV;
}
info = hci_get_drvdata(hdev);
switch (bt_cb(skb)->pkt_type) { switch (bt_cb(skb)->pkt_type) {
case HCI_COMMAND_PKT: case HCI_COMMAND_PKT:
hdev->stat.cmd_tx++; hdev->stat.cmd_tx++;
...@@ -438,12 +429,6 @@ static int dtl1_hci_send_frame(struct sk_buff *skb) ...@@ -438,12 +429,6 @@ static int dtl1_hci_send_frame(struct sk_buff *skb)
} }
static int dtl1_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long arg)
{
return -ENOIOCTLCMD;
}
/* ======================== Card services HCI interaction ======================== */ /* ======================== Card services HCI interaction ======================== */
...@@ -477,11 +462,10 @@ static int dtl1_open(dtl1_info_t *info) ...@@ -477,11 +462,10 @@ static int dtl1_open(dtl1_info_t *info)
hci_set_drvdata(hdev, info); hci_set_drvdata(hdev, info);
SET_HCIDEV_DEV(hdev, &info->p_dev->dev); SET_HCIDEV_DEV(hdev, &info->p_dev->dev);
hdev->open = dtl1_hci_open; hdev->open = dtl1_hci_open;
hdev->close = dtl1_hci_close; hdev->close = dtl1_hci_close;
hdev->flush = dtl1_hci_flush; hdev->flush = dtl1_hci_flush;
hdev->send = dtl1_hci_send_frame; hdev->send = dtl1_hci_send_frame;
hdev->ioctl = dtl1_hci_ioctl;
spin_lock_irqsave(&(info->lock), flags); spin_lock_irqsave(&(info->lock), flags);
......
...@@ -522,7 +522,7 @@ static void bcsp_complete_rx_pkt(struct hci_uart *hu) ...@@ -522,7 +522,7 @@ static void bcsp_complete_rx_pkt(struct hci_uart *hu)
memcpy(skb_push(bcsp->rx_skb, HCI_EVENT_HDR_SIZE), &hdr, HCI_EVENT_HDR_SIZE); memcpy(skb_push(bcsp->rx_skb, HCI_EVENT_HDR_SIZE), &hdr, HCI_EVENT_HDR_SIZE);
bt_cb(bcsp->rx_skb)->pkt_type = HCI_EVENT_PKT; bt_cb(bcsp->rx_skb)->pkt_type = HCI_EVENT_PKT;
hci_recv_frame(bcsp->rx_skb); hci_recv_frame(hu->hdev, bcsp->rx_skb);
} else { } else {
BT_ERR ("Packet for unknown channel (%u %s)", BT_ERR ("Packet for unknown channel (%u %s)",
bcsp->rx_skb->data[1] & 0x0f, bcsp->rx_skb->data[1] & 0x0f,
...@@ -536,7 +536,7 @@ static void bcsp_complete_rx_pkt(struct hci_uart *hu) ...@@ -536,7 +536,7 @@ static void bcsp_complete_rx_pkt(struct hci_uart *hu)
/* Pull out BCSP hdr */ /* Pull out BCSP hdr */
skb_pull(bcsp->rx_skb, 4); skb_pull(bcsp->rx_skb, 4);
hci_recv_frame(bcsp->rx_skb); hci_recv_frame(hu->hdev, bcsp->rx_skb);
} }
bcsp->rx_state = BCSP_W4_PKT_DELIMITER; bcsp->rx_state = BCSP_W4_PKT_DELIMITER;
...@@ -655,7 +655,6 @@ static int bcsp_recv(struct hci_uart *hu, void *data, int count) ...@@ -655,7 +655,6 @@ static int bcsp_recv(struct hci_uart *hu, void *data, int count)
bcsp->rx_count = 0; bcsp->rx_count = 0;
return 0; return 0;
} }
bcsp->rx_skb->dev = (void *) hu->hdev;
break; break;
} }
break; break;
......
...@@ -124,30 +124,6 @@ static int h4_enqueue(struct hci_uart *hu, struct sk_buff *skb) ...@@ -124,30 +124,6 @@ static int h4_enqueue(struct hci_uart *hu, struct sk_buff *skb)
return 0; return 0;
} }
static inline int h4_check_data_len(struct h4_struct *h4, int len)
{
int room = skb_tailroom(h4->rx_skb);
BT_DBG("len %d room %d", len, room);
if (!len) {
hci_recv_frame(h4->rx_skb);
} else if (len > room) {
BT_ERR("Data length is too large");
kfree_skb(h4->rx_skb);
} else {
h4->rx_state = H4_W4_DATA;
h4->rx_count = len;
return len;
}
h4->rx_state = H4_W4_PACKET_TYPE;
h4->rx_skb = NULL;
h4->rx_count = 0;
return 0;
}
/* Recv data */ /* Recv data */
static int h4_recv(struct hci_uart *hu, void *data, int count) static int h4_recv(struct hci_uart *hu, void *data, int count)
{ {
......
...@@ -340,7 +340,7 @@ static void h5_complete_rx_pkt(struct hci_uart *hu) ...@@ -340,7 +340,7 @@ static void h5_complete_rx_pkt(struct hci_uart *hu)
/* Remove Three-wire header */ /* Remove Three-wire header */
skb_pull(h5->rx_skb, 4); skb_pull(h5->rx_skb, 4);
hci_recv_frame(h5->rx_skb); hci_recv_frame(hu->hdev, h5->rx_skb);
h5->rx_skb = NULL; h5->rx_skb = NULL;
break; break;
......
...@@ -234,21 +234,13 @@ static int hci_uart_close(struct hci_dev *hdev) ...@@ -234,21 +234,13 @@ static int hci_uart_close(struct hci_dev *hdev)
} }
/* Send frames from HCI layer */ /* Send frames from HCI layer */
static int hci_uart_send_frame(struct sk_buff *skb) static int hci_uart_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
{ {
struct hci_dev* hdev = (struct hci_dev *) skb->dev; struct hci_uart *hu = hci_get_drvdata(hdev);
struct hci_uart *hu;
if (!hdev) {
BT_ERR("Frame for unknown device (hdev=NULL)");
return -ENODEV;
}
if (!test_bit(HCI_RUNNING, &hdev->flags)) if (!test_bit(HCI_RUNNING, &hdev->flags))
return -EBUSY; return -EBUSY;
hu = hci_get_drvdata(hdev);
BT_DBG("%s: type %d len %d", hdev->name, bt_cb(skb)->pkt_type, skb->len); BT_DBG("%s: type %d len %d", hdev->name, bt_cb(skb)->pkt_type, skb->len);
hu->proto->enqueue(hu, skb); hu->proto->enqueue(hu, skb);
......
...@@ -110,7 +110,6 @@ static int send_hcill_cmd(u8 cmd, struct hci_uart *hu) ...@@ -110,7 +110,6 @@ static int send_hcill_cmd(u8 cmd, struct hci_uart *hu)
/* prepare packet */ /* prepare packet */
hcill_packet = (struct hcill_cmd *) skb_put(skb, 1); hcill_packet = (struct hcill_cmd *) skb_put(skb, 1);
hcill_packet->cmd = cmd; hcill_packet->cmd = cmd;
skb->dev = (void *) hu->hdev;
/* send packet */ /* send packet */
skb_queue_tail(&ll->txq, skb); skb_queue_tail(&ll->txq, skb);
...@@ -346,14 +345,14 @@ static int ll_enqueue(struct hci_uart *hu, struct sk_buff *skb) ...@@ -346,14 +345,14 @@ static int ll_enqueue(struct hci_uart *hu, struct sk_buff *skb)
return 0; return 0;
} }
static inline int ll_check_data_len(struct ll_struct *ll, int len) static inline int ll_check_data_len(struct hci_dev *hdev, struct ll_struct *ll, int len)
{ {
int room = skb_tailroom(ll->rx_skb); int room = skb_tailroom(ll->rx_skb);
BT_DBG("len %d room %d", len, room); BT_DBG("len %d room %d", len, room);
if (!len) { if (!len) {
hci_recv_frame(ll->rx_skb); hci_recv_frame(hdev, ll->rx_skb);
} else if (len > room) { } else if (len > room) {
BT_ERR("Data length is too large"); BT_ERR("Data length is too large");
kfree_skb(ll->rx_skb); kfree_skb(ll->rx_skb);
...@@ -395,7 +394,7 @@ static int ll_recv(struct hci_uart *hu, void *data, int count) ...@@ -395,7 +394,7 @@ static int ll_recv(struct hci_uart *hu, void *data, int count)
switch (ll->rx_state) { switch (ll->rx_state) {
case HCILL_W4_DATA: case HCILL_W4_DATA:
BT_DBG("Complete data"); BT_DBG("Complete data");
hci_recv_frame(ll->rx_skb); hci_recv_frame(hu->hdev, ll->rx_skb);
ll->rx_state = HCILL_W4_PACKET_TYPE; ll->rx_state = HCILL_W4_PACKET_TYPE;
ll->rx_skb = NULL; ll->rx_skb = NULL;
...@@ -406,7 +405,7 @@ static int ll_recv(struct hci_uart *hu, void *data, int count) ...@@ -406,7 +405,7 @@ static int ll_recv(struct hci_uart *hu, void *data, int count)
BT_DBG("Event header: evt 0x%2.2x plen %d", eh->evt, eh->plen); BT_DBG("Event header: evt 0x%2.2x plen %d", eh->evt, eh->plen);
ll_check_data_len(ll, eh->plen); ll_check_data_len(hu->hdev, ll, eh->plen);
continue; continue;
case HCILL_W4_ACL_HDR: case HCILL_W4_ACL_HDR:
...@@ -415,7 +414,7 @@ static int ll_recv(struct hci_uart *hu, void *data, int count) ...@@ -415,7 +414,7 @@ static int ll_recv(struct hci_uart *hu, void *data, int count)
BT_DBG("ACL header: dlen %d", dlen); BT_DBG("ACL header: dlen %d", dlen);
ll_check_data_len(ll, dlen); ll_check_data_len(hu->hdev, ll, dlen);
continue; continue;
case HCILL_W4_SCO_HDR: case HCILL_W4_SCO_HDR:
...@@ -423,7 +422,7 @@ static int ll_recv(struct hci_uart *hu, void *data, int count) ...@@ -423,7 +422,7 @@ static int ll_recv(struct hci_uart *hu, void *data, int count)
BT_DBG("SCO header: dlen %d", sh->dlen); BT_DBG("SCO header: dlen %d", sh->dlen);
ll_check_data_len(ll, sh->dlen); ll_check_data_len(hu->hdev, ll, sh->dlen);
continue; continue;
} }
} }
...@@ -494,7 +493,6 @@ static int ll_recv(struct hci_uart *hu, void *data, int count) ...@@ -494,7 +493,6 @@ static int ll_recv(struct hci_uart *hu, void *data, int count)
return -ENOMEM; return -ENOMEM;
} }
ll->rx_skb->dev = (void *) hu->hdev;
bt_cb(ll->rx_skb)->pkt_type = type; bt_cb(ll->rx_skb)->pkt_type = type;
} }
......
...@@ -81,21 +81,13 @@ static int vhci_flush(struct hci_dev *hdev) ...@@ -81,21 +81,13 @@ static int vhci_flush(struct hci_dev *hdev)
return 0; return 0;
} }
static int vhci_send_frame(struct sk_buff *skb) static int vhci_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
{ {
struct hci_dev* hdev = (struct hci_dev *) skb->dev; struct vhci_data *data = hci_get_drvdata(hdev);
struct vhci_data *data;
if (!hdev) {
BT_ERR("Frame for unknown HCI device (hdev=NULL)");
return -ENODEV;
}
if (!test_bit(HCI_RUNNING, &hdev->flags)) if (!test_bit(HCI_RUNNING, &hdev->flags))
return -EBUSY; return -EBUSY;
data = hci_get_drvdata(hdev);
memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1); memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1);
skb_queue_tail(&data->readq, skb); skb_queue_tail(&data->readq, skb);
...@@ -179,10 +171,9 @@ static inline ssize_t vhci_get_user(struct vhci_data *data, ...@@ -179,10 +171,9 @@ static inline ssize_t vhci_get_user(struct vhci_data *data,
return -ENODEV; return -ENODEV;
} }
skb->dev = (void *) data->hdev;
bt_cb(skb)->pkt_type = pkt_type; bt_cb(skb)->pkt_type = pkt_type;
ret = hci_recv_frame(skb); ret = hci_recv_frame(data->hdev, skb);
break; break;
case HCI_VENDOR_PKT: case HCI_VENDOR_PKT:
......
...@@ -25,6 +25,23 @@ config ATH_DEBUG ...@@ -25,6 +25,23 @@ config ATH_DEBUG
Say Y, if you want to debug atheros wireless drivers. Say Y, if you want to debug atheros wireless drivers.
Right now only ath9k makes use of this. Right now only ath9k makes use of this.
config ATH_REG_DYNAMIC_USER_REG_HINTS
bool "Atheros dynamic user regulatory hints"
depends on CFG80211_CERTIFICATION_ONUS
default n
---help---
Say N. This should only be enabled in countries where
this feature is explicitly allowed and only on cards that
specifically have been tested for this.
config ATH_REG_DYNAMIC_USER_CERT_TESTING
bool "Atheros dynamic user regulatory testing"
depends on ATH_REG_DYNAMIC_USER_REG_HINTS && CFG80211_CERTIFICATION_ONUS
default n
---help---
Say N. This should only be enabled on systems
undergoing certification testing.
source "drivers/net/wireless/ath/ath5k/Kconfig" source "drivers/net/wireless/ath/ath5k/Kconfig"
source "drivers/net/wireless/ath/ath9k/Kconfig" source "drivers/net/wireless/ath/ath9k/Kconfig"
source "drivers/net/wireless/ath/carl9170/Kconfig" source "drivers/net/wireless/ath/carl9170/Kconfig"
......
...@@ -12,7 +12,9 @@ obj-$(CONFIG_ATH_COMMON) += ath.o ...@@ -12,7 +12,9 @@ obj-$(CONFIG_ATH_COMMON) += ath.o
ath-objs := main.o \ ath-objs := main.o \
regd.o \ regd.o \
hw.o \ hw.o \
key.o key.o \
dfs_pattern_detector.o \
dfs_pri_detector.o
ath-$(CONFIG_ATH_DEBUG) += debug.o ath-$(CONFIG_ATH_DEBUG) += debug.o
ccflags-y += -D__CHECK_ENDIAN__ ccflags-y += -D__CHECK_ENDIAN__
...@@ -283,7 +283,7 @@ static int ath10k_ce_send_nolock(struct ath10k_ce_pipe *ce_state, ...@@ -283,7 +283,7 @@ static int ath10k_ce_send_nolock(struct ath10k_ce_pipe *ce_state,
if (unlikely(CE_RING_DELTA(nentries_mask, if (unlikely(CE_RING_DELTA(nentries_mask,
write_index, sw_index - 1) <= 0)) { write_index, sw_index - 1) <= 0)) {
ret = -EIO; ret = -ENOSR;
goto exit; goto exit;
} }
...@@ -338,38 +338,19 @@ int ath10k_ce_send(struct ath10k_ce_pipe *ce_state, ...@@ -338,38 +338,19 @@ int ath10k_ce_send(struct ath10k_ce_pipe *ce_state,
return ret; return ret;
} }
int ath10k_ce_sendlist_send(struct ath10k_ce_pipe *ce_state, int ath10k_ce_num_free_src_entries(struct ath10k_ce_pipe *pipe)
void *per_transfer_context,
unsigned int transfer_id,
u32 paddr, unsigned int nbytes,
u32 flags)
{ {
struct ath10k_ce_ring *src_ring = ce_state->src_ring; struct ath10k *ar = pipe->ar;
struct ath10k *ar = ce_state->ar;
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
unsigned int nentries_mask = src_ring->nentries_mask; int delta;
unsigned int sw_index;
unsigned int write_index;
int delta, ret = -ENOMEM;
spin_lock_bh(&ar_pci->ce_lock); spin_lock_bh(&ar_pci->ce_lock);
delta = CE_RING_DELTA(pipe->src_ring->nentries_mask,
sw_index = src_ring->sw_index; pipe->src_ring->write_index,
write_index = src_ring->write_index; pipe->src_ring->sw_index - 1);
delta = CE_RING_DELTA(nentries_mask, write_index, sw_index - 1);
if (delta >= 1) {
ret = ath10k_ce_send_nolock(ce_state, per_transfer_context,
paddr, nbytes,
transfer_id, flags);
if (ret)
ath10k_warn("CE send failed: %d\n", ret);
}
spin_unlock_bh(&ar_pci->ce_lock); spin_unlock_bh(&ar_pci->ce_lock);
return ret; return delta;
} }
int ath10k_ce_recv_buf_enqueue(struct ath10k_ce_pipe *ce_state, int ath10k_ce_recv_buf_enqueue(struct ath10k_ce_pipe *ce_state,
......
...@@ -156,21 +156,7 @@ void ath10k_ce_send_cb_register(struct ath10k_ce_pipe *ce_state, ...@@ -156,21 +156,7 @@ void ath10k_ce_send_cb_register(struct ath10k_ce_pipe *ce_state,
void (*send_cb)(struct ath10k_ce_pipe *), void (*send_cb)(struct ath10k_ce_pipe *),
int disable_interrupts); int disable_interrupts);
/* int ath10k_ce_num_free_src_entries(struct ath10k_ce_pipe *pipe);
* Queue a "sendlist" of buffers to be sent using gather to a single
* anonymous destination buffer
* ce - which copy engine to use
* sendlist - list of simple buffers to send using gather
* transfer_id - arbitrary ID; reflected to destination
* Returns 0 on success; otherwise an error status.
*
* Implemenation note: Pushes multiple buffers with Gather to Source ring.
*/
int ath10k_ce_sendlist_send(struct ath10k_ce_pipe *ce_state,
void *per_transfer_context,
unsigned int transfer_id,
u32 paddr, unsigned int nbytes,
u32 flags);
/*==================Recv=======================*/ /*==================Recv=======================*/
......
This diff is collapsed.
...@@ -43,15 +43,17 @@ ...@@ -43,15 +43,17 @@
/* Antenna noise floor */ /* Antenna noise floor */
#define ATH10K_DEFAULT_NOISE_FLOOR -95 #define ATH10K_DEFAULT_NOISE_FLOOR -95
#define ATH10K_MAX_NUM_MGMT_PENDING 16
struct ath10k; struct ath10k;
struct ath10k_skb_cb { struct ath10k_skb_cb {
dma_addr_t paddr; dma_addr_t paddr;
bool is_mapped; bool is_mapped;
bool is_aborted; bool is_aborted;
u8 vdev_id;
struct { struct {
u8 vdev_id;
u8 tid; u8 tid;
bool is_offchan; bool is_offchan;
...@@ -102,11 +104,26 @@ struct ath10k_bmi { ...@@ -102,11 +104,26 @@ struct ath10k_bmi {
bool done_sent; bool done_sent;
}; };
#define ATH10K_MAX_MEM_REQS 16
struct ath10k_mem_chunk {
void *vaddr;
dma_addr_t paddr;
u32 len;
u32 req_id;
};
struct ath10k_wmi { struct ath10k_wmi {
enum ath10k_htc_ep_id eid; enum ath10k_htc_ep_id eid;
struct completion service_ready; struct completion service_ready;
struct completion unified_ready; struct completion unified_ready;
wait_queue_head_t tx_credits_wq; wait_queue_head_t tx_credits_wq;
struct wmi_cmd_map *cmd;
struct wmi_vdev_param_map *vdev_param;
struct wmi_pdev_param_map *pdev_param;
u32 num_mem_chunks;
struct ath10k_mem_chunk mem_chunks[ATH10K_MAX_MEM_REQS];
}; };
struct ath10k_peer_stat { struct ath10k_peer_stat {
...@@ -188,6 +205,8 @@ struct ath10k_peer { ...@@ -188,6 +205,8 @@ struct ath10k_peer {
#define ATH10K_VDEV_SETUP_TIMEOUT_HZ (5*HZ) #define ATH10K_VDEV_SETUP_TIMEOUT_HZ (5*HZ)
struct ath10k_vif { struct ath10k_vif {
struct list_head list;
u32 vdev_id; u32 vdev_id;
enum wmi_vdev_type vdev_type; enum wmi_vdev_type vdev_type;
enum wmi_vdev_subtype vdev_subtype; enum wmi_vdev_subtype vdev_subtype;
...@@ -198,8 +217,10 @@ struct ath10k_vif { ...@@ -198,8 +217,10 @@ struct ath10k_vif {
struct ath10k *ar; struct ath10k *ar;
struct ieee80211_vif *vif; struct ieee80211_vif *vif;
struct work_struct wep_key_work;
struct ieee80211_key_conf *wep_keys[WMI_MAX_KEY_INDEX + 1]; struct ieee80211_key_conf *wep_keys[WMI_MAX_KEY_INDEX + 1];
u8 def_wep_key_index; u8 def_wep_key_idx;
u8 def_wep_key_newidx;
u16 tx_seq_no; u16 tx_seq_no;
...@@ -268,6 +289,12 @@ enum ath10k_fw_features { ...@@ -268,6 +289,12 @@ enum ath10k_fw_features {
/* wmi_mgmt_rx_hdr contains extra RSSI information */ /* wmi_mgmt_rx_hdr contains extra RSSI information */
ATH10K_FW_FEATURE_EXT_WMI_MGMT_RX = 0, ATH10K_FW_FEATURE_EXT_WMI_MGMT_RX = 0,
/* firmware from 10X branch */
ATH10K_FW_FEATURE_WMI_10X = 1,
/* firmware support tx frame management over WMI, otherwise it's HTT */
ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX = 2,
/* keep last */ /* keep last */
ATH10K_FW_FEATURE_COUNT, ATH10K_FW_FEATURE_COUNT,
}; };
...@@ -324,9 +351,19 @@ struct ath10k { ...@@ -324,9 +351,19 @@ struct ath10k {
} fw; } fw;
} hw_params; } hw_params;
const struct firmware *board_data; const struct firmware *board;
const void *board_data;
size_t board_len;
const struct firmware *otp; const struct firmware *otp;
const void *otp_data;
size_t otp_len;
const struct firmware *firmware; const struct firmware *firmware;
const void *firmware_data;
size_t firmware_len;
int fw_api;
struct { struct {
struct completion started; struct completion started;
...@@ -369,6 +406,7 @@ struct ath10k { ...@@ -369,6 +406,7 @@ struct ath10k {
/* protects shared structure data */ /* protects shared structure data */
spinlock_t data_lock; spinlock_t data_lock;
struct list_head arvifs;
struct list_head peers; struct list_head peers;
wait_queue_head_t peer_mapping_wq; wait_queue_head_t peer_mapping_wq;
...@@ -377,6 +415,9 @@ struct ath10k { ...@@ -377,6 +415,9 @@ struct ath10k {
struct completion offchan_tx_completed; struct completion offchan_tx_completed;
struct sk_buff *offchan_tx_skb; struct sk_buff *offchan_tx_skb;
struct work_struct wmi_mgmt_tx_work;
struct sk_buff_head wmi_mgmt_tx_queue;
enum ath10k_state state; enum ath10k_state state;
struct work_struct restart_work; struct work_struct restart_work;
......
...@@ -618,6 +618,8 @@ int ath10k_debug_start(struct ath10k *ar) ...@@ -618,6 +618,8 @@ int ath10k_debug_start(struct ath10k *ar)
{ {
int ret; int ret;
lockdep_assert_held(&ar->conf_mutex);
ret = ath10k_debug_htt_stats_req(ar); ret = ath10k_debug_htt_stats_req(ar);
if (ret) if (ret)
/* continue normally anyway, this isn't serious */ /* continue normally anyway, this isn't serious */
...@@ -628,7 +630,13 @@ int ath10k_debug_start(struct ath10k *ar) ...@@ -628,7 +630,13 @@ int ath10k_debug_start(struct ath10k *ar)
void ath10k_debug_stop(struct ath10k *ar) void ath10k_debug_stop(struct ath10k *ar)
{ {
cancel_delayed_work_sync(&ar->debug.htt_stats_dwork); lockdep_assert_held(&ar->conf_mutex);
/* Must not use _sync to avoid deadlock, we do that in
* ath10k_debug_destroy(). The check for htt_stats_mask is to avoid
* warning from del_timer(). */
if (ar->debug.htt_stats_mask != 0)
cancel_delayed_work(&ar->debug.htt_stats_dwork);
} }
int ath10k_debug_create(struct ath10k *ar) int ath10k_debug_create(struct ath10k *ar)
...@@ -662,6 +670,11 @@ int ath10k_debug_create(struct ath10k *ar) ...@@ -662,6 +670,11 @@ int ath10k_debug_create(struct ath10k *ar)
return 0; return 0;
} }
void ath10k_debug_destroy(struct ath10k *ar)
{
cancel_delayed_work_sync(&ar->debug.htt_stats_dwork);
}
#endif /* CONFIG_ATH10K_DEBUGFS */ #endif /* CONFIG_ATH10K_DEBUGFS */
#ifdef CONFIG_ATH10K_DEBUG #ifdef CONFIG_ATH10K_DEBUG
......
...@@ -46,6 +46,7 @@ __printf(1, 2) int ath10k_warn(const char *fmt, ...); ...@@ -46,6 +46,7 @@ __printf(1, 2) int ath10k_warn(const char *fmt, ...);
int ath10k_debug_start(struct ath10k *ar); int ath10k_debug_start(struct ath10k *ar);
void ath10k_debug_stop(struct ath10k *ar); void ath10k_debug_stop(struct ath10k *ar);
int ath10k_debug_create(struct ath10k *ar); int ath10k_debug_create(struct ath10k *ar);
void ath10k_debug_destroy(struct ath10k *ar);
void ath10k_debug_read_service_map(struct ath10k *ar, void ath10k_debug_read_service_map(struct ath10k *ar,
void *service_map, void *service_map,
size_t map_size); size_t map_size);
...@@ -67,6 +68,10 @@ static inline int ath10k_debug_create(struct ath10k *ar) ...@@ -67,6 +68,10 @@ static inline int ath10k_debug_create(struct ath10k *ar)
return 0; return 0;
} }
static inline void ath10k_debug_destroy(struct ath10k *ar)
{
}
static inline void ath10k_debug_read_service_map(struct ath10k *ar, static inline void ath10k_debug_read_service_map(struct ath10k *ar,
void *service_map, void *service_map,
size_t map_size) size_t map_size)
......
...@@ -308,7 +308,7 @@ int ath10k_htt_mgmt_tx(struct ath10k_htt *htt, struct sk_buff *msdu) ...@@ -308,7 +308,7 @@ int ath10k_htt_mgmt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)
struct sk_buff *txdesc = NULL; struct sk_buff *txdesc = NULL;
struct htt_cmd *cmd; struct htt_cmd *cmd;
struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(msdu); struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(msdu);
u8 vdev_id = skb_cb->htt.vdev_id; u8 vdev_id = skb_cb->vdev_id;
int len = 0; int len = 0;
int msdu_id = -1; int msdu_id = -1;
int res; int res;
...@@ -384,7 +384,7 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *msdu) ...@@ -384,7 +384,7 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *msdu)
struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(msdu); struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(msdu);
struct sk_buff *txdesc = NULL; struct sk_buff *txdesc = NULL;
bool use_frags; bool use_frags;
u8 vdev_id = ATH10K_SKB_CB(msdu)->htt.vdev_id; u8 vdev_id = ATH10K_SKB_CB(msdu)->vdev_id;
u8 tid; u8 tid;
int prefetch_len, desc_len; int prefetch_len, desc_len;
int msdu_id = -1; int msdu_id = -1;
......
...@@ -20,12 +20,6 @@ ...@@ -20,12 +20,6 @@
#include "targaddrs.h" #include "targaddrs.h"
/* Supported FW version */
#define SUPPORTED_FW_MAJOR 1
#define SUPPORTED_FW_MINOR 0
#define SUPPORTED_FW_RELEASE 0
#define SUPPORTED_FW_BUILD 636
/* QCA988X 1.0 definitions (unsupported) */ /* QCA988X 1.0 definitions (unsupported) */
#define QCA988X_HW_1_0_CHIP_ID_REV 0x0 #define QCA988X_HW_1_0_CHIP_ID_REV 0x0
...@@ -38,6 +32,25 @@ ...@@ -38,6 +32,25 @@
#define QCA988X_HW_2_0_BOARD_DATA_FILE "board.bin" #define QCA988X_HW_2_0_BOARD_DATA_FILE "board.bin"
#define QCA988X_HW_2_0_PATCH_LOAD_ADDR 0x1234 #define QCA988X_HW_2_0_PATCH_LOAD_ADDR 0x1234
#define ATH10K_FW_API2_FILE "firmware-2.bin"
/* includes also the null byte */
#define ATH10K_FIRMWARE_MAGIC "QCA-ATH10K"
struct ath10k_fw_ie {
__le32 id;
__le32 len;
u8 data[0];
};
enum ath10k_fw_ie_type {
ATH10K_FW_IE_FW_VERSION = 0,
ATH10K_FW_IE_TIMESTAMP = 1,
ATH10K_FW_IE_FEATURES = 2,
ATH10K_FW_IE_FW_IMAGE = 3,
ATH10K_FW_IE_OTP_IMAGE = 4,
};
/* Known pecularities: /* Known pecularities:
* - current FW doesn't support raw rx mode (last tested v599) * - current FW doesn't support raw rx mode (last tested v599)
* - current FW dumps upon raw tx mode (last tested v599) * - current FW dumps upon raw tx mode (last tested v599)
...@@ -59,6 +72,7 @@ enum ath10k_mcast2ucast_mode { ...@@ -59,6 +72,7 @@ enum ath10k_mcast2ucast_mode {
ATH10K_MCAST2UCAST_ENABLED = 1, ATH10K_MCAST2UCAST_ENABLED = 1,
}; };
/* Target specific defines for MAIN firmware */
#define TARGET_NUM_VDEVS 8 #define TARGET_NUM_VDEVS 8
#define TARGET_NUM_PEER_AST 2 #define TARGET_NUM_PEER_AST 2
#define TARGET_NUM_WDS_ENTRIES 32 #define TARGET_NUM_WDS_ENTRIES 32
...@@ -93,6 +107,36 @@ enum ath10k_mcast2ucast_mode { ...@@ -93,6 +107,36 @@ enum ath10k_mcast2ucast_mode {
#define TARGET_NUM_MSDU_DESC (1024 + 400) #define TARGET_NUM_MSDU_DESC (1024 + 400)
#define TARGET_MAX_FRAG_ENTRIES 0 #define TARGET_MAX_FRAG_ENTRIES 0
/* Target specific defines for 10.X firmware */
#define TARGET_10X_NUM_VDEVS 16
#define TARGET_10X_NUM_PEER_AST 2
#define TARGET_10X_NUM_WDS_ENTRIES 32
#define TARGET_10X_DMA_BURST_SIZE 0
#define TARGET_10X_MAC_AGGR_DELIM 0
#define TARGET_10X_AST_SKID_LIMIT 16
#define TARGET_10X_NUM_PEERS (128 + (TARGET_10X_NUM_VDEVS))
#define TARGET_10X_NUM_OFFLOAD_PEERS 0
#define TARGET_10X_NUM_OFFLOAD_REORDER_BUFS 0
#define TARGET_10X_NUM_PEER_KEYS 2
#define TARGET_10X_NUM_TIDS 256
#define TARGET_10X_TX_CHAIN_MASK (BIT(0) | BIT(1) | BIT(2))
#define TARGET_10X_RX_CHAIN_MASK (BIT(0) | BIT(1) | BIT(2))
#define TARGET_10X_RX_TIMEOUT_LO_PRI 100
#define TARGET_10X_RX_TIMEOUT_HI_PRI 40
#define TARGET_10X_RX_DECAP_MODE ATH10K_HW_TXRX_NATIVE_WIFI
#define TARGET_10X_SCAN_MAX_PENDING_REQS 4
#define TARGET_10X_BMISS_OFFLOAD_MAX_VDEV 2
#define TARGET_10X_ROAM_OFFLOAD_MAX_VDEV 2
#define TARGET_10X_ROAM_OFFLOAD_MAX_AP_PROFILES 8
#define TARGET_10X_GTK_OFFLOAD_MAX_VDEV 3
#define TARGET_10X_NUM_MCAST_GROUPS 0
#define TARGET_10X_NUM_MCAST_TABLE_ELEMS 0
#define TARGET_10X_MCAST2UCAST_MODE ATH10K_MCAST2UCAST_DISABLED
#define TARGET_10X_TX_DBG_LOG_SIZE 1024
#define TARGET_10X_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK 1
#define TARGET_10X_VOW_CONFIG 0
#define TARGET_10X_NUM_MSDU_DESC (1024 + 400)
#define TARGET_10X_MAX_FRAG_ENTRIES 0
/* Number of Copy Engines supported */ /* Number of Copy Engines supported */
#define CE_COUNT 8 #define CE_COUNT 8
......
This diff is collapsed.
...@@ -34,6 +34,8 @@ struct ath10k_vif *ath10k_get_arvif(struct ath10k *ar, u32 vdev_id); ...@@ -34,6 +34,8 @@ struct ath10k_vif *ath10k_get_arvif(struct ath10k *ar, u32 vdev_id);
void ath10k_reset_scan(unsigned long ptr); void ath10k_reset_scan(unsigned long ptr);
void ath10k_offchan_tx_purge(struct ath10k *ar); void ath10k_offchan_tx_purge(struct ath10k *ar);
void ath10k_offchan_tx_work(struct work_struct *work); void ath10k_offchan_tx_work(struct work_struct *work);
void ath10k_mgmt_over_wmi_tx_purge(struct ath10k *ar);
void ath10k_mgmt_over_wmi_tx_work(struct work_struct *work);
void ath10k_halt(struct ath10k *ar); void ath10k_halt(struct ath10k *ar);
static inline struct ath10k_vif *ath10k_vif_to_arvif(struct ieee80211_vif *vif) static inline struct ath10k_vif *ath10k_vif_to_arvif(struct ieee80211_vif *vif)
......
...@@ -720,18 +720,8 @@ static int ath10k_pci_hif_send_head(struct ath10k *ar, u8 pipe_id, ...@@ -720,18 +720,8 @@ static int ath10k_pci_hif_send_head(struct ath10k *ar, u8 pipe_id,
"ath10k tx: data: ", "ath10k tx: data: ",
nbuf->data, nbuf->len); nbuf->data, nbuf->len);
/* Make sure we have resources to handle this request */ ret = ath10k_ce_send(ce_hdl, nbuf, skb_cb->paddr, len, transfer_id,
spin_lock_bh(&pipe_info->pipe_lock); flags);
if (!pipe_info->num_sends_allowed) {
ath10k_warn("Pipe: %d is full\n", pipe_id);
spin_unlock_bh(&pipe_info->pipe_lock);
return -ENOSR;
}
pipe_info->num_sends_allowed--;
spin_unlock_bh(&pipe_info->pipe_lock);
ret = ath10k_ce_sendlist_send(ce_hdl, nbuf, transfer_id,
skb_cb->paddr, len, flags);
if (ret) if (ret)
ath10k_warn("CE send failed: %p\n", nbuf); ath10k_warn("CE send failed: %p\n", nbuf);
...@@ -741,14 +731,7 @@ static int ath10k_pci_hif_send_head(struct ath10k *ar, u8 pipe_id, ...@@ -741,14 +731,7 @@ static int ath10k_pci_hif_send_head(struct ath10k *ar, u8 pipe_id,
static u16 ath10k_pci_hif_get_free_queue_number(struct ath10k *ar, u8 pipe) static u16 ath10k_pci_hif_get_free_queue_number(struct ath10k *ar, u8 pipe)
{ {
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
struct ath10k_pci_pipe *pipe_info = &(ar_pci->pipe_info[pipe]); return ath10k_ce_num_free_src_entries(ar_pci->pipe_info[pipe].ce_hdl);
int ret;
spin_lock_bh(&pipe_info->pipe_lock);
ret = pipe_info->num_sends_allowed;
spin_unlock_bh(&pipe_info->pipe_lock);
return ret;
} }
static void ath10k_pci_hif_dump_area(struct ath10k *ar) static void ath10k_pci_hif_dump_area(struct ath10k *ar)
...@@ -863,7 +846,6 @@ static int ath10k_pci_start_ce(struct ath10k *ar) ...@@ -863,7 +846,6 @@ static int ath10k_pci_start_ce(struct ath10k *ar)
ath10k_pci_ce_send_done, ath10k_pci_ce_send_done,
disable_interrupts); disable_interrupts);
completions += attr->src_nentries; completions += attr->src_nentries;
pipe_info->num_sends_allowed = attr->src_nentries - 1;
} }
if (attr->dest_nentries) { if (attr->dest_nentries) {
...@@ -1033,7 +1015,6 @@ static void ath10k_pci_process_ce(struct ath10k *ar) ...@@ -1033,7 +1015,6 @@ static void ath10k_pci_process_ce(struct ath10k *ar)
*/ */
spin_lock_bh(&compl->pipe_info->pipe_lock); spin_lock_bh(&compl->pipe_info->pipe_lock);
list_add_tail(&compl->list, &compl->pipe_info->compl_free); list_add_tail(&compl->list, &compl->pipe_info->compl_free);
compl->pipe_info->num_sends_allowed += send_done;
spin_unlock_bh(&compl->pipe_info->pipe_lock); spin_unlock_bh(&compl->pipe_info->pipe_lock);
} }
......
...@@ -178,9 +178,6 @@ struct ath10k_pci_pipe { ...@@ -178,9 +178,6 @@ struct ath10k_pci_pipe {
/* List of free CE completion slots */ /* List of free CE completion slots */
struct list_head compl_free; struct list_head compl_free;
/* Limit the number of outstanding send requests. */
int num_sends_allowed;
struct ath10k_pci *ar_pci; struct ath10k_pci *ar_pci;
struct tasklet_struct intr; struct tasklet_struct intr;
}; };
......
This diff is collapsed.
This diff is collapsed.
...@@ -1663,15 +1663,15 @@ ath5k_tx_frame_completed(struct ath5k_hw *ah, struct sk_buff *skb, ...@@ -1663,15 +1663,15 @@ ath5k_tx_frame_completed(struct ath5k_hw *ah, struct sk_buff *skb,
ah->stats.tx_bytes_count += skb->len; ah->stats.tx_bytes_count += skb->len;
info = IEEE80211_SKB_CB(skb); info = IEEE80211_SKB_CB(skb);
size = min_t(int, sizeof(info->status.rates), sizeof(bf->rates));
memcpy(info->status.rates, bf->rates, size);
tries[0] = info->status.rates[0].count; tries[0] = info->status.rates[0].count;
tries[1] = info->status.rates[1].count; tries[1] = info->status.rates[1].count;
tries[2] = info->status.rates[2].count; tries[2] = info->status.rates[2].count;
ieee80211_tx_info_clear_status(info); ieee80211_tx_info_clear_status(info);
size = min_t(int, sizeof(info->status.rates), sizeof(bf->rates));
memcpy(info->status.rates, bf->rates, size);
for (i = 0; i < ts->ts_final_idx; i++) { for (i = 0; i < ts->ts_final_idx; i++) {
struct ieee80211_tx_rate *r = struct ieee80211_tx_rate *r =
&info->status.rates[i]; &info->status.rates[i];
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment