18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/****************************************************************************** 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright(c) 2003 - 2011 Intel Corporation. All rights reserved. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Contact Information: 78c2ecf20Sopenharmony_ci * Intel Linux Wireless <ilw@linux.intel.com> 88c2ecf20Sopenharmony_ci * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 98c2ecf20Sopenharmony_ci * 108c2ecf20Sopenharmony_ci *****************************************************************************/ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#ifndef __il_3945_h__ 138c2ecf20Sopenharmony_ci#define __il_3945_h__ 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#include <linux/pci.h> /* for struct pci_device_id */ 168c2ecf20Sopenharmony_ci#include <linux/kernel.h> 178c2ecf20Sopenharmony_ci#include <net/ieee80211_radiotap.h> 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci/* Hardware specific file defines the PCI IDs table for that hardware module */ 208c2ecf20Sopenharmony_ciextern const struct pci_device_id il3945_hw_card_ids[]; 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#include "common.h" 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciextern const struct il_ops il3945_ops; 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci/* Highest firmware API version supported */ 278c2ecf20Sopenharmony_ci#define IL3945_UCODE_API_MAX 2 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci/* Lowest firmware API version supported */ 308c2ecf20Sopenharmony_ci#define IL3945_UCODE_API_MIN 1 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci#define IL3945_FW_PRE "iwlwifi-3945-" 338c2ecf20Sopenharmony_ci#define _IL3945_MODULE_FIRMWARE(api) IL3945_FW_PRE #api ".ucode" 348c2ecf20Sopenharmony_ci#define IL3945_MODULE_FIRMWARE(api) _IL3945_MODULE_FIRMWARE(api) 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci/* Default noise level to report when noise measurement is not available. 378c2ecf20Sopenharmony_ci * This may be because we're: 388c2ecf20Sopenharmony_ci * 1) Not associated (4965, no beacon stats being sent to driver) 398c2ecf20Sopenharmony_ci * 2) Scanning (noise measurement does not apply to associated channel) 408c2ecf20Sopenharmony_ci * 3) Receiving CCK (3945 delivers noise info only for OFDM frames) 418c2ecf20Sopenharmony_ci * Use default noise value of -127 ... this is below the range of measurable 428c2ecf20Sopenharmony_ci * Rx dBm for either 3945 or 4965, so it can indicate "unmeasurable" to user. 438c2ecf20Sopenharmony_ci * Also, -127 works better than 0 when averaging frames with/without 448c2ecf20Sopenharmony_ci * noise info (e.g. averaging might be done in app); measured dBm values are 458c2ecf20Sopenharmony_ci * always negative ... using a negative value as the default keeps all 468c2ecf20Sopenharmony_ci * averages within an s8's (used in some apps) range of negative values. */ 478c2ecf20Sopenharmony_ci#define IL_NOISE_MEAS_NOT_AVAILABLE (-127) 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci/* Module parameters accessible from iwl-*.c */ 508c2ecf20Sopenharmony_ciextern struct il_mod_params il3945_mod_params; 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_cistruct il3945_rate_scale_data { 538c2ecf20Sopenharmony_ci u64 data; 548c2ecf20Sopenharmony_ci s32 success_counter; 558c2ecf20Sopenharmony_ci s32 success_ratio; 568c2ecf20Sopenharmony_ci s32 counter; 578c2ecf20Sopenharmony_ci s32 average_tpt; 588c2ecf20Sopenharmony_ci unsigned long stamp; 598c2ecf20Sopenharmony_ci}; 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_cistruct il3945_rs_sta { 628c2ecf20Sopenharmony_ci spinlock_t lock; 638c2ecf20Sopenharmony_ci struct il_priv *il; 648c2ecf20Sopenharmony_ci s32 *expected_tpt; 658c2ecf20Sopenharmony_ci unsigned long last_partial_flush; 668c2ecf20Sopenharmony_ci unsigned long last_flush; 678c2ecf20Sopenharmony_ci u32 flush_time; 688c2ecf20Sopenharmony_ci u32 last_tx_packets; 698c2ecf20Sopenharmony_ci u32 tx_packets; 708c2ecf20Sopenharmony_ci u8 tgg; 718c2ecf20Sopenharmony_ci u8 flush_pending; 728c2ecf20Sopenharmony_ci u8 start_rate; 738c2ecf20Sopenharmony_ci struct timer_list rate_scale_flush; 748c2ecf20Sopenharmony_ci struct il3945_rate_scale_data win[RATE_COUNT_3945]; 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci /* used to be in sta_info */ 778c2ecf20Sopenharmony_ci int last_txrate_idx; 788c2ecf20Sopenharmony_ci}; 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ci/* 818c2ecf20Sopenharmony_ci * The common struct MUST be first because it is shared between 828c2ecf20Sopenharmony_ci * 3945 and 4965! 838c2ecf20Sopenharmony_ci */ 848c2ecf20Sopenharmony_cistruct il3945_sta_priv { 858c2ecf20Sopenharmony_ci struct il_station_priv_common common; 868c2ecf20Sopenharmony_ci struct il3945_rs_sta rs_sta; 878c2ecf20Sopenharmony_ci}; 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_cienum il3945_antenna { 908c2ecf20Sopenharmony_ci IL_ANTENNA_DIVERSITY, 918c2ecf20Sopenharmony_ci IL_ANTENNA_MAIN, 928c2ecf20Sopenharmony_ci IL_ANTENNA_AUX 938c2ecf20Sopenharmony_ci}; 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci/* 968c2ecf20Sopenharmony_ci * RTS threshold here is total size [2347] minus 4 FCS bytes 978c2ecf20Sopenharmony_ci * Per spec: 988c2ecf20Sopenharmony_ci * a value of 0 means RTS on all data/management packets 998c2ecf20Sopenharmony_ci * a value > max MSDU size means no RTS 1008c2ecf20Sopenharmony_ci * else RTS for data/management frames where MPDU is larger 1018c2ecf20Sopenharmony_ci * than RTS value. 1028c2ecf20Sopenharmony_ci */ 1038c2ecf20Sopenharmony_ci#define DEFAULT_RTS_THRESHOLD 2347U 1048c2ecf20Sopenharmony_ci#define MIN_RTS_THRESHOLD 0U 1058c2ecf20Sopenharmony_ci#define MAX_RTS_THRESHOLD 2347U 1068c2ecf20Sopenharmony_ci#define MAX_MSDU_SIZE 2304U 1078c2ecf20Sopenharmony_ci#define MAX_MPDU_SIZE 2346U 1088c2ecf20Sopenharmony_ci#define DEFAULT_BEACON_INTERVAL 100U 1098c2ecf20Sopenharmony_ci#define DEFAULT_SHORT_RETRY_LIMIT 7U 1108c2ecf20Sopenharmony_ci#define DEFAULT_LONG_RETRY_LIMIT 4U 1118c2ecf20Sopenharmony_ci 1128c2ecf20Sopenharmony_ci#define IL_TX_FIFO_AC0 0 1138c2ecf20Sopenharmony_ci#define IL_TX_FIFO_AC1 1 1148c2ecf20Sopenharmony_ci#define IL_TX_FIFO_AC2 2 1158c2ecf20Sopenharmony_ci#define IL_TX_FIFO_AC3 3 1168c2ecf20Sopenharmony_ci#define IL_TX_FIFO_HCCA_1 5 1178c2ecf20Sopenharmony_ci#define IL_TX_FIFO_HCCA_2 6 1188c2ecf20Sopenharmony_ci#define IL_TX_FIFO_NONE 7 1198c2ecf20Sopenharmony_ci 1208c2ecf20Sopenharmony_ci#define IEEE80211_DATA_LEN 2304 1218c2ecf20Sopenharmony_ci#define IEEE80211_4ADDR_LEN 30 1228c2ecf20Sopenharmony_ci#define IEEE80211_HLEN (IEEE80211_4ADDR_LEN) 1238c2ecf20Sopenharmony_ci#define IEEE80211_FRAME_LEN (IEEE80211_DATA_LEN + IEEE80211_HLEN) 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_cistruct il3945_frame { 1268c2ecf20Sopenharmony_ci union { 1278c2ecf20Sopenharmony_ci struct ieee80211_hdr frame; 1288c2ecf20Sopenharmony_ci struct il3945_tx_beacon_cmd beacon; 1298c2ecf20Sopenharmony_ci u8 raw[IEEE80211_FRAME_LEN]; 1308c2ecf20Sopenharmony_ci u8 cmd[360]; 1318c2ecf20Sopenharmony_ci } u; 1328c2ecf20Sopenharmony_ci struct list_head list; 1338c2ecf20Sopenharmony_ci}; 1348c2ecf20Sopenharmony_ci 1358c2ecf20Sopenharmony_ci#define SUP_RATE_11A_MAX_NUM_CHANNELS 8 1368c2ecf20Sopenharmony_ci#define SUP_RATE_11B_MAX_NUM_CHANNELS 4 1378c2ecf20Sopenharmony_ci#define SUP_RATE_11G_MAX_NUM_CHANNELS 12 1388c2ecf20Sopenharmony_ci 1398c2ecf20Sopenharmony_ci#define IL_SUPPORTED_RATES_IE_LEN 8 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_ci#define SCAN_INTERVAL 100 1428c2ecf20Sopenharmony_ci 1438c2ecf20Sopenharmony_ci#define MAX_TID_COUNT 9 1448c2ecf20Sopenharmony_ci 1458c2ecf20Sopenharmony_ci#define IL_INVALID_RATE 0xFF 1468c2ecf20Sopenharmony_ci#define IL_INVALID_VALUE -1 1478c2ecf20Sopenharmony_ci 1488c2ecf20Sopenharmony_ci#define STA_PS_STATUS_WAKE 0 1498c2ecf20Sopenharmony_ci#define STA_PS_STATUS_SLEEP 1 1508c2ecf20Sopenharmony_ci 1518c2ecf20Sopenharmony_cistruct il3945_ibss_seq { 1528c2ecf20Sopenharmony_ci u8 mac[ETH_ALEN]; 1538c2ecf20Sopenharmony_ci u16 seq_num; 1548c2ecf20Sopenharmony_ci u16 frag_num; 1558c2ecf20Sopenharmony_ci unsigned long packet_time; 1568c2ecf20Sopenharmony_ci struct list_head list; 1578c2ecf20Sopenharmony_ci}; 1588c2ecf20Sopenharmony_ci 1598c2ecf20Sopenharmony_ci#define IL_RX_HDR(x) ((struct il3945_rx_frame_hdr *)(\ 1608c2ecf20Sopenharmony_ci x->u.rx_frame.stats.payload + \ 1618c2ecf20Sopenharmony_ci x->u.rx_frame.stats.phy_count)) 1628c2ecf20Sopenharmony_ci#define IL_RX_END(x) ((struct il3945_rx_frame_end *)(\ 1638c2ecf20Sopenharmony_ci IL_RX_HDR(x)->payload + \ 1648c2ecf20Sopenharmony_ci le16_to_cpu(IL_RX_HDR(x)->len))) 1658c2ecf20Sopenharmony_ci#define IL_RX_STATS(x) (&x->u.rx_frame.stats) 1668c2ecf20Sopenharmony_ci#define IL_RX_DATA(x) (IL_RX_HDR(x)->payload) 1678c2ecf20Sopenharmony_ci 1688c2ecf20Sopenharmony_ci/****************************************************************************** 1698c2ecf20Sopenharmony_ci * 1708c2ecf20Sopenharmony_ci * Functions implemented in iwl3945-base.c which are forward declared here 1718c2ecf20Sopenharmony_ci * for use by iwl-*.c 1728c2ecf20Sopenharmony_ci * 1738c2ecf20Sopenharmony_ci *****************************************************************************/ 1748c2ecf20Sopenharmony_ciint il3945_calc_db_from_ratio(int sig_ratio); 1758c2ecf20Sopenharmony_civoid il3945_rx_replenish(void *data); 1768c2ecf20Sopenharmony_civoid il3945_rx_queue_reset(struct il_priv *il, struct il_rx_queue *rxq); 1778c2ecf20Sopenharmony_ciunsigned int il3945_fill_beacon_frame(struct il_priv *il, 1788c2ecf20Sopenharmony_ci struct ieee80211_hdr *hdr, int left); 1798c2ecf20Sopenharmony_ciint il3945_dump_nic_event_log(struct il_priv *il, bool full_log, char **buf, 1808c2ecf20Sopenharmony_ci bool display); 1818c2ecf20Sopenharmony_civoid il3945_dump_nic_error_log(struct il_priv *il); 1828c2ecf20Sopenharmony_ci 1838c2ecf20Sopenharmony_ci/****************************************************************************** 1848c2ecf20Sopenharmony_ci * 1858c2ecf20Sopenharmony_ci * Functions implemented in iwl-[34]*.c which are forward declared here 1868c2ecf20Sopenharmony_ci * for use by iwl3945-base.c 1878c2ecf20Sopenharmony_ci * 1888c2ecf20Sopenharmony_ci * NOTE: The implementation of these functions are hardware specific 1898c2ecf20Sopenharmony_ci * which is why they are in the hardware specific files (vs. iwl-base.c) 1908c2ecf20Sopenharmony_ci * 1918c2ecf20Sopenharmony_ci * Naming convention -- 1928c2ecf20Sopenharmony_ci * il3945_ <-- Its part of iwlwifi (should be changed to il3945_) 1938c2ecf20Sopenharmony_ci * il3945_hw_ <-- Hardware specific (implemented in iwl-XXXX.c by all HW) 1948c2ecf20Sopenharmony_ci * iwlXXXX_ <-- Hardware specific (implemented in iwl-XXXX.c for XXXX) 1958c2ecf20Sopenharmony_ci * il3945_bg_ <-- Called from work queue context 1968c2ecf20Sopenharmony_ci * il3945_mac_ <-- mac80211 callback 1978c2ecf20Sopenharmony_ci * 1988c2ecf20Sopenharmony_ci ****************************************************************************/ 1998c2ecf20Sopenharmony_civoid il3945_hw_handler_setup(struct il_priv *il); 2008c2ecf20Sopenharmony_civoid il3945_hw_setup_deferred_work(struct il_priv *il); 2018c2ecf20Sopenharmony_civoid il3945_hw_cancel_deferred_work(struct il_priv *il); 2028c2ecf20Sopenharmony_ciint il3945_hw_rxq_stop(struct il_priv *il); 2038c2ecf20Sopenharmony_ciint il3945_hw_set_hw_params(struct il_priv *il); 2048c2ecf20Sopenharmony_ciint il3945_hw_nic_init(struct il_priv *il); 2058c2ecf20Sopenharmony_ciint il3945_hw_nic_stop_master(struct il_priv *il); 2068c2ecf20Sopenharmony_civoid il3945_hw_txq_ctx_free(struct il_priv *il); 2078c2ecf20Sopenharmony_civoid il3945_hw_txq_ctx_stop(struct il_priv *il); 2088c2ecf20Sopenharmony_ciint il3945_hw_nic_reset(struct il_priv *il); 2098c2ecf20Sopenharmony_ciint il3945_hw_txq_attach_buf_to_tfd(struct il_priv *il, struct il_tx_queue *txq, 2108c2ecf20Sopenharmony_ci dma_addr_t addr, u16 len, u8 reset, u8 pad); 2118c2ecf20Sopenharmony_civoid il3945_hw_txq_free_tfd(struct il_priv *il, struct il_tx_queue *txq); 2128c2ecf20Sopenharmony_ciint il3945_hw_get_temperature(struct il_priv *il); 2138c2ecf20Sopenharmony_ciint il3945_hw_tx_queue_init(struct il_priv *il, struct il_tx_queue *txq); 2148c2ecf20Sopenharmony_ciunsigned int il3945_hw_get_beacon_cmd(struct il_priv *il, 2158c2ecf20Sopenharmony_ci struct il3945_frame *frame, u8 rate); 2168c2ecf20Sopenharmony_civoid il3945_hw_build_tx_cmd_rate(struct il_priv *il, struct il_device_cmd *cmd, 2178c2ecf20Sopenharmony_ci struct ieee80211_tx_info *info, 2188c2ecf20Sopenharmony_ci struct ieee80211_hdr *hdr, int sta_id); 2198c2ecf20Sopenharmony_ciint il3945_hw_reg_send_txpower(struct il_priv *il); 2208c2ecf20Sopenharmony_ciint il3945_hw_reg_set_txpower(struct il_priv *il, s8 power); 2218c2ecf20Sopenharmony_civoid il3945_hdl_stats(struct il_priv *il, struct il_rx_buf *rxb); 2228c2ecf20Sopenharmony_civoid il3945_hdl_c_stats(struct il_priv *il, struct il_rx_buf *rxb); 2238c2ecf20Sopenharmony_civoid il3945_disable_events(struct il_priv *il); 2248c2ecf20Sopenharmony_ciint il4965_get_temperature(const struct il_priv *il); 2258c2ecf20Sopenharmony_civoid il3945_post_associate(struct il_priv *il); 2268c2ecf20Sopenharmony_civoid il3945_config_ap(struct il_priv *il); 2278c2ecf20Sopenharmony_ci 2288c2ecf20Sopenharmony_ciint il3945_commit_rxon(struct il_priv *il); 2298c2ecf20Sopenharmony_ci 2308c2ecf20Sopenharmony_ci/** 2318c2ecf20Sopenharmony_ci * il3945_hw_find_station - Find station id for a given BSSID 2328c2ecf20Sopenharmony_ci * @bssid: MAC address of station ID to find 2338c2ecf20Sopenharmony_ci * 2348c2ecf20Sopenharmony_ci * NOTE: This should not be hardware specific but the code has 2358c2ecf20Sopenharmony_ci * not yet been merged into a single common layer for managing the 2368c2ecf20Sopenharmony_ci * station tables. 2378c2ecf20Sopenharmony_ci */ 2388c2ecf20Sopenharmony_ciu8 il3945_hw_find_station(struct il_priv *il, const u8 *bssid); 2398c2ecf20Sopenharmony_ci 2408c2ecf20Sopenharmony_ci__le32 il3945_get_antenna_flags(const struct il_priv *il); 2418c2ecf20Sopenharmony_ciint il3945_init_hw_rate_table(struct il_priv *il); 2428c2ecf20Sopenharmony_civoid il3945_reg_txpower_periodic(struct il_priv *il); 2438c2ecf20Sopenharmony_ciint il3945_txpower_set_from_eeprom(struct il_priv *il); 2448c2ecf20Sopenharmony_ci 2458c2ecf20Sopenharmony_ciint il3945_rs_next_rate(struct il_priv *il, int rate); 2468c2ecf20Sopenharmony_ci 2478c2ecf20Sopenharmony_ci/* scanning */ 2488c2ecf20Sopenharmony_ciint il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif); 2498c2ecf20Sopenharmony_civoid il3945_post_scan(struct il_priv *il); 2508c2ecf20Sopenharmony_ci 2518c2ecf20Sopenharmony_ci/* rates */ 2528c2ecf20Sopenharmony_ciextern const struct il3945_rate_info il3945_rates[RATE_COUNT_3945]; 2538c2ecf20Sopenharmony_ci 2548c2ecf20Sopenharmony_ci/* RSSI to dBm */ 2558c2ecf20Sopenharmony_ci#define IL39_RSSI_OFFSET 95 2568c2ecf20Sopenharmony_ci 2578c2ecf20Sopenharmony_ci/* 2588c2ecf20Sopenharmony_ci * EEPROM related constants, enums, and structures. 2598c2ecf20Sopenharmony_ci */ 2608c2ecf20Sopenharmony_ci#define EEPROM_SKU_CAP_OP_MODE_MRC (1 << 7) 2618c2ecf20Sopenharmony_ci 2628c2ecf20Sopenharmony_ci/* 2638c2ecf20Sopenharmony_ci * Mapping of a Tx power level, at factory calibration temperature, 2648c2ecf20Sopenharmony_ci * to a radio/DSP gain table idx. 2658c2ecf20Sopenharmony_ci * One for each of 5 "sample" power levels in each band. 2668c2ecf20Sopenharmony_ci * v_det is measured at the factory, using the 3945's built-in power amplifier 2678c2ecf20Sopenharmony_ci * (PA) output voltage detector. This same detector is used during Tx of 2688c2ecf20Sopenharmony_ci * long packets in normal operation to provide feedback as to proper output 2698c2ecf20Sopenharmony_ci * level. 2708c2ecf20Sopenharmony_ci * Data copied from EEPROM. 2718c2ecf20Sopenharmony_ci * DO NOT ALTER THIS STRUCTURE!!! 2728c2ecf20Sopenharmony_ci */ 2738c2ecf20Sopenharmony_cistruct il3945_eeprom_txpower_sample { 2748c2ecf20Sopenharmony_ci u8 gain_idx; /* idx into power (gain) setup table ... */ 2758c2ecf20Sopenharmony_ci s8 power; /* ... for this pwr level for this chnl group */ 2768c2ecf20Sopenharmony_ci u16 v_det; /* PA output voltage */ 2778c2ecf20Sopenharmony_ci} __packed; 2788c2ecf20Sopenharmony_ci 2798c2ecf20Sopenharmony_ci/* 2808c2ecf20Sopenharmony_ci * Mappings of Tx power levels -> nominal radio/DSP gain table idxes. 2818c2ecf20Sopenharmony_ci * One for each channel group (a.k.a. "band") (1 for BG, 4 for A). 2828c2ecf20Sopenharmony_ci * Tx power setup code interpolates between the 5 "sample" power levels 2838c2ecf20Sopenharmony_ci * to determine the nominal setup for a requested power level. 2848c2ecf20Sopenharmony_ci * Data copied from EEPROM. 2858c2ecf20Sopenharmony_ci * DO NOT ALTER THIS STRUCTURE!!! 2868c2ecf20Sopenharmony_ci */ 2878c2ecf20Sopenharmony_cistruct il3945_eeprom_txpower_group { 2888c2ecf20Sopenharmony_ci struct il3945_eeprom_txpower_sample samples[5]; /* 5 power levels */ 2898c2ecf20Sopenharmony_ci s32 a, b, c, d, e; /* coefficients for voltage->power 2908c2ecf20Sopenharmony_ci * formula (signed) */ 2918c2ecf20Sopenharmony_ci s32 Fa, Fb, Fc, Fd, Fe; /* these modify coeffs based on 2928c2ecf20Sopenharmony_ci * frequency (signed) */ 2938c2ecf20Sopenharmony_ci s8 saturation_power; /* highest power possible by h/w in this 2948c2ecf20Sopenharmony_ci * band */ 2958c2ecf20Sopenharmony_ci u8 group_channel; /* "representative" channel # in this band */ 2968c2ecf20Sopenharmony_ci s16 temperature; /* h/w temperature at factory calib this band 2978c2ecf20Sopenharmony_ci * (signed) */ 2988c2ecf20Sopenharmony_ci} __packed; 2998c2ecf20Sopenharmony_ci 3008c2ecf20Sopenharmony_ci/* 3018c2ecf20Sopenharmony_ci * Temperature-based Tx-power compensation data, not band-specific. 3028c2ecf20Sopenharmony_ci * These coefficients are use to modify a/b/c/d/e coeffs based on 3038c2ecf20Sopenharmony_ci * difference between current temperature and factory calib temperature. 3048c2ecf20Sopenharmony_ci * Data copied from EEPROM. 3058c2ecf20Sopenharmony_ci */ 3068c2ecf20Sopenharmony_cistruct il3945_eeprom_temperature_corr { 3078c2ecf20Sopenharmony_ci u32 Ta; 3088c2ecf20Sopenharmony_ci u32 Tb; 3098c2ecf20Sopenharmony_ci u32 Tc; 3108c2ecf20Sopenharmony_ci u32 Td; 3118c2ecf20Sopenharmony_ci u32 Te; 3128c2ecf20Sopenharmony_ci} __packed; 3138c2ecf20Sopenharmony_ci 3148c2ecf20Sopenharmony_ci/* 3158c2ecf20Sopenharmony_ci * EEPROM map 3168c2ecf20Sopenharmony_ci */ 3178c2ecf20Sopenharmony_cistruct il3945_eeprom { 3188c2ecf20Sopenharmony_ci u8 reserved0[16]; 3198c2ecf20Sopenharmony_ci u16 device_id; /* abs.ofs: 16 */ 3208c2ecf20Sopenharmony_ci u8 reserved1[2]; 3218c2ecf20Sopenharmony_ci u16 pmc; /* abs.ofs: 20 */ 3228c2ecf20Sopenharmony_ci u8 reserved2[20]; 3238c2ecf20Sopenharmony_ci u8 mac_address[6]; /* abs.ofs: 42 */ 3248c2ecf20Sopenharmony_ci u8 reserved3[58]; 3258c2ecf20Sopenharmony_ci u16 board_revision; /* abs.ofs: 106 */ 3268c2ecf20Sopenharmony_ci u8 reserved4[11]; 3278c2ecf20Sopenharmony_ci u8 board_pba_number[9]; /* abs.ofs: 119 */ 3288c2ecf20Sopenharmony_ci u8 reserved5[8]; 3298c2ecf20Sopenharmony_ci u16 version; /* abs.ofs: 136 */ 3308c2ecf20Sopenharmony_ci u8 sku_cap; /* abs.ofs: 138 */ 3318c2ecf20Sopenharmony_ci u8 leds_mode; /* abs.ofs: 139 */ 3328c2ecf20Sopenharmony_ci u16 oem_mode; 3338c2ecf20Sopenharmony_ci u16 wowlan_mode; /* abs.ofs: 142 */ 3348c2ecf20Sopenharmony_ci u16 leds_time_interval; /* abs.ofs: 144 */ 3358c2ecf20Sopenharmony_ci u8 leds_off_time; /* abs.ofs: 146 */ 3368c2ecf20Sopenharmony_ci u8 leds_on_time; /* abs.ofs: 147 */ 3378c2ecf20Sopenharmony_ci u8 almgor_m_version; /* abs.ofs: 148 */ 3388c2ecf20Sopenharmony_ci u8 antenna_switch_type; /* abs.ofs: 149 */ 3398c2ecf20Sopenharmony_ci u8 reserved6[42]; 3408c2ecf20Sopenharmony_ci u8 sku_id[4]; /* abs.ofs: 192 */ 3418c2ecf20Sopenharmony_ci 3428c2ecf20Sopenharmony_ci/* 3438c2ecf20Sopenharmony_ci * Per-channel regulatory data. 3448c2ecf20Sopenharmony_ci * 3458c2ecf20Sopenharmony_ci * Each channel that *might* be supported by 3945 has a fixed location 3468c2ecf20Sopenharmony_ci * in EEPROM containing EEPROM_CHANNEL_* usage flags (LSB) and max regulatory 3478c2ecf20Sopenharmony_ci * txpower (MSB). 3488c2ecf20Sopenharmony_ci * 3498c2ecf20Sopenharmony_ci * Entries immediately below are for 20 MHz channel width. 3508c2ecf20Sopenharmony_ci * 3518c2ecf20Sopenharmony_ci * 2.4 GHz channels 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 3528c2ecf20Sopenharmony_ci */ 3538c2ecf20Sopenharmony_ci u16 band_1_count; /* abs.ofs: 196 */ 3548c2ecf20Sopenharmony_ci struct il_eeprom_channel band_1_channels[14]; /* abs.ofs: 198 */ 3558c2ecf20Sopenharmony_ci 3568c2ecf20Sopenharmony_ci/* 3578c2ecf20Sopenharmony_ci * 4.9 GHz channels 183, 184, 185, 187, 188, 189, 192, 196, 3588c2ecf20Sopenharmony_ci * 5.0 GHz channels 7, 8, 11, 12, 16 3598c2ecf20Sopenharmony_ci * (4915-5080MHz) (none of these is ever supported) 3608c2ecf20Sopenharmony_ci */ 3618c2ecf20Sopenharmony_ci u16 band_2_count; /* abs.ofs: 226 */ 3628c2ecf20Sopenharmony_ci struct il_eeprom_channel band_2_channels[13]; /* abs.ofs: 228 */ 3638c2ecf20Sopenharmony_ci 3648c2ecf20Sopenharmony_ci/* 3658c2ecf20Sopenharmony_ci * 5.2 GHz channels 34, 36, 38, 40, 42, 44, 46, 48, 52, 56, 60, 64 3668c2ecf20Sopenharmony_ci * (5170-5320MHz) 3678c2ecf20Sopenharmony_ci */ 3688c2ecf20Sopenharmony_ci u16 band_3_count; /* abs.ofs: 254 */ 3698c2ecf20Sopenharmony_ci struct il_eeprom_channel band_3_channels[12]; /* abs.ofs: 256 */ 3708c2ecf20Sopenharmony_ci 3718c2ecf20Sopenharmony_ci/* 3728c2ecf20Sopenharmony_ci * 5.5 GHz channels 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140 3738c2ecf20Sopenharmony_ci * (5500-5700MHz) 3748c2ecf20Sopenharmony_ci */ 3758c2ecf20Sopenharmony_ci u16 band_4_count; /* abs.ofs: 280 */ 3768c2ecf20Sopenharmony_ci struct il_eeprom_channel band_4_channels[11]; /* abs.ofs: 282 */ 3778c2ecf20Sopenharmony_ci 3788c2ecf20Sopenharmony_ci/* 3798c2ecf20Sopenharmony_ci * 5.7 GHz channels 145, 149, 153, 157, 161, 165 3808c2ecf20Sopenharmony_ci * (5725-5825MHz) 3818c2ecf20Sopenharmony_ci */ 3828c2ecf20Sopenharmony_ci u16 band_5_count; /* abs.ofs: 304 */ 3838c2ecf20Sopenharmony_ci struct il_eeprom_channel band_5_channels[6]; /* abs.ofs: 306 */ 3848c2ecf20Sopenharmony_ci 3858c2ecf20Sopenharmony_ci u8 reserved9[194]; 3868c2ecf20Sopenharmony_ci 3878c2ecf20Sopenharmony_ci/* 3888c2ecf20Sopenharmony_ci * 3945 Txpower calibration data. 3898c2ecf20Sopenharmony_ci */ 3908c2ecf20Sopenharmony_ci#define IL_NUM_TX_CALIB_GROUPS 5 3918c2ecf20Sopenharmony_ci struct il3945_eeprom_txpower_group groups[IL_NUM_TX_CALIB_GROUPS]; 3928c2ecf20Sopenharmony_ci/* abs.ofs: 512 */ 3938c2ecf20Sopenharmony_ci struct il3945_eeprom_temperature_corr corrections; /* abs.ofs: 832 */ 3948c2ecf20Sopenharmony_ci u8 reserved16[172]; /* fill out to full 1024 byte block */ 3958c2ecf20Sopenharmony_ci} __packed; 3968c2ecf20Sopenharmony_ci 3978c2ecf20Sopenharmony_ci#define IL3945_EEPROM_IMG_SIZE 1024 3988c2ecf20Sopenharmony_ci 3998c2ecf20Sopenharmony_ci/* End of EEPROM */ 4008c2ecf20Sopenharmony_ci 4018c2ecf20Sopenharmony_ci#define PCI_CFG_REV_ID_BIT_BASIC_SKU (0x40) /* bit 6 */ 4028c2ecf20Sopenharmony_ci#define PCI_CFG_REV_ID_BIT_RTP (0x80) /* bit 7 */ 4038c2ecf20Sopenharmony_ci 4048c2ecf20Sopenharmony_ci/* 4 DATA + 1 CMD. There are 2 HCCA queues that are not used. */ 4058c2ecf20Sopenharmony_ci#define IL39_NUM_QUEUES 5 4068c2ecf20Sopenharmony_ci#define IL39_CMD_QUEUE_NUM 4 4078c2ecf20Sopenharmony_ci 4088c2ecf20Sopenharmony_ci#define IL_DEFAULT_TX_RETRY 15 4098c2ecf20Sopenharmony_ci 4108c2ecf20Sopenharmony_ci/*********************************************/ 4118c2ecf20Sopenharmony_ci 4128c2ecf20Sopenharmony_ci#define RFD_SIZE 4 4138c2ecf20Sopenharmony_ci#define NUM_TFD_CHUNKS 4 4148c2ecf20Sopenharmony_ci 4158c2ecf20Sopenharmony_ci#define TFD_CTL_COUNT_SET(n) (n << 24) 4168c2ecf20Sopenharmony_ci#define TFD_CTL_COUNT_GET(ctl) ((ctl >> 24) & 7) 4178c2ecf20Sopenharmony_ci#define TFD_CTL_PAD_SET(n) (n << 28) 4188c2ecf20Sopenharmony_ci#define TFD_CTL_PAD_GET(ctl) (ctl >> 28) 4198c2ecf20Sopenharmony_ci 4208c2ecf20Sopenharmony_ci/* Sizes and addresses for instruction and data memory (SRAM) in 4218c2ecf20Sopenharmony_ci * 3945's embedded processor. Driver access is via HBUS_TARG_MEM_* regs. */ 4228c2ecf20Sopenharmony_ci#define IL39_RTC_INST_LOWER_BOUND (0x000000) 4238c2ecf20Sopenharmony_ci#define IL39_RTC_INST_UPPER_BOUND (0x014000) 4248c2ecf20Sopenharmony_ci 4258c2ecf20Sopenharmony_ci#define IL39_RTC_DATA_LOWER_BOUND (0x800000) 4268c2ecf20Sopenharmony_ci#define IL39_RTC_DATA_UPPER_BOUND (0x808000) 4278c2ecf20Sopenharmony_ci 4288c2ecf20Sopenharmony_ci#define IL39_RTC_INST_SIZE (IL39_RTC_INST_UPPER_BOUND - \ 4298c2ecf20Sopenharmony_ci IL39_RTC_INST_LOWER_BOUND) 4308c2ecf20Sopenharmony_ci#define IL39_RTC_DATA_SIZE (IL39_RTC_DATA_UPPER_BOUND - \ 4318c2ecf20Sopenharmony_ci IL39_RTC_DATA_LOWER_BOUND) 4328c2ecf20Sopenharmony_ci 4338c2ecf20Sopenharmony_ci#define IL39_MAX_INST_SIZE IL39_RTC_INST_SIZE 4348c2ecf20Sopenharmony_ci#define IL39_MAX_DATA_SIZE IL39_RTC_DATA_SIZE 4358c2ecf20Sopenharmony_ci 4368c2ecf20Sopenharmony_ci/* Size of uCode instruction memory in bootstrap state machine */ 4378c2ecf20Sopenharmony_ci#define IL39_MAX_BSM_SIZE IL39_RTC_INST_SIZE 4388c2ecf20Sopenharmony_ci 4398c2ecf20Sopenharmony_cistatic inline int 4408c2ecf20Sopenharmony_ciil3945_hw_valid_rtc_data_addr(u32 addr) 4418c2ecf20Sopenharmony_ci{ 4428c2ecf20Sopenharmony_ci return (addr >= IL39_RTC_DATA_LOWER_BOUND && 4438c2ecf20Sopenharmony_ci addr < IL39_RTC_DATA_UPPER_BOUND); 4448c2ecf20Sopenharmony_ci} 4458c2ecf20Sopenharmony_ci 4468c2ecf20Sopenharmony_ci/* Base physical address of il3945_shared is provided to FH39_TSSR_CBB_BASE 4478c2ecf20Sopenharmony_ci * and &il3945_shared.rx_read_ptr[0] is provided to FH39_RCSR_RPTR_ADDR(0) */ 4488c2ecf20Sopenharmony_cistruct il3945_shared { 4498c2ecf20Sopenharmony_ci __le32 tx_base_ptr[8]; 4508c2ecf20Sopenharmony_ci} __packed; 4518c2ecf20Sopenharmony_ci 4528c2ecf20Sopenharmony_ci/************************************/ 4538c2ecf20Sopenharmony_ci/* iwl3945 Flow Handler Definitions */ 4548c2ecf20Sopenharmony_ci/************************************/ 4558c2ecf20Sopenharmony_ci 4568c2ecf20Sopenharmony_ci/** 4578c2ecf20Sopenharmony_ci * This I/O area is directly read/writable by driver (e.g. Linux uses writel()) 4588c2ecf20Sopenharmony_ci * Addresses are offsets from device's PCI hardware base address. 4598c2ecf20Sopenharmony_ci */ 4608c2ecf20Sopenharmony_ci#define FH39_MEM_LOWER_BOUND (0x0800) 4618c2ecf20Sopenharmony_ci#define FH39_MEM_UPPER_BOUND (0x1000) 4628c2ecf20Sopenharmony_ci 4638c2ecf20Sopenharmony_ci#define FH39_CBCC_TBL (FH39_MEM_LOWER_BOUND + 0x140) 4648c2ecf20Sopenharmony_ci#define FH39_TFDB_TBL (FH39_MEM_LOWER_BOUND + 0x180) 4658c2ecf20Sopenharmony_ci#define FH39_RCSR_TBL (FH39_MEM_LOWER_BOUND + 0x400) 4668c2ecf20Sopenharmony_ci#define FH39_RSSR_TBL (FH39_MEM_LOWER_BOUND + 0x4c0) 4678c2ecf20Sopenharmony_ci#define FH39_TCSR_TBL (FH39_MEM_LOWER_BOUND + 0x500) 4688c2ecf20Sopenharmony_ci#define FH39_TSSR_TBL (FH39_MEM_LOWER_BOUND + 0x680) 4698c2ecf20Sopenharmony_ci 4708c2ecf20Sopenharmony_ci/* TFDB (Transmit Frame Buffer Descriptor) */ 4718c2ecf20Sopenharmony_ci#define FH39_TFDB(_ch, buf) (FH39_TFDB_TBL + \ 4728c2ecf20Sopenharmony_ci ((_ch) * 2 + (buf)) * 0x28) 4738c2ecf20Sopenharmony_ci#define FH39_TFDB_CHNL_BUF_CTRL_REG(_ch) (FH39_TFDB_TBL + 0x50 * (_ch)) 4748c2ecf20Sopenharmony_ci 4758c2ecf20Sopenharmony_ci/* CBCC channel is [0,2] */ 4768c2ecf20Sopenharmony_ci#define FH39_CBCC(_ch) (FH39_CBCC_TBL + (_ch) * 0x8) 4778c2ecf20Sopenharmony_ci#define FH39_CBCC_CTRL(_ch) (FH39_CBCC(_ch) + 0x00) 4788c2ecf20Sopenharmony_ci#define FH39_CBCC_BASE(_ch) (FH39_CBCC(_ch) + 0x04) 4798c2ecf20Sopenharmony_ci 4808c2ecf20Sopenharmony_ci/* RCSR channel is [0,2] */ 4818c2ecf20Sopenharmony_ci#define FH39_RCSR(_ch) (FH39_RCSR_TBL + (_ch) * 0x40) 4828c2ecf20Sopenharmony_ci#define FH39_RCSR_CONFIG(_ch) (FH39_RCSR(_ch) + 0x00) 4838c2ecf20Sopenharmony_ci#define FH39_RCSR_RBD_BASE(_ch) (FH39_RCSR(_ch) + 0x04) 4848c2ecf20Sopenharmony_ci#define FH39_RCSR_WPTR(_ch) (FH39_RCSR(_ch) + 0x20) 4858c2ecf20Sopenharmony_ci#define FH39_RCSR_RPTR_ADDR(_ch) (FH39_RCSR(_ch) + 0x24) 4868c2ecf20Sopenharmony_ci 4878c2ecf20Sopenharmony_ci#define FH39_RSCSR_CHNL0_WPTR (FH39_RCSR_WPTR(0)) 4888c2ecf20Sopenharmony_ci 4898c2ecf20Sopenharmony_ci/* RSSR */ 4908c2ecf20Sopenharmony_ci#define FH39_RSSR_CTRL (FH39_RSSR_TBL + 0x000) 4918c2ecf20Sopenharmony_ci#define FH39_RSSR_STATUS (FH39_RSSR_TBL + 0x004) 4928c2ecf20Sopenharmony_ci 4938c2ecf20Sopenharmony_ci/* TCSR */ 4948c2ecf20Sopenharmony_ci#define FH39_TCSR(_ch) (FH39_TCSR_TBL + (_ch) * 0x20) 4958c2ecf20Sopenharmony_ci#define FH39_TCSR_CONFIG(_ch) (FH39_TCSR(_ch) + 0x00) 4968c2ecf20Sopenharmony_ci#define FH39_TCSR_CREDIT(_ch) (FH39_TCSR(_ch) + 0x04) 4978c2ecf20Sopenharmony_ci#define FH39_TCSR_BUFF_STTS(_ch) (FH39_TCSR(_ch) + 0x08) 4988c2ecf20Sopenharmony_ci 4998c2ecf20Sopenharmony_ci/* TSSR */ 5008c2ecf20Sopenharmony_ci#define FH39_TSSR_CBB_BASE (FH39_TSSR_TBL + 0x000) 5018c2ecf20Sopenharmony_ci#define FH39_TSSR_MSG_CONFIG (FH39_TSSR_TBL + 0x008) 5028c2ecf20Sopenharmony_ci#define FH39_TSSR_TX_STATUS (FH39_TSSR_TBL + 0x010) 5038c2ecf20Sopenharmony_ci 5048c2ecf20Sopenharmony_ci/* DBM */ 5058c2ecf20Sopenharmony_ci 5068c2ecf20Sopenharmony_ci#define FH39_SRVC_CHNL (6) 5078c2ecf20Sopenharmony_ci 5088c2ecf20Sopenharmony_ci#define FH39_RCSR_RX_CONFIG_REG_POS_RBDC_SIZE (20) 5098c2ecf20Sopenharmony_ci#define FH39_RCSR_RX_CONFIG_REG_POS_IRQ_RBTH (4) 5108c2ecf20Sopenharmony_ci 5118c2ecf20Sopenharmony_ci#define FH39_RCSR_RX_CONFIG_REG_BIT_WR_STTS_EN (0x08000000) 5128c2ecf20Sopenharmony_ci 5138c2ecf20Sopenharmony_ci#define FH39_RCSR_RX_CONFIG_REG_VAL_DMA_CHNL_EN_ENABLE (0x80000000) 5148c2ecf20Sopenharmony_ci 5158c2ecf20Sopenharmony_ci#define FH39_RCSR_RX_CONFIG_REG_VAL_RDRBD_EN_ENABLE (0x20000000) 5168c2ecf20Sopenharmony_ci 5178c2ecf20Sopenharmony_ci#define FH39_RCSR_RX_CONFIG_REG_VAL_MAX_FRAG_SIZE_128 (0x01000000) 5188c2ecf20Sopenharmony_ci 5198c2ecf20Sopenharmony_ci#define FH39_RCSR_RX_CONFIG_REG_VAL_IRQ_DEST_INT_HOST (0x00001000) 5208c2ecf20Sopenharmony_ci 5218c2ecf20Sopenharmony_ci#define FH39_RCSR_RX_CONFIG_REG_VAL_MSG_MODE_FH (0x00000000) 5228c2ecf20Sopenharmony_ci 5238c2ecf20Sopenharmony_ci#define FH39_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_TXF (0x00000000) 5248c2ecf20Sopenharmony_ci#define FH39_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_DRIVER (0x00000001) 5258c2ecf20Sopenharmony_ci 5268c2ecf20Sopenharmony_ci#define FH39_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_DISABLE_VAL (0x00000000) 5278c2ecf20Sopenharmony_ci#define FH39_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_ENABLE_VAL (0x00000008) 5288c2ecf20Sopenharmony_ci 5298c2ecf20Sopenharmony_ci#define FH39_TCSR_TX_CONFIG_REG_VAL_CIRQ_HOST_IFTFD (0x00200000) 5308c2ecf20Sopenharmony_ci 5318c2ecf20Sopenharmony_ci#define FH39_TCSR_TX_CONFIG_REG_VAL_CIRQ_RTC_NOINT (0x00000000) 5328c2ecf20Sopenharmony_ci 5338c2ecf20Sopenharmony_ci#define FH39_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_PAUSE (0x00000000) 5348c2ecf20Sopenharmony_ci#define FH39_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_ENABLE (0x80000000) 5358c2ecf20Sopenharmony_ci 5368c2ecf20Sopenharmony_ci#define FH39_TCSR_CHNL_TX_BUF_STS_REG_VAL_TFDB_VALID (0x00004000) 5378c2ecf20Sopenharmony_ci 5388c2ecf20Sopenharmony_ci#define FH39_TCSR_CHNL_TX_BUF_STS_REG_BIT_TFDB_WPTR (0x00000001) 5398c2ecf20Sopenharmony_ci 5408c2ecf20Sopenharmony_ci#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_SNOOP_RD_TXPD_ON (0xFF000000) 5418c2ecf20Sopenharmony_ci#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RD_TXPD_ON (0x00FF0000) 5428c2ecf20Sopenharmony_ci 5438c2ecf20Sopenharmony_ci#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_MAX_FRAG_SIZE_128B (0x00000400) 5448c2ecf20Sopenharmony_ci 5458c2ecf20Sopenharmony_ci#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_SNOOP_RD_TFD_ON (0x00000100) 5468c2ecf20Sopenharmony_ci#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RD_CBB_ON (0x00000080) 5478c2ecf20Sopenharmony_ci 5488c2ecf20Sopenharmony_ci#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RSP_WAIT_TH (0x00000020) 5498c2ecf20Sopenharmony_ci#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_RSP_WAIT_TH (0x00000005) 5508c2ecf20Sopenharmony_ci 5518c2ecf20Sopenharmony_ci#define FH39_TSSR_TX_STATUS_REG_BIT_BUFS_EMPTY(_ch) (BIT(_ch) << 24) 5528c2ecf20Sopenharmony_ci#define FH39_TSSR_TX_STATUS_REG_BIT_NO_PEND_REQ(_ch) (BIT(_ch) << 16) 5538c2ecf20Sopenharmony_ci 5548c2ecf20Sopenharmony_ci#define FH39_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(_ch) \ 5558c2ecf20Sopenharmony_ci (FH39_TSSR_TX_STATUS_REG_BIT_BUFS_EMPTY(_ch) | \ 5568c2ecf20Sopenharmony_ci FH39_TSSR_TX_STATUS_REG_BIT_NO_PEND_REQ(_ch)) 5578c2ecf20Sopenharmony_ci 5588c2ecf20Sopenharmony_ci#define FH39_RSSR_CHNL0_RX_STATUS_CHNL_IDLE (0x01000000) 5598c2ecf20Sopenharmony_ci 5608c2ecf20Sopenharmony_cistruct il3945_tfd_tb { 5618c2ecf20Sopenharmony_ci __le32 addr; 5628c2ecf20Sopenharmony_ci __le32 len; 5638c2ecf20Sopenharmony_ci} __packed; 5648c2ecf20Sopenharmony_ci 5658c2ecf20Sopenharmony_cistruct il3945_tfd { 5668c2ecf20Sopenharmony_ci __le32 control_flags; 5678c2ecf20Sopenharmony_ci struct il3945_tfd_tb tbs[4]; 5688c2ecf20Sopenharmony_ci u8 __pad[28]; 5698c2ecf20Sopenharmony_ci} __packed; 5708c2ecf20Sopenharmony_ci 5718c2ecf20Sopenharmony_ci#ifdef CONFIG_IWLEGACY_DEBUGFS 5728c2ecf20Sopenharmony_ciextern const struct il_debugfs_ops il3945_debugfs_ops; 5738c2ecf20Sopenharmony_ci#endif 5748c2ecf20Sopenharmony_ci 5758c2ecf20Sopenharmony_ci#endif 576