⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iwl-commands.h

📁 linux内核源码
💻 H
📖 第 1 页 / 共 4 页
字号:
				* chnl */	__le32 suspend_time;   /* pause scan this long when returning to svc				* chnl.				* 3945 -- 31:24 # beacons, 19:0 additional usec,				* 4965 -- 31:22 # beacons, 21:0 additional usec.				*/	__le32 flags;	__le32 filter_flags;	struct iwl_tx_cmd tx_cmd;	struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX];	u8 data[0];	/*	 * The channels start after the probe request payload and are of type:	 *	 * struct iwl_scan_channel channels[0];	 *	 * NOTE:  Only one band of channels can be scanned per pass.  You	 * can not mix 2.4GHz channels and 5.2GHz channels and must	 * request a scan multiple times (not concurrently)	 *	 */} __attribute__ ((packed));/* Can abort will notify by complete notification with abort status. */#define CAN_ABORT_STATUS	__constant_cpu_to_le32(0x1)/* complete notification statuses */#define ABORT_STATUS            0x2/* * REPLY_SCAN_CMD = 0x80 (response) */struct iwl_scanreq_notification {	__le32 status;		/* 1: okay, 2: cannot fulfill request */} __attribute__ ((packed));/* * SCAN_START_NOTIFICATION = 0x82 (notification only, not a command) */struct iwl_scanstart_notification {	__le32 tsf_low;	__le32 tsf_high;	__le32 beacon_timer;	u8 channel;	u8 band;	u8 reserved[2];	__le32 status;} __attribute__ ((packed));#define  SCAN_OWNER_STATUS 0x1;#define  MEASURE_OWNER_STATUS 0x2;#define NUMBER_OF_STATISTICS 1	/* first __le32 is good CRC *//* * SCAN_RESULTS_NOTIFICATION = 0x83 (notification only, not a command) */struct iwl_scanresults_notification {	u8 channel;	u8 band;	u8 reserved[2];	__le32 tsf_low;	__le32 tsf_high;	__le32 statistics[NUMBER_OF_STATISTICS];} __attribute__ ((packed));/* * SCAN_COMPLETE_NOTIFICATION = 0x84 (notification only, not a command) */struct iwl_scancomplete_notification {	u8 scanned_channels;	u8 status;	u8 reserved;	u8 last_channel;	__le32 tsf_low;	__le32 tsf_high;} __attribute__ ((packed));/****************************************************************************** * (9) * IBSS/AP Commands and Notifications: * *****************************************************************************//* * BEACON_NOTIFICATION = 0x90 (notification only, not a command) */struct iwl_beacon_notif {	struct iwl_tx_resp beacon_notify_hdr;	__le32 low_tsf;	__le32 high_tsf;	__le32 ibss_mgr_status;} __attribute__ ((packed));/* * REPLY_TX_BEACON = 0x91 (command, has simple generic response) */struct iwl_tx_beacon_cmd {	struct iwl_tx_cmd tx;	__le16 tim_idx;	u8 tim_size;	u8 reserved1;	struct ieee80211_hdr frame[0];	/* beacon frame */} __attribute__ ((packed));/****************************************************************************** * (10) * Statistics Commands and Notifications: * *****************************************************************************/#define IWL_TEMP_CONVERT 260#define SUP_RATE_11A_MAX_NUM_CHANNELS  8#define SUP_RATE_11B_MAX_NUM_CHANNELS  4#define SUP_RATE_11G_MAX_NUM_CHANNELS  12/* Used for passing to driver number of successes and failures per rate */struct rate_histogram {	union {		__le32 a[SUP_RATE_11A_MAX_NUM_CHANNELS];		__le32 b[SUP_RATE_11B_MAX_NUM_CHANNELS];		__le32 g[SUP_RATE_11G_MAX_NUM_CHANNELS];	} success;	union {		__le32 a[SUP_RATE_11A_MAX_NUM_CHANNELS];		__le32 b[SUP_RATE_11B_MAX_NUM_CHANNELS];		__le32 g[SUP_RATE_11G_MAX_NUM_CHANNELS];	} failed;} __attribute__ ((packed));/* statistics command response */struct statistics_rx_phy {	__le32 ina_cnt;	__le32 fina_cnt;	__le32 plcp_err;	__le32 crc32_err;	__le32 overrun_err;	__le32 early_overrun_err;	__le32 crc32_good;	__le32 false_alarm_cnt;	__le32 fina_sync_err_cnt;	__le32 sfd_timeout;	__le32 fina_timeout;	__le32 unresponded_rts;	__le32 rxe_frame_limit_overrun;	__le32 sent_ack_cnt;	__le32 sent_cts_cnt;#if IWL == 4965	__le32 sent_ba_rsp_cnt;	__le32 dsp_self_kill;	__le32 mh_format_err;	__le32 re_acq_main_rssi_sum;	__le32 reserved3;#endif} __attribute__ ((packed));#if IWL == 4965struct statistics_rx_ht_phy {	__le32 plcp_err;	__le32 overrun_err;	__le32 early_overrun_err;	__le32 crc32_good;	__le32 crc32_err;	__le32 mh_format_err;	__le32 agg_crc32_good;	__le32 agg_mpdu_cnt;	__le32 agg_cnt;	__le32 reserved2;} __attribute__ ((packed));#endifstruct statistics_rx_non_phy {	__le32 bogus_cts;	/* CTS received when not expecting CTS */	__le32 bogus_ack;	/* ACK received when not expecting ACK */	__le32 non_bssid_frames;	/* number of frames with BSSID that					 * doesn't belong to the STA BSSID */	__le32 filtered_frames;	/* count frames that were dumped in the				 * filtering process */	__le32 non_channel_beacons;	/* beacons with our bss id but not on					 * our serving channel */#if IWL == 4965	__le32 channel_beacons;	/* beacons with our bss id and in our				 * serving channel */	__le32 num_missed_bcon;	/* number of missed beacons */	__le32 adc_rx_saturation_time;	/* count in 0.8us units the time the					 * ADC was in saturation */	__le32 ina_detection_search_time;/* total time (in 0.8us) searched					  * for INA */	__le32 beacon_silence_rssi_a;	/* RSSI silence after beacon frame */	__le32 beacon_silence_rssi_b;	/* RSSI silence after beacon frame */	__le32 beacon_silence_rssi_c;	/* RSSI silence after beacon frame */	__le32 interference_data_flag;	/* flag for interference data					 * availability. 1 when data is					 * available. */	__le32 channel_load;	/* counts RX Enable time */	__le32 dsp_false_alarms;	/* DSP false alarm (both OFDM					 * and CCK) counter */	__le32 beacon_rssi_a;	__le32 beacon_rssi_b;	__le32 beacon_rssi_c;	__le32 beacon_energy_a;	__le32 beacon_energy_b;	__le32 beacon_energy_c;#endif} __attribute__ ((packed));struct statistics_rx {	struct statistics_rx_phy ofdm;	struct statistics_rx_phy cck;	struct statistics_rx_non_phy general;#if IWL == 4965	struct statistics_rx_ht_phy ofdm_ht;#endif} __attribute__ ((packed));#if IWL == 4965struct statistics_tx_non_phy_agg {	__le32 ba_timeout;	__le32 ba_reschedule_frames;	__le32 scd_query_agg_frame_cnt;	__le32 scd_query_no_agg;	__le32 scd_query_agg;	__le32 scd_query_mismatch;	__le32 frame_not_ready;	__le32 underrun;	__le32 bt_prio_kill;	__le32 rx_ba_rsp_cnt;	__le32 reserved2;	__le32 reserved3;} __attribute__ ((packed));#endifstruct statistics_tx {	__le32 preamble_cnt;	__le32 rx_detected_cnt;	__le32 bt_prio_defer_cnt;	__le32 bt_prio_kill_cnt;	__le32 few_bytes_cnt;	__le32 cts_timeout;	__le32 ack_timeout;	__le32 expected_ack_cnt;	__le32 actual_ack_cnt;#if IWL == 4965	__le32 dump_msdu_cnt;	__le32 burst_abort_next_frame_mismatch_cnt;	__le32 burst_abort_missing_next_frame_cnt;	__le32 cts_timeout_collision;	__le32 ack_or_ba_timeout_collision;	struct statistics_tx_non_phy_agg agg;#endif} __attribute__ ((packed));struct statistics_dbg {	__le32 burst_check;	__le32 burst_count;	__le32 reserved[4];} __attribute__ ((packed));struct statistics_div {	__le32 tx_on_a;	__le32 tx_on_b;	__le32 exec_time;	__le32 probe_time;#if IWL == 4965	__le32 reserved1;	__le32 reserved2;#endif} __attribute__ ((packed));struct statistics_general {	__le32 temperature;#if IWL == 4965	__le32 temperature_m;#endif	struct statistics_dbg dbg;	__le32 sleep_time;	__le32 slots_out;	__le32 slots_idle;	__le32 ttl_timestamp;	struct statistics_div div;#if IWL == 4965	__le32 rx_enable_counter;	__le32 reserved1;	__le32 reserved2;	__le32 reserved3;#endif} __attribute__ ((packed));/* * REPLY_STATISTICS_CMD = 0x9c, * 3945 and 4965 identical. * * This command triggers an immediate response containing uCode statistics. * The response is in the same format as STATISTICS_NOTIFICATION 0x9d, below. * * If the CLEAR_STATS configuration flag is set, uCode will clear its * internal copy of the statistics (counters) after issuing the response. * This flag does not affect STATISTICS_NOTIFICATIONs after beacons (see below). * * If the DISABLE_NOTIF configuration flag is set, uCode will not issue * STATISTICS_NOTIFICATIONs after received beacons (see below).  This flag * does not affect the response to the REPLY_STATISTICS_CMD 0x9c itself. */#define IWL_STATS_CONF_CLEAR_STATS __constant_cpu_to_le32(0x1)	/* see above */#define IWL_STATS_CONF_DISABLE_NOTIF __constant_cpu_to_le32(0x2)/* see above */struct iwl_statistics_cmd {	__le32 configuration_flags;	/* IWL_STATS_CONF_* */} __attribute__ ((packed));/* * STATISTICS_NOTIFICATION = 0x9d (notification only, not a command) * * By default, uCode issues this notification after receiving a beacon * while associated.  To disable this behavior, set DISABLE_NOTIF flag in the * REPLY_STATISTICS_CMD 0x9c, above. * * Statistics counters continue to increment beacon after beacon, but are * cleared when changing channels or when driver issues REPLY_STATISTICS_CMD * 0x9c with CLEAR_STATS bit set (see above). * * uCode also issues this notification during scans.  uCode clears statistics * appropriately so that each notification contains statistics for only the * one channel that has just been scanned. */#define STATISTICS_REPLY_FLG_BAND_24G_MSK         __constant_cpu_to_le32(0x2)#define STATISTICS_REPLY_FLG_FAT_MODE_MSK         __constant_cpu_to_le32(0x8)struct iwl_notif_statistics {	__le32 flag;	struct statistics_rx rx;	struct statistics_tx tx;	struct statistics_general general;} __attribute__ ((packed));/* * MISSED_BEACONS_NOTIFICATION = 0xa2 (notification only, not a command) *//* if ucode missed CONSECUTIVE_MISSED_BCONS_TH beacons in a row, * then this notification will be sent. */#define CONSECUTIVE_MISSED_BCONS_TH 20struct iwl_missed_beacon_notif {	__le32 consequtive_missed_beacons;	__le32 total_missed_becons;	__le32 num_expected_beacons;	__le32 num_recvd_beacons;} __attribute__ ((packed));/****************************************************************************** * (11) * Rx Calibration Commands: * *****************************************************************************/#define PHY_CALIBRATE_DIFF_GAIN_CMD (7)#define HD_TABLE_SIZE  (11)struct iwl_sensitivity_cmd {	__le16 control;	__le16 table[HD_TABLE_SIZE];} __attribute__ ((packed));struct iwl_calibration_cmd {	u8 opCode;	u8 flags;	__le16 reserved;	s8 diff_gain_a;	s8 diff_gain_b;	s8 diff_gain_c;	u8 reserved1;} __attribute__ ((packed));/****************************************************************************** * (12) * Miscellaneous Commands: * *****************************************************************************//* * LEDs Command & Response * REPLY_LEDS_CMD = 0x48 (command, has simple generic response) * * For each of 3 possible LEDs (Activity/Link/Tech, selected by "id" field), * this command turns it on or off, or sets up a periodic blinking cycle. */struct iwl_led_cmd {	__le32 interval;	/* "interval" in uSec */	u8 id;			/* 1: Activity, 2: Link, 3: Tech */	u8 off;			/* # intervals off while blinking;				 * "0", with >0 "on" value, turns LED on */	u8 on;			/* # intervals on while blinking;				 * "0", regardless of "off", turns LED off */	u8 reserved;} __attribute__ ((packed));/****************************************************************************** * (13) * Union of all expected notifications/responses: * *****************************************************************************/struct iwl_rx_packet {	__le32 len;	struct iwl_cmd_header hdr;	union {		struct iwl_alive_resp alive_frame;		struct iwl_rx_frame rx_frame;		struct iwl_tx_resp tx_resp;		struct iwl_spectrum_notification spectrum_notif;		struct iwl_csa_notification csa_notif;		struct iwl_error_resp err_resp;		struct iwl_card_state_notif card_state_notif;		struct iwl_beacon_notif beacon_status;		struct iwl_add_sta_resp add_sta;		struct iwl_sleep_notification sleep_notif;		struct iwl_spectrum_resp spectrum;		struct iwl_notif_statistics stats;#if IWL == 4965		struct iwl_compressed_ba_resp compressed_ba;		struct iwl_missed_beacon_notif missed_beacon;#endif		__le32 status;		u8 raw[0];	} u;} __attribute__ ((packed));#define IWL_RX_FRAME_SIZE        (4 + sizeof(struct iwl_rx_frame))#endif				/* __iwl_commands_h__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -