diff options
| author | Igor Mitsyanko <igor.mitsyanko.os@quantenna.com> | 2019-03-20 06:04:09 -0400 |
|---|---|---|
| committer | Kalle Valo <kvalo@codeaurora.org> | 2019-04-04 05:57:33 -0400 |
| commit | bc70732f9bd98a451cdbddf57a183543df618367 (patch) | |
| tree | 43322ea38a86ea2daf4ded8e8188219b400780b6 /drivers/net/wireless/quantenna/qtnfmac | |
| parent | 72b3270e01ab5bd85222ada2f4dc1cd6824f1ab7 (diff) | |
qtnfmac: send EAPOL frames via control path
Use control path to send EAPOL frames to make sure they are
sent with higher priority with aggregation disabled.
Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/quantenna/qtnfmac')
| -rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/bus.h | 1 | ||||
| -rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 17 | ||||
| -rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/commands.c | 10 | ||||
| -rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/commands.h | 4 | ||||
| -rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/core.c | 45 | ||||
| -rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/core.h | 3 | ||||
| -rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 1 | ||||
| -rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/pcie/pcie_priv.h | 1 | ||||
| -rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c | 8 | ||||
| -rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/qlink.h | 24 |
10 files changed, 89 insertions, 25 deletions
diff --git a/drivers/net/wireless/quantenna/qtnfmac/bus.h b/drivers/net/wireless/quantenna/qtnfmac/bus.h index dc1bd32d4827..7cea08f71838 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/bus.h +++ b/drivers/net/wireless/quantenna/qtnfmac/bus.h | |||
| @@ -49,6 +49,7 @@ struct qtnf_bus { | |||
| 49 | struct napi_struct mux_napi; | 49 | struct napi_struct mux_napi; |
| 50 | struct net_device mux_dev; | 50 | struct net_device mux_dev; |
| 51 | struct workqueue_struct *workqueue; | 51 | struct workqueue_struct *workqueue; |
| 52 | struct workqueue_struct *hprio_workqueue; | ||
| 52 | struct work_struct fw_work; | 53 | struct work_struct fw_work; |
| 53 | struct work_struct event_work; | 54 | struct work_struct event_work; |
| 54 | struct mutex bus_lock; /* lock during command/event processing */ | 55 | struct mutex bus_lock; /* lock during command/event processing */ |
diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index 95572555ed6a..c78500bcaa2d 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | |||
| @@ -144,6 +144,7 @@ int qtnf_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev) | |||
| 144 | { | 144 | { |
| 145 | struct net_device *netdev = wdev->netdev; | 145 | struct net_device *netdev = wdev->netdev; |
| 146 | struct qtnf_vif *vif; | 146 | struct qtnf_vif *vif; |
| 147 | struct sk_buff *skb; | ||
| 147 | 148 | ||
| 148 | if (WARN_ON(!netdev)) | 149 | if (WARN_ON(!netdev)) |
| 149 | return -EFAULT; | 150 | return -EFAULT; |
| @@ -157,6 +158,11 @@ int qtnf_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev) | |||
| 157 | if (netif_carrier_ok(netdev)) | 158 | if (netif_carrier_ok(netdev)) |
| 158 | netif_carrier_off(netdev); | 159 | netif_carrier_off(netdev); |
| 159 | 160 | ||
| 161 | while ((skb = skb_dequeue(&vif->high_pri_tx_queue))) | ||
| 162 | dev_kfree_skb_any(skb); | ||
| 163 | |||
| 164 | cancel_work_sync(&vif->high_pri_tx_work); | ||
| 165 | |||
| 160 | if (netdev->reg_state == NETREG_REGISTERED) | 166 | if (netdev->reg_state == NETREG_REGISTERED) |
| 161 | unregister_netdevice(netdev); | 167 | unregister_netdevice(netdev); |
| 162 | 168 | ||
| @@ -424,13 +430,13 @@ qtnf_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, | |||
| 424 | *cookie = short_cookie; | 430 | *cookie = short_cookie; |
| 425 | 431 | ||
| 426 | if (params->offchan) | 432 | if (params->offchan) |
| 427 | flags |= QLINK_MGMT_FRAME_TX_FLAG_OFFCHAN; | 433 | flags |= QLINK_FRAME_TX_FLAG_OFFCHAN; |
| 428 | 434 | ||
| 429 | if (params->no_cck) | 435 | if (params->no_cck) |
| 430 | flags |= QLINK_MGMT_FRAME_TX_FLAG_NO_CCK; | 436 | flags |= QLINK_FRAME_TX_FLAG_NO_CCK; |
| 431 | 437 | ||
| 432 | if (params->dont_wait_for_ack) | 438 | if (params->dont_wait_for_ack) |
| 433 | flags |= QLINK_MGMT_FRAME_TX_FLAG_ACK_NOWAIT; | 439 | flags |= QLINK_FRAME_TX_FLAG_ACK_NOWAIT; |
| 434 | 440 | ||
| 435 | /* If channel is not specified, pass "freq = 0" to tell device | 441 | /* If channel is not specified, pass "freq = 0" to tell device |
| 436 | * firmware to use current channel. | 442 | * firmware to use current channel. |
| @@ -445,9 +451,8 @@ qtnf_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, | |||
| 445 | le16_to_cpu(mgmt_frame->frame_control), mgmt_frame->da, | 451 | le16_to_cpu(mgmt_frame->frame_control), mgmt_frame->da, |
| 446 | params->len, short_cookie, flags); | 452 | params->len, short_cookie, flags); |
| 447 | 453 | ||
| 448 | return qtnf_cmd_send_mgmt_frame(vif, short_cookie, flags, | 454 | return qtnf_cmd_send_frame(vif, short_cookie, flags, |
| 449 | freq, | 455 | freq, params->buf, params->len); |
| 450 | params->buf, params->len); | ||
| 451 | } | 456 | } |
| 452 | 457 | ||
| 453 | static int | 458 | static int |
diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index a04321305ebc..62edddb8551e 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c | |||
| @@ -381,11 +381,11 @@ out: | |||
| 381 | return ret; | 381 | return ret; |
| 382 | } | 382 | } |
| 383 | 383 | ||
| 384 | int qtnf_cmd_send_mgmt_frame(struct qtnf_vif *vif, u32 cookie, u16 flags, | 384 | int qtnf_cmd_send_frame(struct qtnf_vif *vif, u32 cookie, u16 flags, |
| 385 | u16 freq, const u8 *buf, size_t len) | 385 | u16 freq, const u8 *buf, size_t len) |
| 386 | { | 386 | { |
| 387 | struct sk_buff *cmd_skb; | 387 | struct sk_buff *cmd_skb; |
| 388 | struct qlink_cmd_mgmt_frame_tx *cmd; | 388 | struct qlink_cmd_frame_tx *cmd; |
| 389 | int ret; | 389 | int ret; |
| 390 | 390 | ||
| 391 | if (sizeof(*cmd) + len > QTNF_MAX_CMD_BUF_SIZE) { | 391 | if (sizeof(*cmd) + len > QTNF_MAX_CMD_BUF_SIZE) { |
| @@ -395,14 +395,14 @@ int qtnf_cmd_send_mgmt_frame(struct qtnf_vif *vif, u32 cookie, u16 flags, | |||
| 395 | } | 395 | } |
| 396 | 396 | ||
| 397 | cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, | 397 | cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, |
| 398 | QLINK_CMD_SEND_MGMT_FRAME, | 398 | QLINK_CMD_SEND_FRAME, |
| 399 | sizeof(*cmd)); | 399 | sizeof(*cmd)); |
| 400 | if (!cmd_skb) | 400 | if (!cmd_skb) |
| 401 | return -ENOMEM; | 401 | return -ENOMEM; |
| 402 | 402 | ||
| 403 | qtnf_bus_lock(vif->mac->bus); | 403 | qtnf_bus_lock(vif->mac->bus); |
| 404 | 404 | ||
| 405 | cmd = (struct qlink_cmd_mgmt_frame_tx *)cmd_skb->data; | 405 | cmd = (struct qlink_cmd_frame_tx *)cmd_skb->data; |
| 406 | cmd->cookie = cpu_to_le32(cookie); | 406 | cmd->cookie = cpu_to_le32(cookie); |
| 407 | cmd->freq = cpu_to_le16(freq); | 407 | cmd->freq = cpu_to_le16(freq); |
| 408 | cmd->flags = cpu_to_le16(flags); | 408 | cmd->flags = cpu_to_le16(flags); |
diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.h b/drivers/net/wireless/quantenna/qtnfmac/commands.h index 050f9a49d16c..6406365287fc 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.h +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.h | |||
| @@ -27,8 +27,8 @@ int qtnf_cmd_send_start_ap(struct qtnf_vif *vif, | |||
| 27 | const struct cfg80211_ap_settings *s); | 27 | const struct cfg80211_ap_settings *s); |
| 28 | int qtnf_cmd_send_stop_ap(struct qtnf_vif *vif); | 28 | int qtnf_cmd_send_stop_ap(struct qtnf_vif *vif); |
| 29 | int qtnf_cmd_send_register_mgmt(struct qtnf_vif *vif, u16 frame_type, bool reg); | 29 | int qtnf_cmd_send_register_mgmt(struct qtnf_vif *vif, u16 frame_type, bool reg); |
| 30 | int qtnf_cmd_send_mgmt_frame(struct qtnf_vif *vif, u32 cookie, u16 flags, | 30 | int qtnf_cmd_send_frame(struct qtnf_vif *vif, u32 cookie, u16 flags, |
| 31 | u16 freq, const u8 *buf, size_t len); | 31 | u16 freq, const u8 *buf, size_t len); |
| 32 | int qtnf_cmd_send_mgmt_set_appie(struct qtnf_vif *vif, u8 frame_type, | 32 | int qtnf_cmd_send_mgmt_set_appie(struct qtnf_vif *vif, u8 frame_type, |
| 33 | const u8 *buf, size_t len); | 33 | const u8 *buf, size_t len); |
| 34 | int qtnf_cmd_get_sta_info(struct qtnf_vif *vif, const u8 *sta_mac, | 34 | int qtnf_cmd_get_sta_info(struct qtnf_vif *vif, const u8 *sta_mac, |
diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.c b/drivers/net/wireless/quantenna/qtnfmac/core.c index eed12e4dec65..54ea86ae4959 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.c +++ b/drivers/net/wireless/quantenna/qtnfmac/core.c | |||
| @@ -368,6 +368,23 @@ static void qtnf_mac_scan_timeout(struct work_struct *work) | |||
| 368 | qtnf_mac_scan_finish(mac, true); | 368 | qtnf_mac_scan_finish(mac, true); |
| 369 | } | 369 | } |
| 370 | 370 | ||
| 371 | static void qtnf_vif_send_data_high_pri(struct work_struct *work) | ||
| 372 | { | ||
| 373 | struct qtnf_vif *vif = | ||
| 374 | container_of(work, struct qtnf_vif, high_pri_tx_work); | ||
| 375 | struct sk_buff *skb; | ||
| 376 | |||
| 377 | if (!vif->netdev || | ||
| 378 | vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED) | ||
| 379 | return; | ||
| 380 | |||
| 381 | while ((skb = skb_dequeue(&vif->high_pri_tx_queue))) { | ||
| 382 | qtnf_cmd_send_frame(vif, 0, QLINK_FRAME_TX_FLAG_8023, | ||
| 383 | 0, skb->data, skb->len); | ||
| 384 | dev_kfree_skb_any(skb); | ||
| 385 | } | ||
| 386 | } | ||
| 387 | |||
| 371 | static struct qtnf_wmac *qtnf_core_mac_alloc(struct qtnf_bus *bus, | 388 | static struct qtnf_wmac *qtnf_core_mac_alloc(struct qtnf_bus *bus, |
| 372 | unsigned int macid) | 389 | unsigned int macid) |
| 373 | { | 390 | { |
| @@ -395,7 +412,8 @@ static struct qtnf_wmac *qtnf_core_mac_alloc(struct qtnf_bus *bus, | |||
| 395 | vif->mac = mac; | 412 | vif->mac = mac; |
| 396 | vif->vifid = i; | 413 | vif->vifid = i; |
| 397 | qtnf_sta_list_init(&vif->sta_list); | 414 | qtnf_sta_list_init(&vif->sta_list); |
| 398 | 415 | INIT_WORK(&vif->high_pri_tx_work, qtnf_vif_send_data_high_pri); | |
| 416 | skb_queue_head_init(&vif->high_pri_tx_queue); | ||
| 399 | vif->stats64 = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats); | 417 | vif->stats64 = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats); |
| 400 | if (!vif->stats64) | 418 | if (!vif->stats64) |
| 401 | pr_warn("VIF%u.%u: per cpu stats allocation failed\n", | 419 | pr_warn("VIF%u.%u: per cpu stats allocation failed\n", |
| @@ -598,6 +616,13 @@ int qtnf_core_attach(struct qtnf_bus *bus) | |||
| 598 | goto error; | 616 | goto error; |
| 599 | } | 617 | } |
| 600 | 618 | ||
| 619 | bus->hprio_workqueue = alloc_workqueue("QTNF_HPRI", WQ_HIGHPRI, 0); | ||
| 620 | if (!bus->hprio_workqueue) { | ||
| 621 | pr_err("failed to alloc high prio workqueue\n"); | ||
| 622 | ret = -ENOMEM; | ||
| 623 | goto error; | ||
| 624 | } | ||
| 625 | |||
| 601 | INIT_WORK(&bus->event_work, qtnf_event_work_handler); | 626 | INIT_WORK(&bus->event_work, qtnf_event_work_handler); |
| 602 | 627 | ||
| 603 | ret = qtnf_cmd_send_init_fw(bus); | 628 | ret = qtnf_cmd_send_init_fw(bus); |
| @@ -607,7 +632,6 @@ int qtnf_core_attach(struct qtnf_bus *bus) | |||
| 607 | } | 632 | } |
| 608 | 633 | ||
| 609 | bus->fw_state = QTNF_FW_STATE_ACTIVE; | 634 | bus->fw_state = QTNF_FW_STATE_ACTIVE; |
| 610 | |||
| 611 | ret = qtnf_cmd_get_hw_info(bus); | 635 | ret = qtnf_cmd_get_hw_info(bus); |
| 612 | if (ret) { | 636 | if (ret) { |
| 613 | pr_err("failed to get HW info: %d\n", ret); | 637 | pr_err("failed to get HW info: %d\n", ret); |
| @@ -642,7 +666,6 @@ int qtnf_core_attach(struct qtnf_bus *bus) | |||
| 642 | 666 | ||
| 643 | error: | 667 | error: |
| 644 | qtnf_core_detach(bus); | 668 | qtnf_core_detach(bus); |
| 645 | |||
| 646 | return ret; | 669 | return ret; |
| 647 | } | 670 | } |
| 648 | EXPORT_SYMBOL_GPL(qtnf_core_attach); | 671 | EXPORT_SYMBOL_GPL(qtnf_core_attach); |
| @@ -664,6 +687,13 @@ void qtnf_core_detach(struct qtnf_bus *bus) | |||
| 664 | if (bus->workqueue) { | 687 | if (bus->workqueue) { |
| 665 | flush_workqueue(bus->workqueue); | 688 | flush_workqueue(bus->workqueue); |
| 666 | destroy_workqueue(bus->workqueue); | 689 | destroy_workqueue(bus->workqueue); |
| 690 | bus->workqueue = NULL; | ||
| 691 | } | ||
| 692 | |||
| 693 | if (bus->hprio_workqueue) { | ||
| 694 | flush_workqueue(bus->hprio_workqueue); | ||
| 695 | destroy_workqueue(bus->hprio_workqueue); | ||
| 696 | bus->hprio_workqueue = NULL; | ||
| 667 | } | 697 | } |
| 668 | 698 | ||
| 669 | qtnf_trans_free(bus); | 699 | qtnf_trans_free(bus); |
| @@ -800,6 +830,15 @@ void qtnf_update_tx_stats(struct net_device *ndev, const struct sk_buff *skb) | |||
| 800 | } | 830 | } |
| 801 | EXPORT_SYMBOL_GPL(qtnf_update_tx_stats); | 831 | EXPORT_SYMBOL_GPL(qtnf_update_tx_stats); |
| 802 | 832 | ||
| 833 | void qtnf_packet_send_hi_pri(struct sk_buff *skb) | ||
| 834 | { | ||
| 835 | struct qtnf_vif *vif = qtnf_netdev_get_priv(skb->dev); | ||
| 836 | |||
| 837 | skb_queue_tail(&vif->high_pri_tx_queue, skb); | ||
| 838 | queue_work(vif->mac->bus->hprio_workqueue, &vif->high_pri_tx_work); | ||
| 839 | } | ||
| 840 | EXPORT_SYMBOL_GPL(qtnf_packet_send_hi_pri); | ||
| 841 | |||
| 803 | MODULE_AUTHOR("Quantenna Communications"); | 842 | MODULE_AUTHOR("Quantenna Communications"); |
| 804 | MODULE_DESCRIPTION("Quantenna 802.11 wireless LAN FullMAC driver."); | 843 | MODULE_DESCRIPTION("Quantenna 802.11 wireless LAN FullMAC driver."); |
| 805 | MODULE_LICENSE("GPL"); | 844 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.h b/drivers/net/wireless/quantenna/qtnfmac/core.h index 1b983ec9afcc..af8372dfb927 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.h +++ b/drivers/net/wireless/quantenna/qtnfmac/core.h | |||
| @@ -63,6 +63,8 @@ struct qtnf_vif { | |||
| 63 | struct qtnf_wmac *mac; | 63 | struct qtnf_wmac *mac; |
| 64 | 64 | ||
| 65 | struct work_struct reset_work; | 65 | struct work_struct reset_work; |
| 66 | struct work_struct high_pri_tx_work; | ||
| 67 | struct sk_buff_head high_pri_tx_queue; | ||
| 66 | struct qtnf_sta_list sta_list; | 68 | struct qtnf_sta_list sta_list; |
| 67 | unsigned long cons_tx_timeout_cnt; | 69 | unsigned long cons_tx_timeout_cnt; |
| 68 | int generation; | 70 | int generation; |
| @@ -149,6 +151,7 @@ void qtnf_virtual_intf_cleanup(struct net_device *ndev); | |||
| 149 | 151 | ||
| 150 | void qtnf_netdev_updown(struct net_device *ndev, bool up); | 152 | void qtnf_netdev_updown(struct net_device *ndev, bool up); |
| 151 | void qtnf_scan_done(struct qtnf_wmac *mac, bool aborted); | 153 | void qtnf_scan_done(struct qtnf_wmac *mac, bool aborted); |
| 154 | void qtnf_packet_send_hi_pri(struct sk_buff *skb); | ||
| 152 | 155 | ||
| 153 | static inline struct qtnf_vif *qtnf_netdev_get_priv(struct net_device *dev) | 156 | static inline struct qtnf_vif *qtnf_netdev_get_priv(struct net_device *dev) |
| 154 | { | 157 | { |
diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c index b561b75e4433..e4e9344b6982 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c +++ b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | |||
| @@ -354,6 +354,7 @@ static int qtnf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
| 354 | pcie_priv->pcie_irq_count = 0; | 354 | pcie_priv->pcie_irq_count = 0; |
| 355 | pcie_priv->tx_reclaim_done = 0; | 355 | pcie_priv->tx_reclaim_done = 0; |
| 356 | pcie_priv->tx_reclaim_req = 0; | 356 | pcie_priv->tx_reclaim_req = 0; |
| 357 | pcie_priv->tx_eapol = 0; | ||
| 357 | 358 | ||
| 358 | pcie_priv->workqueue = create_singlethread_workqueue("QTNF_PCIE"); | 359 | pcie_priv->workqueue = create_singlethread_workqueue("QTNF_PCIE"); |
| 359 | if (!pcie_priv->workqueue) { | 360 | if (!pcie_priv->workqueue) { |
diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie_priv.h b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie_priv.h index b21de4f52a9d..5e8b9cb68419 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie_priv.h +++ b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie_priv.h | |||
| @@ -62,6 +62,7 @@ struct qtnf_pcie_bus_priv { | |||
| 62 | u32 tx_done_count; | 62 | u32 tx_done_count; |
| 63 | u32 tx_reclaim_done; | 63 | u32 tx_reclaim_done; |
| 64 | u32 tx_reclaim_req; | 64 | u32 tx_reclaim_req; |
| 65 | u32 tx_eapol; | ||
| 65 | 66 | ||
| 66 | u8 msi_enabled; | 67 | u8 msi_enabled; |
| 67 | u8 tx_stopped; | 68 | u8 tx_stopped; |
diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c index d9b83ea6281c..9a4380ed7f1b 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c +++ b/drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c | |||
| @@ -498,6 +498,13 @@ static int qtnf_pcie_data_tx(struct qtnf_bus *bus, struct sk_buff *skb) | |||
| 498 | int len; | 498 | int len; |
| 499 | int i; | 499 | int i; |
| 500 | 500 | ||
| 501 | if (unlikely(skb->protocol == htons(ETH_P_PAE))) { | ||
| 502 | qtnf_packet_send_hi_pri(skb); | ||
| 503 | qtnf_update_tx_stats(skb->dev, skb); | ||
| 504 | priv->tx_eapol++; | ||
| 505 | return NETDEV_TX_OK; | ||
| 506 | } | ||
| 507 | |||
| 501 | spin_lock_irqsave(&priv->tx_lock, flags); | 508 | spin_lock_irqsave(&priv->tx_lock, flags); |
| 502 | 509 | ||
| 503 | if (!qtnf_tx_queue_ready(ts)) { | 510 | if (!qtnf_tx_queue_ready(ts)) { |
| @@ -761,6 +768,7 @@ static int qtnf_dbg_pkt_stats(struct seq_file *s, void *data) | |||
| 761 | seq_printf(s, "tx_done_count(%u)\n", priv->tx_done_count); | 768 | seq_printf(s, "tx_done_count(%u)\n", priv->tx_done_count); |
| 762 | seq_printf(s, "tx_reclaim_done(%u)\n", priv->tx_reclaim_done); | 769 | seq_printf(s, "tx_reclaim_done(%u)\n", priv->tx_reclaim_done); |
| 763 | seq_printf(s, "tx_reclaim_req(%u)\n", priv->tx_reclaim_req); | 770 | seq_printf(s, "tx_reclaim_req(%u)\n", priv->tx_reclaim_req); |
| 771 | seq_printf(s, "tx_eapol(%u)\n", priv->tx_eapol); | ||
| 764 | 772 | ||
| 765 | seq_printf(s, "tx_bd_r_index(%u)\n", priv->tx_bd_r_index); | 773 | seq_printf(s, "tx_bd_r_index(%u)\n", priv->tx_bd_r_index); |
| 766 | seq_printf(s, "tx_done_index(%u)\n", tx_done_index); | 774 | seq_printf(s, "tx_done_index(%u)\n", tx_done_index); |
diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index f6d30069ef3a..2fe71adc221a 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h | |||
| @@ -206,6 +206,8 @@ struct qlink_sta_info_state { | |||
| 206 | * execution status (one of &enum qlink_cmd_result). Reply message | 206 | * execution status (one of &enum qlink_cmd_result). Reply message |
| 207 | * may also contain data payload specific to the command type. | 207 | * may also contain data payload specific to the command type. |
| 208 | * | 208 | * |
| 209 | * @QLINK_CMD_SEND_FRAME: send specified frame over the air; firmware will | ||
| 210 | * encapsulate 802.3 packet into 802.11 frame automatically. | ||
| 209 | * @QLINK_CMD_BAND_INFO_GET: for the specified MAC and specified band, get | 211 | * @QLINK_CMD_BAND_INFO_GET: for the specified MAC and specified band, get |
| 210 | * the band's description including number of operational channels and | 212 | * the band's description including number of operational channels and |
| 211 | * info on each channel, HT/VHT capabilities, supported rates etc. | 213 | * info on each channel, HT/VHT capabilities, supported rates etc. |
| @@ -220,7 +222,7 @@ enum qlink_cmd_type { | |||
| 220 | QLINK_CMD_FW_INIT = 0x0001, | 222 | QLINK_CMD_FW_INIT = 0x0001, |
| 221 | QLINK_CMD_FW_DEINIT = 0x0002, | 223 | QLINK_CMD_FW_DEINIT = 0x0002, |
| 222 | QLINK_CMD_REGISTER_MGMT = 0x0003, | 224 | QLINK_CMD_REGISTER_MGMT = 0x0003, |
| 223 | QLINK_CMD_SEND_MGMT_FRAME = 0x0004, | 225 | QLINK_CMD_SEND_FRAME = 0x0004, |
| 224 | QLINK_CMD_MGMT_SET_APPIE = 0x0005, | 226 | QLINK_CMD_MGMT_SET_APPIE = 0x0005, |
| 225 | QLINK_CMD_PHY_PARAMS_GET = 0x0011, | 227 | QLINK_CMD_PHY_PARAMS_GET = 0x0011, |
| 226 | QLINK_CMD_PHY_PARAMS_SET = 0x0012, | 228 | QLINK_CMD_PHY_PARAMS_SET = 0x0012, |
| @@ -321,22 +323,26 @@ struct qlink_cmd_mgmt_frame_register { | |||
| 321 | u8 do_register; | 323 | u8 do_register; |
| 322 | } __packed; | 324 | } __packed; |
| 323 | 325 | ||
| 324 | enum qlink_mgmt_frame_tx_flags { | 326 | /** |
| 325 | QLINK_MGMT_FRAME_TX_FLAG_NONE = 0, | 327 | * @QLINK_FRAME_TX_FLAG_8023: frame has a 802.3 header; if not set, frame |
| 326 | QLINK_MGMT_FRAME_TX_FLAG_OFFCHAN = BIT(0), | 328 | * is a 802.11 encapsulated. |
| 327 | QLINK_MGMT_FRAME_TX_FLAG_NO_CCK = BIT(1), | 329 | */ |
| 328 | QLINK_MGMT_FRAME_TX_FLAG_ACK_NOWAIT = BIT(2), | 330 | enum qlink_frame_tx_flags { |
| 331 | QLINK_FRAME_TX_FLAG_OFFCHAN = BIT(0), | ||
| 332 | QLINK_FRAME_TX_FLAG_NO_CCK = BIT(1), | ||
| 333 | QLINK_FRAME_TX_FLAG_ACK_NOWAIT = BIT(2), | ||
| 334 | QLINK_FRAME_TX_FLAG_8023 = BIT(3), | ||
| 329 | }; | 335 | }; |
| 330 | 336 | ||
| 331 | /** | 337 | /** |
| 332 | * struct qlink_cmd_mgmt_frame_tx - data for QLINK_CMD_SEND_MGMT_FRAME command | 338 | * struct qlink_cmd_frame_tx - data for QLINK_CMD_SEND_FRAME command |
| 333 | * | 339 | * |
| 334 | * @cookie: opaque request identifier. | 340 | * @cookie: opaque request identifier. |
| 335 | * @freq: Frequency to use for frame transmission. | 341 | * @freq: Frequency to use for frame transmission. |
| 336 | * @flags: Transmission flags, one of &enum qlink_mgmt_frame_tx_flags. | 342 | * @flags: Transmission flags, one of &enum qlink_frame_tx_flags. |
| 337 | * @frame_data: frame to transmit. | 343 | * @frame_data: frame to transmit. |
| 338 | */ | 344 | */ |
| 339 | struct qlink_cmd_mgmt_frame_tx { | 345 | struct qlink_cmd_frame_tx { |
| 340 | struct qlink_cmd chdr; | 346 | struct qlink_cmd chdr; |
| 341 | __le32 cookie; | 347 | __le32 cookie; |
| 342 | __le16 freq; | 348 | __le16 freq; |
