wil6210: control AMSDU on Tx side of Block Ack
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Tue, 23 Dec 2014 07:47:09 +0000 (09:47 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 15 Jan 2015 12:31:21 +0000 (14:31 +0200)
When establishing Block Ack as originator (Tx), control
AMSDU flag when sending ADDBA and update status upon
establishment flow completion. To be used in AMSDU flows

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/wil6210/debugfs.c
drivers/net/wireless/ath/wil6210/wil6210.h
drivers/net/wireless/ath/wil6210/wmi.c
drivers/net/wireless/ath/wil6210/wmi.h

index 59bc49475be424a5d7408bbe73beb293b3039d1e..b0b5c6ebcc55c8142500864e9341bfc25eea7b82 100644 (file)
@@ -114,9 +114,10 @@ static int wil_vring_debugfs_show(struct seq_file *s, void *data)
                        snprintf(name, sizeof(name), "tx_%2d", i);
 
                        seq_printf(s,
-                                  "\n%pM CID %d TID %d BACK([%d] %d TU) [%3d|%3d] idle %3d%%\n",
+                                  "\n%pM CID %d TID %d BACK([%d] %d TU A%s) [%3d|%3d] idle %3d%%\n",
                                   wil->sta[cid].addr, cid, tid,
                                   txdata->agg_wsize, txdata->agg_timeout,
+                                  txdata->agg_amsdu ? "+" : "-",
                                   used, avail, (int)idle);
 
                        wil_print_vring(s, wil, name, vring, '_', 'H');
index a94d67db59af1dd5bf1e670ea951c98b4b7cb484..747052d2c7549e4eb2f92609785568ac9842b6f6 100644 (file)
@@ -315,6 +315,7 @@ struct vring_tx_data {
        cycles_t idle, last_idle, begin;
        u8 agg_wsize; /* agreed aggregation window, 0 - no agg */
        u16 agg_timeout;
+       u8 agg_amsdu;
        bool addba_in_progress; /* if set, agg_xxx is for request in progress */
 };
 
index 253816105f14baa0a2b6ed5f12f38b16574f8f23..00cba4aca3c0f41fada920c86f1733b0cb586089 100644 (file)
@@ -608,10 +608,11 @@ static void wmi_evt_ba_status(struct wil6210_priv *wil, int id, void *d,
        struct wmi_vring_ba_status_event *evt = d;
        struct vring_tx_data *txdata;
 
-       wil_dbg_wmi(wil, "BACK[%d] %s {%d} timeout %d\n",
+       wil_dbg_wmi(wil, "BACK[%d] %s {%d} timeout %d AMSDU%s\n",
                    evt->ringid,
                    evt->status == WMI_BA_AGREED ? "OK" : "N/A",
-                   evt->agg_wsize, __le16_to_cpu(evt->ba_timeout));
+                   evt->agg_wsize, __le16_to_cpu(evt->ba_timeout),
+                   evt->amsdu ? "+" : "-");
 
        if (evt->ringid >= WIL6210_MAX_TX_RINGS) {
                wil_err(wil, "invalid ring id %d\n", evt->ringid);
@@ -621,12 +622,14 @@ static void wmi_evt_ba_status(struct wil6210_priv *wil, int id, void *d,
        if (evt->status != WMI_BA_AGREED) {
                evt->ba_timeout = 0;
                evt->agg_wsize = 0;
+               evt->amsdu = 0;
        }
 
        txdata = &wil->vring_tx_data[evt->ringid];
 
        txdata->agg_timeout = le16_to_cpu(evt->ba_timeout);
        txdata->agg_wsize = evt->agg_wsize;
+       txdata->agg_amsdu = evt->amsdu;
        txdata->addba_in_progress = false;
 }
 
@@ -1172,6 +1175,7 @@ int wmi_addba(struct wil6210_priv *wil, u8 ringid, u8 size, u16 timeout)
                .ringid = ringid,
                .agg_max_wsize = size,
                .ba_timeout = cpu_to_le16(timeout),
+               .amsdu = 0,
        };
 
        wil_dbg_wmi(wil, "%s(ring %d size %d timeout %d)\n", __func__,
index 27b97432d1c2e70b3b709a0e0d34c0439e4b0a3a..b5102f0b97f435acc5991d63812a2e73f6bed0ad 100644 (file)
@@ -586,6 +586,7 @@ struct wmi_vring_ba_en_cmd {
        u8 ringid;
        u8 agg_max_wsize;
        __le16 ba_timeout;
+       u8 amsdu;
 } __packed;
 
 /*
@@ -1052,14 +1053,23 @@ struct wmi_scan_complete_event {
 enum wmi_vring_ba_status {
        WMI_BA_AGREED                   = 0,
        WMI_BA_NON_AGREED               = 1,
+       /* BA_EN in middle of teardown flow */
+       WMI_BA_TD_WIP                   = 2,
+       /* BA_DIS or BA_EN in middle of BA SETUP flow */
+       WMI_BA_SETUP_WIP                = 3,
+       /* BA_EN when the BA session is already active */
+       WMI_BA_SESSION_ACTIVE           = 4,
+       /* BA_DIS when the BA session is not active */
+       WMI_BA_SESSION_NOT_ACTIVE       = 5,
 };
 
 struct wmi_vring_ba_status_event {
-       __le16 status;
+       __le16 status; /* enum wmi_vring_ba_status */
        u8 reserved[2];
        u8 ringid;
        u8 agg_wsize;
        __le16 ba_timeout;
+       u8 amsdu;
 } __packed;
 
 /*