OSDN Git Service

ath10k: enable gtk offload for the wcn3990 wlan module
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / drivers / net / wireless / ath / ath10k / wmi-ops.h
index dcb0da5..cf738ef 100644 (file)
@@ -162,6 +162,8 @@ struct wmi_ops {
                                             const struct wmi_sta_keepalive_arg *arg);
        struct sk_buff *(*gen_set_arp_ns_offload)(struct ath10k *ar,
                                                  struct ath10k_vif *arvif);
+       struct sk_buff *(*gen_gtk_offload)(struct ath10k *ar,
+                                          struct ath10k_vif *arvif);
        struct sk_buff *(*gen_wow_enable)(struct ath10k *ar);
        struct sk_buff *(*gen_wow_add_wakeup_event)(struct ath10k *ar, u32 vdev_id,
                                                    enum wmi_wow_wakeup_event event,
@@ -1206,6 +1208,23 @@ ath10k_wmi_set_arp_ns_offload(struct ath10k *ar, struct ath10k_vif *arvif)
 }
 
 static inline int
+ath10k_wmi_gtk_offload(struct ath10k *ar, struct ath10k_vif *arvif)
+{
+       struct sk_buff *skb;
+       u32 cmd_id;
+
+       if (!ar->wmi.ops->gen_gtk_offload)
+               return -EOPNOTSUPP;
+
+       skb = ar->wmi.ops->gen_gtk_offload(ar, arvif);
+       if (IS_ERR(skb))
+               return PTR_ERR(skb);
+
+       cmd_id = ar->wmi.cmd->gtk_offload_cmdid;
+       return ath10k_wmi_cmd_send(ar, skb, cmd_id);
+}
+
+static inline int
 ath10k_wmi_wow_enable(struct ath10k *ar)
 {
        struct sk_buff *skb;