wil6210: delba for responder
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Tue, 23 Dec 2014 07:47:10 +0000 (09:47 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 15 Jan 2015 12:31:23 +0000 (14:31 +0200)
Implement delba flow for the responder (Rx) side

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

index b0b5c6ebcc55c8142500864e9341bfc25eea7b82..b027d87bf1a0bc5fc72195ad47646bf304a22f06 100644 (file)
@@ -598,7 +598,7 @@ static ssize_t wil_write_addba(struct file *file, const char __user *buf,
        if (agg_wsize > 0)
                wmi_addba(wil, 0, agg_wsize, 0);
        else
-               wmi_delba(wil, 0, 0);
+               wmi_delba_tx(wil, 0, 0);
 
        return len;
 }
index 747052d2c7549e4eb2f92609785568ac9842b6f6..1b4efd2ea09f6a740ee9682f8a3c2d8e66ef23bf 100644 (file)
@@ -607,7 +607,8 @@ int wmi_rxon(struct wil6210_priv *wil, bool on);
 int wmi_get_temperature(struct wil6210_priv *wil, u32 *t_m, u32 *t_r);
 int wmi_disconnect_sta(struct wil6210_priv *wil, const u8 *mac, u16 reason);
 int wmi_addba(struct wil6210_priv *wil, u8 ringid, u8 size, u16 timeout);
-int wmi_delba(struct wil6210_priv *wil, u8 ringid, u16 reason);
+int wmi_delba_tx(struct wil6210_priv *wil, u8 ringid, u16 reason);
+int wmi_delba_rx(struct wil6210_priv *wil, u8 cidxtid, u16 reason);
 int wmi_addba_rx_resp(struct wil6210_priv *wil, u8 cid, u8 tid, u8 token,
                      u16 status, bool amsdu, u16 agg_wsize, u16 timeout);
 int wil_addba_rx_request(struct wil6210_priv *wil, u8 cidxtid,
index 00cba4aca3c0f41fada920c86f1733b0cb586089..af2ca461fd862c24a255559cde0f3261bea86aa2 100644 (file)
@@ -1184,7 +1184,7 @@ int wmi_addba(struct wil6210_priv *wil, u8 ringid, u8 size, u16 timeout)
        return wmi_send(wil, WMI_VRING_BA_EN_CMDID, &cmd, sizeof(cmd));
 }
 
-int wmi_delba(struct wil6210_priv *wil, u8 ringid, u16 reason)
+int wmi_delba_tx(struct wil6210_priv *wil, u8 ringid, u16 reason)
 {
        struct wmi_vring_ba_dis_cmd cmd = {
                .ringid = ringid,
@@ -1197,6 +1197,19 @@ int wmi_delba(struct wil6210_priv *wil, u8 ringid, u16 reason)
        return wmi_send(wil, WMI_VRING_BA_DIS_CMDID, &cmd, sizeof(cmd));
 }
 
+int wmi_delba_rx(struct wil6210_priv *wil, u8 cidxtid, u16 reason)
+{
+       struct wmi_rcp_delba_cmd cmd = {
+               .cidxtid = cidxtid,
+               .reason = cpu_to_le16(reason),
+       };
+
+       wil_dbg_wmi(wil, "%s(CID %d TID %d reason %d)\n", __func__,
+                   cidxtid & 0xf, (cidxtid >> 4) & 0xf, reason);
+
+       return wmi_send(wil, WMI_RCP_DELBA_CMDID, &cmd, sizeof(cmd));
+}
+
 int wmi_addba_rx_resp(struct wil6210_priv *wil, u8 cid, u8 tid, u8 token,
                      u16 status, bool amsdu, u16 agg_wsize, u16 timeout)
 {