wmi.h (0aea30a07ec6b50de0fc5f5b2ec34a68ead86b61) wmi.h (ba9177fcef21fa98406e73c472b5ac2eb4ec5f31)
1/* SPDX-License-Identifier: BSD-3-Clause-Clear */
2/*
3 * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
4 */
5
6#ifndef ATH11K_WMI_H
7#define ATH11K_WMI_H
8

--- 5520 unchanged lines hidden (view full) ---

5529 C2S(WOW_REASON_DEBUG_TEST);
5530 default:
5531 return NULL;
5532 }
5533}
5534
5535#undef C2S
5536
1/* SPDX-License-Identifier: BSD-3-Clause-Clear */
2/*
3 * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
4 */
5
6#ifndef ATH11K_WMI_H
7#define ATH11K_WMI_H
8

--- 5520 unchanged lines hidden (view full) ---

5529 C2S(WOW_REASON_DEBUG_TEST);
5530 default:
5531 return NULL;
5532 }
5533}
5534
5535#undef C2S
5536
5537struct wmi_wow_ev_arg {
5538 u32 vdev_id;
5539 u32 flag;
5540 enum wmi_wow_wake_reason wake_reason;
5541 u32 data_len;
5542};
5543
5544enum wmi_tlv_pattern_type {
5545 WOW_PATTERN_MIN = 0,
5546 WOW_BITMAP_PATTERN = WOW_PATTERN_MIN,
5547 WOW_IPV4_SYNC_PATTERN,
5548 WOW_IPV6_SYNC_PATTERN,
5549 WOW_WILD_CARD_PATTERN,
5550 WOW_TIMER_PATTERN,
5551 WOW_MAGIC_PATTERN,
5552 WOW_IPV6_RA_PATTERN,
5553 WOW_IOAC_PKT_PATTERN,
5554 WOW_IOAC_TMR_PATTERN,
5555 WOW_PATTERN_MAX
5556};
5557
5558#define WOW_DEFAULT_BITMAP_PATTERN_SIZE 148
5559#define WOW_DEFAULT_BITMASK_SIZE 148
5560
5561#define WOW_MIN_PATTERN_SIZE 1
5562#define WOW_MAX_PATTERN_SIZE 148
5563#define WOW_MAX_PKT_OFFSET 128
5564#define WOW_HDR_LEN (sizeof(struct ieee80211_hdr_3addr) + \
5565 sizeof(struct rfc1042_hdr))
5566#define WOW_MAX_REDUCE (WOW_HDR_LEN - sizeof(struct ethhdr) - \
5567 offsetof(struct ieee80211_hdr_3addr, addr1))
5568
5569struct wmi_wow_add_del_event_cmd {
5570 u32 tlv_header;
5571 u32 vdev_id;
5572 u32 is_add;
5573 u32 event_bitmap;
5574} __packed;
5575
5537struct wmi_wow_enable_cmd {
5538 u32 tlv_header;
5539 u32 enable;
5540 u32 pause_iface_config;
5541 u32 flags;
5542} __packed;
5543
5544struct wmi_wow_host_wakeup_ind {
5545 u32 tlv_header;
5546 u32 reserved;
5547} __packed;
5548
5576struct wmi_wow_enable_cmd {
5577 u32 tlv_header;
5578 u32 enable;
5579 u32 pause_iface_config;
5580 u32 flags;
5581} __packed;
5582
5583struct wmi_wow_host_wakeup_ind {
5584 u32 tlv_header;
5585 u32 reserved;
5586} __packed;
5587
5549struct wmi_wow_ev_arg {
5588struct wmi_tlv_wow_event_info {
5550 u32 vdev_id;
5551 u32 flag;
5589 u32 vdev_id;
5590 u32 flag;
5552 enum wmi_wow_wake_reason wake_reason;
5591 u32 wake_reason;
5553 u32 data_len;
5592 u32 data_len;
5554};
5593} __packed;
5555
5594
5595struct wmi_wow_bitmap_pattern {
5596 u32 tlv_header;
5597 u8 patternbuf[WOW_DEFAULT_BITMAP_PATTERN_SIZE];
5598 u8 bitmaskbuf[WOW_DEFAULT_BITMASK_SIZE];
5599 u32 pattern_offset;
5600 u32 pattern_len;
5601 u32 bitmask_len;
5602 u32 pattern_id;
5603} __packed;
5604
5605struct wmi_wow_add_pattern_cmd {
5606 u32 tlv_header;
5607 u32 vdev_id;
5608 u32 pattern_id;
5609 u32 pattern_type;
5610} __packed;
5611
5612struct wmi_wow_del_pattern_cmd {
5613 u32 tlv_header;
5614 u32 vdev_id;
5615 u32 pattern_id;
5616 u32 pattern_type;
5617} __packed;
5618
5556int ath11k_wmi_cmd_send(struct ath11k_pdev_wmi *wmi, struct sk_buff *skb,
5557 u32 cmd_id);
5558struct sk_buff *ath11k_wmi_alloc_skb(struct ath11k_wmi_base *wmi_sc, u32 len);
5559int ath11k_wmi_mgmt_send(struct ath11k *ar, u32 vdev_id, u32 buf_id,
5560 struct sk_buff *frame);
5561int ath11k_wmi_bcn_tmpl(struct ath11k *ar, u32 vdev_id,
5562 struct ieee80211_mutable_offsets *offs,
5563 struct sk_buff *bcn);

--- 145 unchanged lines hidden (view full) ---

5709int ath11k_wmi_set_hw_mode(struct ath11k_base *ab,
5710 enum wmi_host_hw_mode_config_type mode);
5711int ath11k_wmi_wow_host_wakeup_ind(struct ath11k *ar);
5712int ath11k_wmi_wow_enable(struct ath11k *ar);
5713int ath11k_wmi_scan_prob_req_oui(struct ath11k *ar,
5714 const u8 mac_addr[ETH_ALEN]);
5715int ath11k_wmi_fw_dbglog_cfg(struct ath11k *ar, u32 *module_id_bitmap,
5716 struct ath11k_fw_dbglog *dbglog);
5619int ath11k_wmi_cmd_send(struct ath11k_pdev_wmi *wmi, struct sk_buff *skb,
5620 u32 cmd_id);
5621struct sk_buff *ath11k_wmi_alloc_skb(struct ath11k_wmi_base *wmi_sc, u32 len);
5622int ath11k_wmi_mgmt_send(struct ath11k *ar, u32 vdev_id, u32 buf_id,
5623 struct sk_buff *frame);
5624int ath11k_wmi_bcn_tmpl(struct ath11k *ar, u32 vdev_id,
5625 struct ieee80211_mutable_offsets *offs,
5626 struct sk_buff *bcn);

--- 145 unchanged lines hidden (view full) ---

5772int ath11k_wmi_set_hw_mode(struct ath11k_base *ab,
5773 enum wmi_host_hw_mode_config_type mode);
5774int ath11k_wmi_wow_host_wakeup_ind(struct ath11k *ar);
5775int ath11k_wmi_wow_enable(struct ath11k *ar);
5776int ath11k_wmi_scan_prob_req_oui(struct ath11k *ar,
5777 const u8 mac_addr[ETH_ALEN]);
5778int ath11k_wmi_fw_dbglog_cfg(struct ath11k *ar, u32 *module_id_bitmap,
5779 struct ath11k_fw_dbglog *dbglog);
5780int ath11k_wmi_wow_del_pattern(struct ath11k *ar, u32 vdev_id, u32 pattern_id);
5781int ath11k_wmi_wow_add_pattern(struct ath11k *ar, u32 vdev_id, u32 pattern_id,
5782 const u8 *pattern, const u8 *mask,
5783 int pattern_len, int pattern_offset);
5784int ath11k_wmi_wow_add_wakeup_event(struct ath11k *ar, u32 vdev_id,
5785 enum wmi_wow_wakeup_event event,
5786 u32 enable);
5717#endif
5787#endif