提交 bb8c093b 编写于 作者: C Christoph Hellwig 提交者: David S. Miller

iwlwifi: cleanup namespace

Prefix all symbols with iwl3945_ or iwl4965_ and thus allow building
the driver into the kernel. Also remove all the useless default
statements in Kconfig while we're at it.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NZhu Yi <yi.zhu@intel.com>
Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 403ab56b
config IWL4965
tristate "Intel Wireless WiFi 4965AGN"
depends on m && PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
select FW_LOADER
default m
---help---
Select to build the driver supporting the:
......@@ -30,7 +29,6 @@ config IWL4965
config IWL4965_QOS
bool "Enable Wireless QoS in iwl4965 driver"
depends on IWL4965
default y
---help---
This option will enable wireless quality of service (QoS) for the
iw4965 driver.
......@@ -38,14 +36,12 @@ config IWL4965_QOS
config IWL4965_SPECTRUM_MEASUREMENT
bool "Enable Spectrum Measurement in iw4965 driver"
depends on IWL4965
default y
---help---
This option will enable spectrum measurement for the iwl4965 driver.
config IWL4965_SENSITIVITY
bool "Enable Sensitivity Calibration in iwl4965 driver"
depends on IWL4965
default y
---help---
This option will enable sensitivity calibration for the iwl4965
driver.
......@@ -54,7 +50,6 @@ config IWL4965_HT
bool "Enable 802.11n HT features in iwl4965 driver"
depends on EXPERIMENTAL
depends on IWL4965 && MAC80211_HT
default n
---help---
This option enables IEEE 802.11n High Throughput features
for the iwl4965 driver.
......@@ -62,7 +57,6 @@ config IWL4965_HT
config IWL4965_DEBUG
bool "Enable full debugging output in iwl4965 driver"
depends on IWL4965
default y
---help---
This option will enable debug tracing output for the iwl4965
driver.
......@@ -88,9 +82,8 @@ config IWL4965_DEBUG
config IWL3945
tristate "Intel PRO/Wireless 3945ABG/BG Network Connection"
depends on m && PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
select FW_LOADER
default m
---help---
Select to build the driver supporting the:
......@@ -118,7 +111,6 @@ config IWL3945
config IWL3945_QOS
bool "Enable Wireless QoS in iwl3945 driver"
depends on IWL3945
default y
---help---
This option will enable wireless quality of service (QoS) for the
iwl3945 driver.
......@@ -126,14 +118,12 @@ config IWL3945_QOS
config IWL3945_SPECTRUM_MEASUREMENT
bool "Enable Spectrum Measurement in iwl3945 drivers"
depends on IWL3945
default y
---help---
This option will enable spectrum measurement for the iwl3945 driver.
config IWL3945_DEBUG
bool "Enable full debugging output in iwl3945 driver"
depends on IWL3945
default y
---help---
This option will enable debug tracing output for the iwl3945
driver.
......
......@@ -141,7 +141,7 @@ enum {
#define IWL_CMD_FAILED_MSK 0x40
struct iwl_cmd_header {
struct iwl3945_cmd_header {
u8 cmd;
u8 flags;
/* We have 15 LSB to use as we please (MSB indicates
......@@ -173,7 +173,7 @@ struct iwl_cmd_header {
/*
* REPLY_ALIVE = 0x1 (response only, not a command)
*/
struct iwl_alive_resp {
struct iwl3945_alive_resp {
u8 ucode_minor;
u8 ucode_major;
__le16 reserved1;
......@@ -187,7 +187,7 @@ struct iwl_alive_resp {
__le32 is_valid;
} __attribute__ ((packed));
struct iwl_init_alive_resp {
struct iwl3945_init_alive_resp {
u8 ucode_minor;
u8 ucode_major;
__le16 reserved1;
......@@ -210,7 +210,7 @@ union tsf {
/*
* REPLY_ERROR = 0x2 (response only, not a command)
*/
struct iwl_error_resp {
struct iwl3945_error_resp {
__le32 error_type;
u8 cmd_id;
u8 reserved1;
......@@ -279,7 +279,7 @@ enum {
/*
* REPLY_RXON = 0x10 (command, has simple generic response)
*/
struct iwl_rxon_cmd {
struct iwl3945_rxon_cmd {
u8 node_addr[6];
__le16 reserved1;
u8 bssid_addr[6];
......@@ -301,7 +301,7 @@ struct iwl_rxon_cmd {
/*
* REPLY_RXON_ASSOC = 0x11 (command, has simple generic response)
*/
struct iwl_rxon_assoc_cmd {
struct iwl3945_rxon_assoc_cmd {
__le32 flags;
__le32 filter_flags;
u8 ofdm_basic_rates;
......@@ -312,7 +312,7 @@ struct iwl_rxon_assoc_cmd {
/*
* REPLY_RXON_TIMING = 0x14 (command, has simple generic response)
*/
struct iwl_rxon_time_cmd {
struct iwl3945_rxon_time_cmd {
union tsf timestamp;
__le16 beacon_interval;
__le16 atim_window;
......@@ -321,34 +321,34 @@ struct iwl_rxon_time_cmd {
__le16 reserved;
} __attribute__ ((packed));
struct iwl_tx_power {
struct iwl3945_tx_power {
u8 tx_gain; /* gain for analog radio */
u8 dsp_atten; /* gain for DSP */
} __attribute__ ((packed));
struct iwl_power_per_rate {
struct iwl3945_power_per_rate {
u8 rate; /* plcp */
struct iwl_tx_power tpc;
struct iwl3945_tx_power tpc;
u8 reserved;
} __attribute__ ((packed));
/*
* REPLY_CHANNEL_SWITCH = 0x72 (command, has simple generic response)
*/
struct iwl_channel_switch_cmd {
struct iwl3945_channel_switch_cmd {
u8 band;
u8 expect_beacon;
__le16 channel;
__le32 rxon_flags;
__le32 rxon_filter_flags;
__le32 switch_time;
struct iwl_power_per_rate power[IWL_MAX_RATES];
struct iwl3945_power_per_rate power[IWL_MAX_RATES];
} __attribute__ ((packed));
/*
* CHANNEL_SWITCH_NOTIFICATION = 0x73 (notification only, not a command)
*/
struct iwl_csa_notification {
struct iwl3945_csa_notification {
__le16 band;
__le16 channel;
__le32 status; /* 0 - OK, 1 - fail */
......@@ -359,7 +359,7 @@ struct iwl_csa_notification {
* Quality-of-Service (QOS) Commands & Responses:
*
*****************************************************************************/
struct iwl_ac_qos {
struct iwl3945_ac_qos {
__le16 cw_min;
__le16 cw_max;
u8 aifsn;
......@@ -381,9 +381,9 @@ struct iwl_ac_qos {
/*
* REPLY_QOS_PARAM = 0x13 (command, has simple generic response)
*/
struct iwl_qosparam_cmd {
struct iwl3945_qosparam_cmd {
__le32 qos_flags;
struct iwl_ac_qos ac[AC_NUM];
struct iwl3945_ac_qos ac[AC_NUM];
} __attribute__ ((packed));
/******************************************************************************
......@@ -442,7 +442,7 @@ struct iwl_qosparam_cmd {
#define RATE_MCS_ANT_B_MSK 0x8000
#define RATE_MCS_ANT_AB_MSK 0xc000
struct iwl_keyinfo {
struct iwl3945_keyinfo {
__le16 key_flags;
u8 tkip_rx_tsc_byte2; /* TSC[2] for key mix ph1 detection */
u8 reserved1;
......@@ -462,11 +462,11 @@ struct sta_id_modify {
/*
* REPLY_ADD_STA = 0x18 (command)
*/
struct iwl_addsta_cmd {
struct iwl3945_addsta_cmd {
u8 mode;
u8 reserved[3];
struct sta_id_modify sta;
struct iwl_keyinfo key;
struct iwl3945_keyinfo key;
__le32 station_flags;
__le32 station_flags_msk;
__le16 tid_disable_tx;
......@@ -479,7 +479,7 @@ struct iwl_addsta_cmd {
/*
* REPLY_ADD_STA = 0x18 (response)
*/
struct iwl_add_sta_resp {
struct iwl3945_add_sta_resp {
u8 status;
} __attribute__ ((packed));
......@@ -491,7 +491,7 @@ struct iwl_add_sta_resp {
*
*****************************************************************************/
struct iwl_rx_frame_stats {
struct iwl3945_rx_frame_stats {
u8 phy_count;
u8 id;
u8 rssi;
......@@ -501,7 +501,7 @@ struct iwl_rx_frame_stats {
u8 payload[0];
} __attribute__ ((packed));
struct iwl_rx_frame_hdr {
struct iwl3945_rx_frame_hdr {
__le16 channel;
__le16 phy_flags;
u8 reserved1;
......@@ -531,7 +531,7 @@ struct iwl_rx_frame_hdr {
#define RX_RES_STATUS_BAD_ICV_MIC (0x1 << 11)
#define RX_RES_STATUS_BAD_KEY_TTAK (0x2 << 11)
struct iwl_rx_frame_end {
struct iwl3945_rx_frame_end {
__le32 status;
__le64 timestamp;
__le32 beacon_timestamp;
......@@ -545,10 +545,10 @@ struct iwl_rx_frame_end {
* The actual offsets of the hdr and end are dynamic based on
* stats.phy_count
*/
struct iwl_rx_frame {
struct iwl_rx_frame_stats stats;
struct iwl_rx_frame_hdr hdr;
struct iwl_rx_frame_end end;
struct iwl3945_rx_frame {
struct iwl3945_rx_frame_stats stats;
struct iwl3945_rx_frame_hdr hdr;
struct iwl3945_rx_frame_end end;
} __attribute__ ((packed));
/* Fixed (non-configurable) rx data from phy */
......@@ -643,7 +643,7 @@ struct iwl4965_rx_mpdu_res_start {
* TX command Frame life time
*/
struct iwl_dram_scratch {
struct iwl3945_dram_scratch {
u8 try_cnt;
u8 bt_kill_cnt;
__le16 reserved;
......@@ -652,7 +652,7 @@ struct iwl_dram_scratch {
/*
* REPLY_TX = 0x1c (command)
*/
struct iwl_tx_cmd {
struct iwl3945_tx_cmd {
__le16 len;
__le16 next_frame_len;
__le32 tx_flags;
......@@ -784,7 +784,7 @@ enum {
/*
* REPLY_TX = 0x1c (response)
*/
struct iwl_tx_resp {
struct iwl3945_tx_resp {
u8 failure_rts;
u8 failure_frame;
u8 bt_kill_count;
......@@ -796,7 +796,7 @@ struct iwl_tx_resp {
/*
* REPLY_COMPRESSED_BA = 0xc5 (response only, not a command)
*/
struct iwl_compressed_ba_resp {
struct iwl3945_compressed_ba_resp {
__le32 sta_addr_lo32;
__le16 sta_addr_hi16;
__le16 reserved;
......@@ -812,21 +812,21 @@ struct iwl_compressed_ba_resp {
/*
* REPLY_TX_PWR_TABLE_CMD = 0x97 (command, has simple generic response)
*/
struct iwl_txpowertable_cmd {
struct iwl3945_txpowertable_cmd {
u8 band; /* 0: 5 GHz, 1: 2.4 GHz */
u8 reserved;
__le16 channel;
struct iwl_power_per_rate power[IWL_MAX_RATES];
struct iwl3945_power_per_rate power[IWL_MAX_RATES];
} __attribute__ ((packed));
struct iwl_rate_scaling_info {
struct iwl3945_rate_scaling_info {
__le16 rate_n_flags;
u8 try_cnt;
u8 next_rate_index;
} __attribute__ ((packed));
/**
* struct iwl_rate_scaling_cmd - Rate Scaling Command & Response
* struct iwl3945_rate_scaling_cmd - Rate Scaling Command & Response
*
* REPLY_RATE_SCALE = 0x47 (command, has simple generic response)
*
......@@ -840,16 +840,16 @@ struct iwl_rate_scaling_info {
* when passed through ofdm_basic_rates on the REPLY_RXON
* command would be bit 0 (1<<0)
*/
struct iwl_rate_scaling_cmd {
struct iwl3945_rate_scaling_cmd {
u8 table_id;
u8 reserved[3];
struct iwl_rate_scaling_info table[IWL_MAX_RATES];
struct iwl3945_rate_scaling_info table[IWL_MAX_RATES];
} __attribute__ ((packed));
/*
* REPLY_BT_CONFIG = 0x9b (command, has simple generic response)
*/
struct iwl_bt_cmd {
struct iwl3945_bt_cmd {
u8 flags;
u8 lead_time;
u8 max_kill;
......@@ -875,18 +875,18 @@ struct iwl_bt_cmd {
RXON_FILTER_ASSOC_MSK | \
RXON_FILTER_BCON_AWARE_MSK)
struct iwl_measure_channel {
struct iwl3945_measure_channel {
__le32 duration; /* measurement duration in extended beacon
* format */
u8 channel; /* channel to measure */
u8 type; /* see enum iwl_measure_type */
u8 type; /* see enum iwl3945_measure_type */
__le16 reserved;
} __attribute__ ((packed));
/*
* REPLY_SPECTRUM_MEASUREMENT_CMD = 0x74 (command)
*/
struct iwl_spectrum_cmd {
struct iwl3945_spectrum_cmd {
__le16 len; /* number of bytes starting from token */
u8 token; /* token id */
u8 id; /* measurement id -- 0 or 1 */
......@@ -899,13 +899,13 @@ struct iwl_spectrum_cmd {
__le32 filter_flags; /* rxon filter flags */
__le16 channel_count; /* minimum 1, maximum 10 */
__le16 reserved3;
struct iwl_measure_channel channels[10];
struct iwl3945_measure_channel channels[10];
} __attribute__ ((packed));
/*
* REPLY_SPECTRUM_MEASUREMENT_CMD = 0x74 (response)
*/
struct iwl_spectrum_resp {
struct iwl3945_spectrum_resp {
u8 token;
u8 id; /* id of the prior command replaced, or 0xff */
__le16 status; /* 0 - command will be handled
......@@ -913,12 +913,12 @@ struct iwl_spectrum_resp {
* measurement) */
} __attribute__ ((packed));
enum iwl_measurement_state {
enum iwl3945_measurement_state {
IWL_MEASUREMENT_START = 0,
IWL_MEASUREMENT_STOP = 1,
};
enum iwl_measurement_status {
enum iwl3945_measurement_status {
IWL_MEASUREMENT_OK = 0,
IWL_MEASUREMENT_CONCURRENT = 1,
IWL_MEASUREMENT_CSA_CONFLICT = 2,
......@@ -931,18 +931,18 @@ enum iwl_measurement_status {
#define NUM_ELEMENTS_IN_HISTOGRAM 8
struct iwl_measurement_histogram {
struct iwl3945_measurement_histogram {
__le32 ofdm[NUM_ELEMENTS_IN_HISTOGRAM]; /* in 0.8usec counts */
__le32 cck[NUM_ELEMENTS_IN_HISTOGRAM]; /* in 1usec counts */
} __attribute__ ((packed));
/* clear channel availability counters */
struct iwl_measurement_cca_counters {
struct iwl3945_measurement_cca_counters {
__le32 ofdm;
__le32 cck;
} __attribute__ ((packed));
enum iwl_measure_type {
enum iwl3945_measure_type {
IWL_MEASURE_BASIC = (1 << 0),
IWL_MEASURE_CHANNEL_LOAD = (1 << 1),
IWL_MEASURE_HISTOGRAM_RPI = (1 << 2),
......@@ -955,7 +955,7 @@ enum iwl_measure_type {
/*
* SPECTRUM_MEASURE_NOTIFICATION = 0x75 (notification only, not a command)
*/
struct iwl_spectrum_notification {
struct iwl3945_spectrum_notification {
u8 id; /* measurement id -- 0 or 1 */
u8 token;
u8 channel_index; /* index in measurement channel list */
......@@ -963,7 +963,7 @@ struct iwl_spectrum_notification {
__le32 start_time; /* lower 32-bits of TSF */
u8 band; /* 0 - 5.2GHz, 1 - 2.4GHz */
u8 channel;
u8 type; /* see enum iwl_measurement_type */
u8 type; /* see enum iwl3945_measurement_type */
u8 reserved1;
/* NOTE: cca_ofdm, cca_cck, basic_type, and histogram are only only
* valid if applicable for measurement type requested. */
......@@ -973,9 +973,9 @@ struct iwl_spectrum_notification {
u8 basic_type; /* 0 - bss, 1 - ofdm preamble, 2 -
* unidentified */
u8 reserved2[3];
struct iwl_measurement_histogram histogram;
struct iwl3945_measurement_histogram histogram;
__le32 stop_time; /* lower 32-bits of TSF */
__le32 status; /* see iwl_measurement_status */
__le32 status; /* see iwl3945_measurement_status */
} __attribute__ ((packed));
/******************************************************************************
......@@ -985,7 +985,7 @@ struct iwl_spectrum_notification {
*****************************************************************************/
/**
* struct iwl_powertable_cmd - Power Table Command
* struct iwl3945_powertable_cmd - Power Table Command
* @flags: See below:
*
* POWER_TABLE_CMD = 0x77 (command, has simple generic response)
......@@ -1017,7 +1017,7 @@ struct iwl_spectrum_notification {
#define IWL_POWER_DRIVER_ALLOW_SLEEP_MSK __constant_cpu_to_le32(1<<0)
#define IWL_POWER_SLEEP_OVER_DTIM_MSK __constant_cpu_to_le32(1<<2)
#define IWL_POWER_PCI_PM_MSK __constant_cpu_to_le32(1<<3)
struct iwl_powertable_cmd {
struct iwl3945_powertable_cmd {
__le32 flags;
__le32 rx_data_timeout;
__le32 tx_data_timeout;
......@@ -1028,7 +1028,7 @@ struct iwl_powertable_cmd {
* PM_SLEEP_NOTIFICATION = 0x7A (notification only, not a command)
* 3945 and 4965 identical.
*/
struct iwl_sleep_notification {
struct iwl3945_sleep_notification {
u8 pm_sleep_mode;
u8 pm_wakeup_src;
__le16 reserved;
......@@ -1058,14 +1058,14 @@ enum {
#define CARD_STATE_CMD_DISABLE 0x00 /* Put card to sleep */
#define CARD_STATE_CMD_ENABLE 0x01 /* Wake up card */
#define CARD_STATE_CMD_HALT 0x02 /* Power down permanently */
struct iwl_card_state_cmd {
struct iwl3945_card_state_cmd {
__le32 status; /* CARD_STATE_CMD_* request new power state */
} __attribute__ ((packed));
/*
* CARD_STATE_NOTIFICATION = 0xa1 (notification only, not a command)
*/
struct iwl_card_state_notif {
struct iwl3945_card_state_notif {
__le32 flags;
} __attribute__ ((packed));
......@@ -1074,7 +1074,7 @@ struct iwl_card_state_notif {
#define RF_CARD_DISABLED 0x04
#define RXON_CARD_DISABLED 0x10
struct iwl_ct_kill_config {
struct iwl3945_ct_kill_config {
__le32 reserved;
__le32 critical_temperature_M;
__le32 critical_temperature_R;
......@@ -1086,7 +1086,7 @@ struct iwl_ct_kill_config {
*
*****************************************************************************/
struct iwl_scan_channel {
struct iwl3945_scan_channel {
/* type is defined as:
* 0:0 active (0 - passive)
* 1:4 SSID direct
......@@ -1095,12 +1095,12 @@ struct iwl_scan_channel {
*/
u8 type;
u8 channel;
struct iwl_tx_power tpc;
struct iwl3945_tx_power tpc;
__le16 active_dwell;
__le16 passive_dwell;
} __attribute__ ((packed));
struct iwl_ssid_ie {
struct iwl3945_ssid_ie {
u8 id;
u8 len;
u8 ssid[32];
......@@ -1114,7 +1114,7 @@ struct iwl_ssid_ie {
/*
* REPLY_SCAN_CMD = 0x80 (command)
*/
struct iwl_scan_cmd {
struct iwl3945_scan_cmd {
__le16 len;
u8 reserved0;
u8 channel_count;
......@@ -1133,14 +1133,14 @@ struct iwl_scan_cmd {
__le32 flags;
__le32 filter_flags;
struct iwl_tx_cmd tx_cmd;
struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX];
struct iwl3945_tx_cmd tx_cmd;
struct iwl3945_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];
* struct iwl3945_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
......@@ -1157,14 +1157,14 @@ struct iwl_scan_cmd {
/*
* REPLY_SCAN_CMD = 0x80 (response)
*/
struct iwl_scanreq_notification {
struct iwl3945_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 {
struct iwl3945_scanstart_notification {
__le32 tsf_low;
__le32 tsf_high;
__le32 beacon_timer;
......@@ -1181,7 +1181,7 @@ struct iwl_scanstart_notification {
/*
* SCAN_RESULTS_NOTIFICATION = 0x83 (notification only, not a command)
*/
struct iwl_scanresults_notification {
struct iwl3945_scanresults_notification {
u8 channel;
u8 band;
u8 reserved[2];
......@@ -1193,7 +1193,7 @@ struct iwl_scanresults_notification {
/*
* SCAN_COMPLETE_NOTIFICATION = 0x84 (notification only, not a command)
*/
struct iwl_scancomplete_notification {
struct iwl3945_scancomplete_notification {
u8 scanned_channels;
u8 status;
u8 reserved;
......@@ -1212,8 +1212,8 @@ struct iwl_scancomplete_notification {
/*
* BEACON_NOTIFICATION = 0x90 (notification only, not a command)
*/
struct iwl_beacon_notif {
struct iwl_tx_resp beacon_notify_hdr;
struct iwl3945_beacon_notif {
struct iwl3945_tx_resp beacon_notify_hdr;
__le32 low_tsf;
__le32 high_tsf;
__le32 ibss_mgr_status;
......@@ -1222,8 +1222,8 @@ struct iwl_beacon_notif {
/*
* REPLY_TX_BEACON = 0x91 (command, has simple generic response)
*/
struct iwl_tx_beacon_cmd {
struct iwl_tx_cmd tx;
struct iwl3945_tx_beacon_cmd {
struct iwl3945_tx_cmd tx;
__le16 tim_idx;
u8 tim_size;
u8 reserved1;
......@@ -1345,7 +1345,7 @@ struct statistics_general {
*/
#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 {
struct iwl3945_statistics_cmd {
__le32 configuration_flags; /* IWL_STATS_CONF_* */
} __attribute__ ((packed));
......@@ -1366,7 +1366,7 @@ struct iwl_statistics_cmd {
*/
#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 {
struct iwl3945_notif_statistics {
__le32 flag;
struct statistics_rx rx;
struct statistics_tx tx;
......@@ -1381,7 +1381,7 @@ struct iwl_notif_statistics {
* then this notification will be sent. */
#define CONSECUTIVE_MISSED_BCONS_TH 20
struct iwl_missed_beacon_notif {
struct iwl3945_missed_beacon_notif {
__le32 consequtive_missed_beacons;
__le32 total_missed_becons;
__le32 num_expected_beacons;
......@@ -1397,12 +1397,12 @@ struct iwl_missed_beacon_notif {
#define PHY_CALIBRATE_DIFF_GAIN_CMD (7)
#define HD_TABLE_SIZE (11)
struct iwl_sensitivity_cmd {
struct iwl3945_sensitivity_cmd {
__le16 control;
__le16 table[HD_TABLE_SIZE];
} __attribute__ ((packed));
struct iwl_calibration_cmd {
struct iwl3945_calibration_cmd {
u8 opCode;
u8 flags;
__le16 reserved;
......@@ -1425,7 +1425,7 @@ struct iwl_calibration_cmd {
* 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 {
struct iwl3945_led_cmd {
__le32 interval; /* "interval" in uSec */
u8 id; /* 1: Activity, 2: Link, 3: Tech */
u8 off; /* # intervals off while blinking;
......@@ -1441,27 +1441,27 @@ struct iwl_led_cmd {
*
*****************************************************************************/
struct iwl_rx_packet {
struct iwl3945_rx_packet {
__le32 len;
struct iwl_cmd_header hdr;
struct iwl3945_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;
struct iwl3945_alive_resp alive_frame;
struct iwl3945_rx_frame rx_frame;
struct iwl3945_tx_resp tx_resp;
struct iwl3945_spectrum_notification spectrum_notif;
struct iwl3945_csa_notification csa_notif;
struct iwl3945_error_resp err_resp;
struct iwl3945_card_state_notif card_state_notif;
struct iwl3945_beacon_notif beacon_status;
struct iwl3945_add_sta_resp add_sta;
struct iwl3945_sleep_notification sleep_notif;
struct iwl3945_spectrum_resp spectrum;
struct iwl3945_notif_statistics stats;
__le32 status;
u8 raw[0];
} u;
} __attribute__ ((packed));
#define IWL_RX_FRAME_SIZE (4 + sizeof(struct iwl_rx_frame))
#define IWL_RX_FRAME_SIZE (4 + sizeof(struct iwl3945_rx_frame))
#endif /* __iwl_3945_commands_h__ */
#endif /* __iwl3945_3945_commands_h__ */
......@@ -26,18 +26,18 @@
*
*****************************************************************************/
#ifndef __iwl_debug_h__
#define __iwl_debug_h__
#ifndef __iwl3945_debug_h__
#define __iwl3945_debug_h__
#ifdef CONFIG_IWL3945_DEBUG
extern u32 iwl_debug_level;
extern u32 iwl3945_debug_level;
#define IWL_DEBUG(level, fmt, args...) \
do { if (iwl_debug_level & (level)) \
do { if (iwl3945_debug_level & (level)) \
printk(KERN_ERR DRV_NAME": %c %s " fmt, \
in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
#define IWL_DEBUG_LIMIT(level, fmt, args...) \
do { if ((iwl_debug_level & (level)) && net_ratelimit()) \
do { if ((iwl3945_debug_level & (level)) && net_ratelimit()) \
printk(KERN_ERR DRV_NAME": %c %s " fmt, \
in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
#else
......@@ -68,7 +68,7 @@ static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...)
*
* % cat /proc/net/iwl/debug_level
*
* you simply need to add your entry to the iwl_debug_levels array.
* you simply need to add your entry to the iwl3945_debug_levels array.
*
* If you do not see debug_level in /proc/net/iwl then you do not have
* CONFIG_IWL3945_DEBUG defined in your kernel configuration
......
......@@ -133,7 +133,7 @@ enum {
#define EEPROM_SKU_CAP_OP_MODE_MRC (1 << 7)
/* *regulatory* channel data from eeprom, one for each channel */
struct iwl_eeprom_channel {
struct iwl3945_eeprom_channel {
u8 flags; /* flags copied from EEPROM */
s8 max_power_avg; /* max power (dBm) on this chnl, limit 31 */
} __attribute__ ((packed));
......@@ -148,7 +148,7 @@ struct iwl_eeprom_channel {
* level.
* Data copied from EEPROM.
*/
struct iwl_eeprom_txpower_sample {
struct iwl3945_eeprom_txpower_sample {
u8 gain_index; /* index into power (gain) setup table ... */
s8 power; /* ... for this pwr level for this chnl group */
u16 v_det; /* PA output voltage */
......@@ -162,8 +162,8 @@ struct iwl_eeprom_txpower_sample {
* Data copied from EEPROM.
* DO NOT ALTER THIS STRUCTURE!!!
*/
struct iwl_eeprom_txpower_group {
struct iwl_eeprom_txpower_sample samples[5]; /* 5 power levels */
struct iwl3945_eeprom_txpower_group {
struct iwl3945_eeprom_txpower_sample samples[5]; /* 5 power levels */
s32 a, b, c, d, e; /* coefficients for voltage->power
* formula (signed) */
s32 Fa, Fb, Fc, Fd, Fe; /* these modify coeffs based on
......@@ -181,7 +181,7 @@ struct iwl_eeprom_txpower_group {
* difference between current temperature and factory calib temperature.
* Data copied from EEPROM.
*/
struct iwl_eeprom_temperature_corr {
struct iwl3945_eeprom_temperature_corr {
u32 Ta;
u32 Tb;
u32 Tc;
......@@ -189,7 +189,7 @@ struct iwl_eeprom_temperature_corr {
u32 Te;
} __attribute__ ((packed));
struct iwl_eeprom {
struct iwl3945_eeprom {
u8 reserved0[16];
#define EEPROM_DEVICE_ID (2*0x08) /* 2 bytes */
u16 device_id; /* abs.ofs: 16 */
......@@ -232,23 +232,23 @@ struct iwl_eeprom {
#define EEPROM_REGULATORY_BAND_1 (2*0x62) /* 2 bytes */
u16 band_1_count; /* abs.ofs: 196 */
#define EEPROM_REGULATORY_BAND_1_CHANNELS (2*0x63) /* 28 bytes */
struct iwl_eeprom_channel band_1_channels[14]; /* abs.ofs: 196 */
struct iwl3945_eeprom_channel band_1_channels[14]; /* abs.ofs: 196 */
#define EEPROM_REGULATORY_BAND_2 (2*0x71) /* 2 bytes */
u16 band_2_count; /* abs.ofs: 226 */
#define EEPROM_REGULATORY_BAND_2_CHANNELS (2*0x72) /* 26 bytes */
struct iwl_eeprom_channel band_2_channels[13]; /* abs.ofs: 228 */
struct iwl3945_eeprom_channel band_2_channels[13]; /* abs.ofs: 228 */
#define EEPROM_REGULATORY_BAND_3 (2*0x7F) /* 2 bytes */
u16 band_3_count; /* abs.ofs: 254 */
#define EEPROM_REGULATORY_BAND_3_CHANNELS (2*0x80) /* 24 bytes */
struct iwl_eeprom_channel band_3_channels[12]; /* abs.ofs: 256 */
struct iwl3945_eeprom_channel band_3_channels[12]; /* abs.ofs: 256 */
#define EEPROM_REGULATORY_BAND_4 (2*0x8C) /* 2 bytes */
u16 band_4_count; /* abs.ofs: 280 */
#define EEPROM_REGULATORY_BAND_4_CHANNELS (2*0x8D) /* 22 bytes */
struct iwl_eeprom_channel band_4_channels[11]; /* abs.ofs: 282 */
struct iwl3945_eeprom_channel band_4_channels[11]; /* abs.ofs: 282 */
#define EEPROM_REGULATORY_BAND_5 (2*0x98) /* 2 bytes */
u16 band_5_count; /* abs.ofs: 304 */
#define EEPROM_REGULATORY_BAND_5_CHANNELS (2*0x99) /* 12 bytes */
struct iwl_eeprom_channel band_5_channels[6]; /* abs.ofs: 306 */
struct iwl3945_eeprom_channel band_5_channels[6]; /* abs.ofs: 306 */
u8 reserved9[194];
......@@ -258,10 +258,10 @@ struct iwl_eeprom {
#define EEPROM_TXPOWER_CALIB_GROUP3 0x2c0
#define EEPROM_TXPOWER_CALIB_GROUP4 0x300
#define IWL_NUM_TX_CALIB_GROUPS 5
struct iwl_eeprom_txpower_group groups[IWL_NUM_TX_CALIB_GROUPS];
struct iwl3945_eeprom_txpower_group groups[IWL_NUM_TX_CALIB_GROUPS];
/* abs.ofs: 512 */
#define EEPROM_CALIB_TEMPERATURE_CORRECT 0x340
struct iwl_eeprom_temperature_corr corrections; /* abs.ofs: 832 */
struct iwl3945_eeprom_temperature_corr corrections; /* abs.ofs: 832 */
u8 reserved16[172]; /* fill out to full 1024 byte block */
} __attribute__ ((packed));
......@@ -681,8 +681,8 @@ struct iwl_eeprom {
#define TFD_TX_CMD_SLOTS 256
#define TFD_CMD_SLOTS 32
#define TFD_MAX_PAYLOAD_SIZE (sizeof(struct iwl_cmd) - \
sizeof(struct iwl_cmd_meta))
#define TFD_MAX_PAYLOAD_SIZE (sizeof(struct iwl3945_cmd) - \
sizeof(struct iwl3945_cmd_meta))
/*
* RX related structures and functions
......@@ -704,41 +704,41 @@ struct iwl_eeprom {
#define IWL_MAX_DATA_SIZE ALM_RTC_DATA_SIZE
#define IWL_MAX_NUM_QUEUES 8
static inline int iwl_hw_valid_rtc_data_addr(u32 addr)
static inline int iwl3945_hw_valid_rtc_data_addr(u32 addr)
{
return (addr >= RTC_DATA_LOWER_BOUND) &&
(addr < ALM_RTC_DATA_UPPER_BOUND);
}
/* Base physical address of iwl_shared is provided to FH_TSSR_CBB_BASE
* and &iwl_shared.rx_read_ptr[0] is provided to FH_RCSR_RPTR_ADDR(0) */
struct iwl_shared {
/* Base physical address of iwl3945_shared is provided to FH_TSSR_CBB_BASE
* and &iwl3945_shared.rx_read_ptr[0] is provided to FH_RCSR_RPTR_ADDR(0) */
struct iwl3945_shared {
__le32 tx_base_ptr[8];
__le32 rx_read_ptr[3];
} __attribute__ ((packed));
struct iwl_tfd_frame_data {
struct iwl3945_tfd_frame_data {
__le32 addr;
__le32 len;
} __attribute__ ((packed));
struct iwl_tfd_frame {
struct iwl3945_tfd_frame {
__le32 control_flags;
struct iwl_tfd_frame_data pa[4];
struct iwl3945_tfd_frame_data pa[4];
u8 reserved[28];
} __attribute__ ((packed));
static inline u8 iwl_hw_get_rate(__le16 rate_n_flags)
static inline u8 iwl3945_hw_get_rate(__le16 rate_n_flags)
{
return le16_to_cpu(rate_n_flags) & 0xFF;
}
static inline u16 iwl_hw_get_rate_n_flags(__le16 rate_n_flags)
static inline u16 iwl3945_hw_get_rate_n_flags(__le16 rate_n_flags)
{
return le16_to_cpu(rate_n_flags);
}
static inline __le16 iwl_hw_set_rate_n_flags(u8 rate, u16 flags)
static inline __le16 iwl3945_hw_set_rate_n_flags(u8 rate, u16 flags)
{
return cpu_to_le16((u16)rate|flags);
}
......
......@@ -26,8 +26,8 @@
*
*****************************************************************************/
#ifndef __iwl_io_h__
#define __iwl_io_h__
#ifndef __iwl3945_io_h__
#define __iwl3945_io_h__
#include <linux/io.h>
......@@ -49,8 +49,8 @@
*
* If you wish to call the function without any debug or state checking,
* you should use the single _ prefix version (as is used by dependent IO
* routines, for example _iwl_read_direct32 calls the non-check version of
* _iwl_read32.)
* routines, for example _iwl3945_read_direct32 calls the non-check version of
* _iwl3945_read32.)
*
* These declarations are *extremely* useful in quickly isolating code deltas
* which result in misconfiguring of the hardware I/O. In combination with
......@@ -59,39 +59,39 @@
*
*/
#define _iwl_write32(iwl, ofs, val) writel((val), (iwl)->hw_base + (ofs))
#define _iwl3945_write32(iwl, ofs, val) writel((val), (iwl)->hw_base + (ofs))
#ifdef CONFIG_IWL3945_DEBUG
static inline void __iwl_write32(const char *f, u32 l, struct iwl_priv *iwl,
static inline void __iwl3945_write32(const char *f, u32 l, struct iwl3945_priv *iwl,
u32 ofs, u32 val)
{
IWL_DEBUG_IO("write32(0x%08X, 0x%08X) - %s %d\n", ofs, val, f, l);
_iwl_write32(iwl, ofs, val);
_iwl3945_write32(iwl, ofs, val);
}
#define iwl_write32(iwl, ofs, val) \
__iwl_write32(__FILE__, __LINE__, iwl, ofs, val)
#define iwl3945_write32(iwl, ofs, val) \
__iwl3945_write32(__FILE__, __LINE__, iwl, ofs, val)
#else
#define iwl_write32(iwl, ofs, val) _iwl_write32(iwl, ofs, val)
#define iwl3945_write32(iwl, ofs, val) _iwl3945_write32(iwl, ofs, val)
#endif
#define _iwl_read32(iwl, ofs) readl((iwl)->hw_base + (ofs))
#define _iwl3945_read32(iwl, ofs) readl((iwl)->hw_base + (ofs))
#ifdef CONFIG_IWL3945_DEBUG
static inline u32 __iwl_read32(char *f, u32 l, struct iwl_priv *iwl, u32 ofs)
static inline u32 __iwl3945_read32(char *f, u32 l, struct iwl3945_priv *iwl, u32 ofs)
{
IWL_DEBUG_IO("read_direct32(0x%08X) - %s %d\n", ofs, f, l);
return _iwl_read32(iwl, ofs);
return _iwl3945_read32(iwl, ofs);
}
#define iwl_read32(iwl, ofs) __iwl_read32(__FILE__, __LINE__, iwl, ofs)
#define iwl3945_read32(iwl, ofs) __iwl3945_read32(__FILE__, __LINE__, iwl, ofs)
#else
#define iwl_read32(p, o) _iwl_read32(p, o)
#define iwl3945_read32(p, o) _iwl3945_read32(p, o)
#endif
static inline int _iwl_poll_bit(struct iwl_priv *priv, u32 addr,
static inline int _iwl3945_poll_bit(struct iwl3945_priv *priv, u32 addr,
u32 bits, u32 mask, int timeout)
{
int i = 0;
do {
if ((_iwl_read32(priv, addr) & mask) == (bits & mask))
if ((_iwl3945_read32(priv, addr) & mask) == (bits & mask))
return i;
mdelay(10);
i += 10;
......@@ -100,11 +100,11 @@ static inline int _iwl_poll_bit(struct iwl_priv *priv, u32 addr,
return -ETIMEDOUT;
}
#ifdef CONFIG_IWL3945_DEBUG
static inline int __iwl_poll_bit(const char *f, u32 l,
struct iwl_priv *priv, u32 addr,
static inline int __iwl3945_poll_bit(const char *f, u32 l,
struct iwl3945_priv *priv, u32 addr,
u32 bits, u32 mask, int timeout)
{
int ret = _iwl_poll_bit(priv, addr, bits, mask, timeout);
int ret = _iwl3945_poll_bit(priv, addr, bits, mask, timeout);
if (unlikely(ret == -ETIMEDOUT))
IWL_DEBUG_IO
("poll_bit(0x%08X, 0x%08X, 0x%08X) - timedout - %s %d\n",
......@@ -115,47 +115,47 @@ static inline int __iwl_poll_bit(const char *f, u32 l,
addr, bits, mask, ret, f, l);
return ret;
}
#define iwl_poll_bit(iwl, addr, bits, mask, timeout) \
__iwl_poll_bit(__FILE__, __LINE__, iwl, addr, bits, mask, timeout)
#define iwl3945_poll_bit(iwl, addr, bits, mask, timeout) \
__iwl3945_poll_bit(__FILE__, __LINE__, iwl, addr, bits, mask, timeout)
#else
#define iwl_poll_bit(p, a, b, m, t) _iwl_poll_bit(p, a, b, m, t)
#define iwl3945_poll_bit(p, a, b, m, t) _iwl3945_poll_bit(p, a, b, m, t)
#endif
static inline void _iwl_set_bit(struct iwl_priv *priv, u32 reg, u32 mask)
static inline void _iwl3945_set_bit(struct iwl3945_priv *priv, u32 reg, u32 mask)
{
_iwl_write32(priv, reg, _iwl_read32(priv, reg) | mask);
_iwl3945_write32(priv, reg, _iwl3945_read32(priv, reg) | mask);
}
#ifdef CONFIG_IWL3945_DEBUG
static inline void __iwl_set_bit(const char *f, u32 l,
struct iwl_priv *priv, u32 reg, u32 mask)
static inline void __iwl3945_set_bit(const char *f, u32 l,
struct iwl3945_priv *priv, u32 reg, u32 mask)
{
u32 val = _iwl_read32(priv, reg) | mask;
u32 val = _iwl3945_read32(priv, reg) | mask;
IWL_DEBUG_IO("set_bit(0x%08X, 0x%08X) = 0x%08X\n", reg, mask, val);
_iwl_write32(priv, reg, val);
_iwl3945_write32(priv, reg, val);
}
#define iwl_set_bit(p, r, m) __iwl_set_bit(__FILE__, __LINE__, p, r, m)
#define iwl3945_set_bit(p, r, m) __iwl3945_set_bit(__FILE__, __LINE__, p, r, m)
#else
#define iwl_set_bit(p, r, m) _iwl_set_bit(p, r, m)
#define iwl3945_set_bit(p, r, m) _iwl3945_set_bit(p, r, m)
#endif
static inline void _iwl_clear_bit(struct iwl_priv *priv, u32 reg, u32 mask)
static inline void _iwl3945_clear_bit(struct iwl3945_priv *priv, u32 reg, u32 mask)
{
_iwl_write32(priv, reg, _iwl_read32(priv, reg) & ~mask);
_iwl3945_write32(priv, reg, _iwl3945_read32(priv, reg) & ~mask);
}
#ifdef CONFIG_IWL3945_DEBUG
static inline void __iwl_clear_bit(const char *f, u32 l,
struct iwl_priv *priv, u32 reg, u32 mask)
static inline void __iwl3945_clear_bit(const char *f, u32 l,
struct iwl3945_priv *priv, u32 reg, u32 mask)
{
u32 val = _iwl_read32(priv, reg) & ~mask;
u32 val = _iwl3945_read32(priv, reg) & ~mask;
IWL_DEBUG_IO("clear_bit(0x%08X, 0x%08X) = 0x%08X\n", reg, mask, val);
_iwl_write32(priv, reg, val);
_iwl3945_write32(priv, reg, val);
}
#define iwl_clear_bit(p, r, m) __iwl_clear_bit(__FILE__, __LINE__, p, r, m)
#define iwl3945_clear_bit(p, r, m) __iwl3945_clear_bit(__FILE__, __LINE__, p, r, m)
#else
#define iwl_clear_bit(p, r, m) _iwl_clear_bit(p, r, m)
#define iwl3945_clear_bit(p, r, m) _iwl3945_clear_bit(p, r, m)
#endif
static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
static inline int _iwl3945_grab_nic_access(struct iwl3945_priv *priv)
{
int ret;
u32 gp_ctl;
......@@ -170,7 +170,7 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
"wakes up NIC\n");
/* 10 msec allows time for NIC to complete its data save */
gp_ctl = _iwl_read32(priv, CSR_GP_CNTRL);
gp_ctl = _iwl3945_read32(priv, CSR_GP_CNTRL);
if (gp_ctl & CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY) {
IWL_DEBUG_RF_KILL("Wait for complete power-down, "
"gpctl = 0x%08x\n", gp_ctl);
......@@ -181,8 +181,8 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
}
/* this bit wakes up the NIC */
_iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
ret = _iwl_poll_bit(priv, CSR_GP_CNTRL,
_iwl3945_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
ret = _iwl3945_poll_bit(priv, CSR_GP_CNTRL,
CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN,
(CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY |
CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 50);
......@@ -198,106 +198,106 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
}
#ifdef CONFIG_IWL3945_DEBUG
static inline int __iwl_grab_nic_access(const char *f, u32 l,
struct iwl_priv *priv)
static inline int __iwl3945_grab_nic_access(const char *f, u32 l,
struct iwl3945_priv *priv)
{
if (atomic_read(&priv->restrict_refcnt))
IWL_DEBUG_INFO("Grabbing access while already held at "
"line %d.\n", l);
IWL_DEBUG_IO("grabbing nic access - %s %d\n", f, l);
return _iwl_grab_nic_access(priv);
return _iwl3945_grab_nic_access(priv);
}
#define iwl_grab_nic_access(priv) \
__iwl_grab_nic_access(__FILE__, __LINE__, priv)
#define iwl3945_grab_nic_access(priv) \
__iwl3945_grab_nic_access(__FILE__, __LINE__, priv)
#else
#define iwl_grab_nic_access(priv) \
_iwl_grab_nic_access(priv)
#define iwl3945_grab_nic_access(priv) \
_iwl3945_grab_nic_access(priv)
#endif
static inline void _iwl_release_nic_access(struct iwl_priv *priv)
static inline void _iwl3945_release_nic_access(struct iwl3945_priv *priv)
{
#ifdef CONFIG_IWL3945_DEBUG
if (atomic_dec_and_test(&priv->restrict_refcnt))
#endif
_iwl_clear_bit(priv, CSR_GP_CNTRL,
_iwl3945_clear_bit(priv, CSR_GP_CNTRL,
CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
}
#ifdef CONFIG_IWL3945_DEBUG
static inline void __iwl_release_nic_access(const char *f, u32 l,
struct iwl_priv *priv)
static inline void __iwl3945_release_nic_access(const char *f, u32 l,
struct iwl3945_priv *priv)
{
if (atomic_read(&priv->restrict_refcnt) <= 0)
IWL_ERROR("Release unheld nic access at line %d.\n", l);
IWL_DEBUG_IO("releasing nic access - %s %d\n", f, l);
_iwl_release_nic_access(priv);
_iwl3945_release_nic_access(priv);
}
#define iwl_release_nic_access(priv) \
__iwl_release_nic_access(__FILE__, __LINE__, priv)
#define iwl3945_release_nic_access(priv) \
__iwl3945_release_nic_access(__FILE__, __LINE__, priv)
#else
#define iwl_release_nic_access(priv) \
_iwl_release_nic_access(priv)
#define iwl3945_release_nic_access(priv) \
_iwl3945_release_nic_access(priv)
#endif
static inline u32 _iwl_read_direct32(struct iwl_priv *priv, u32 reg)
static inline u32 _iwl3945_read_direct32(struct iwl3945_priv *priv, u32 reg)
{
return _iwl_read32(priv, reg);
return _iwl3945_read32(priv, reg);
}
#ifdef CONFIG_IWL3945_DEBUG
static inline u32 __iwl_read_direct32(const char *f, u32 l,
struct iwl_priv *priv, u32 reg)
static inline u32 __iwl3945_read_direct32(const char *f, u32 l,
struct iwl3945_priv *priv, u32 reg)
{
u32 value = _iwl_read_direct32(priv, reg);
u32 value = _iwl3945_read_direct32(priv, reg);
if (!atomic_read(&priv->restrict_refcnt))
IWL_ERROR("Nic access not held from %s %d\n", f, l);
IWL_DEBUG_IO("read_direct32(0x%4X) = 0x%08x - %s %d \n", reg, value,
f, l);
return value;
}
#define iwl_read_direct32(priv, reg) \
__iwl_read_direct32(__FILE__, __LINE__, priv, reg)
#define iwl3945_read_direct32(priv, reg) \
__iwl3945_read_direct32(__FILE__, __LINE__, priv, reg)
#else
#define iwl_read_direct32 _iwl_read_direct32
#define iwl3945_read_direct32 _iwl3945_read_direct32
#endif
static inline void _iwl_write_direct32(struct iwl_priv *priv,
static inline void _iwl3945_write_direct32(struct iwl3945_priv *priv,
u32 reg, u32 value)
{
_iwl_write32(priv, reg, value);
_iwl3945_write32(priv, reg, value);
}
#ifdef CONFIG_IWL3945_DEBUG
static void __iwl_write_direct32(u32 line,
struct iwl_priv *priv, u32 reg, u32 value)
static void __iwl3945_write_direct32(u32 line,
struct iwl3945_priv *priv, u32 reg, u32 value)
{
if (!atomic_read(&priv->restrict_refcnt))
IWL_ERROR("Nic access not held from line %d\n", line);
_iwl_write_direct32(priv, reg, value);
_iwl3945_write_direct32(priv, reg, value);
}
#define iwl_write_direct32(priv, reg, value) \
__iwl_write_direct32(__LINE__, priv, reg, value)
#define iwl3945_write_direct32(priv, reg, value) \
__iwl3945_write_direct32(__LINE__, priv, reg, value)
#else
#define iwl_write_direct32 _iwl_write_direct32
#define iwl3945_write_direct32 _iwl3945_write_direct32
#endif
static inline void iwl_write_reg_buf(struct iwl_priv *priv,
static inline void iwl3945_write_reg_buf(struct iwl3945_priv *priv,
u32 reg, u32 len, u32 *values)
{
u32 count = sizeof(u32);
if ((priv != NULL) && (values != NULL)) {
for (; 0 < len; len -= count, reg += count, values++)
_iwl_write_direct32(priv, reg, *values);
_iwl3945_write_direct32(priv, reg, *values);
}
}
static inline int _iwl_poll_direct_bit(struct iwl_priv *priv,
static inline int _iwl3945_poll_direct_bit(struct iwl3945_priv *priv,
u32 addr, u32 mask, int timeout)
{
int i = 0;
do {
if ((_iwl_read_direct32(priv, addr) & mask) == mask)
if ((_iwl3945_read_direct32(priv, addr) & mask) == mask)
return i;
mdelay(10);
i += 10;
......@@ -307,11 +307,11 @@ static inline int _iwl_poll_direct_bit(struct iwl_priv *priv,
}
#ifdef CONFIG_IWL3945_DEBUG
static inline int __iwl_poll_direct_bit(const char *f, u32 l,
struct iwl_priv *priv,
static inline int __iwl3945_poll_direct_bit(const char *f, u32 l,
struct iwl3945_priv *priv,
u32 addr, u32 mask, int timeout)
{
int ret = _iwl_poll_direct_bit(priv, addr, mask, timeout);
int ret = _iwl3945_poll_direct_bit(priv, addr, mask, timeout);
if (unlikely(ret == -ETIMEDOUT))
IWL_DEBUG_IO("poll_direct_bit(0x%08X, 0x%08X) - "
......@@ -321,111 +321,111 @@ static inline int __iwl_poll_direct_bit(const char *f, u32 l,
"- %s %d\n", addr, mask, ret, f, l);
return ret;
}
#define iwl_poll_direct_bit(iwl, addr, mask, timeout) \
__iwl_poll_direct_bit(__FILE__, __LINE__, iwl, addr, mask, timeout)
#define iwl3945_poll_direct_bit(iwl, addr, mask, timeout) \
__iwl3945_poll_direct_bit(__FILE__, __LINE__, iwl, addr, mask, timeout)
#else
#define iwl_poll_direct_bit _iwl_poll_direct_bit
#define iwl3945_poll_direct_bit _iwl3945_poll_direct_bit
#endif
static inline u32 _iwl_read_prph(struct iwl_priv *priv, u32 reg)
static inline u32 _iwl3945_read_prph(struct iwl3945_priv *priv, u32 reg)
{
_iwl_write_direct32(priv, HBUS_TARG_PRPH_RADDR, reg | (3 << 24));
return _iwl_read_direct32(priv, HBUS_TARG_PRPH_RDAT);
_iwl3945_write_direct32(priv, HBUS_TARG_PRPH_RADDR, reg | (3 << 24));
return _iwl3945_read_direct32(priv, HBUS_TARG_PRPH_RDAT);
}
#ifdef CONFIG_IWL3945_DEBUG
static inline u32 __iwl_read_prph(u32 line, struct iwl_priv *priv, u32 reg)
static inline u32 __iwl3945_read_prph(u32 line, struct iwl3945_priv *priv, u32 reg)
{
if (!atomic_read(&priv->restrict_refcnt))
IWL_ERROR("Nic access not held from line %d\n", line);
return _iwl_read_prph(priv, reg);
return _iwl3945_read_prph(priv, reg);
}
#define iwl_read_prph(priv, reg) \
__iwl_read_prph(__LINE__, priv, reg)
#define iwl3945_read_prph(priv, reg) \
__iwl3945_read_prph(__LINE__, priv, reg)
#else
#define iwl_read_prph _iwl_read_prph
#define iwl3945_read_prph _iwl3945_read_prph
#endif
static inline void _iwl_write_prph(struct iwl_priv *priv,
static inline void _iwl3945_write_prph(struct iwl3945_priv *priv,
u32 addr, u32 val)
{
_iwl_write_direct32(priv, HBUS_TARG_PRPH_WADDR,
_iwl3945_write_direct32(priv, HBUS_TARG_PRPH_WADDR,
((addr & 0x0000FFFF) | (3 << 24)));
_iwl_write_direct32(priv, HBUS_TARG_PRPH_WDAT, val);
_iwl3945_write_direct32(priv, HBUS_TARG_PRPH_WDAT, val);
}
#ifdef CONFIG_IWL3945_DEBUG
static inline void __iwl_write_prph(u32 line, struct iwl_priv *priv,
static inline void __iwl3945_write_prph(u32 line, struct iwl3945_priv *priv,
u32 addr, u32 val)
{
if (!atomic_read(&priv->restrict_refcnt))
IWL_ERROR("Nic access from line %d\n", line);
_iwl_write_prph(priv, addr, val);
_iwl3945_write_prph(priv, addr, val);
}
#define iwl_write_prph(priv, addr, val) \
__iwl_write_prph(__LINE__, priv, addr, val);
#define iwl3945_write_prph(priv, addr, val) \
__iwl3945_write_prph(__LINE__, priv, addr, val);
#else
#define iwl_write_prph _iwl_write_prph
#define iwl3945_write_prph _iwl3945_write_prph
#endif
#define _iwl_set_bits_prph(priv, reg, mask) \
_iwl_write_prph(priv, reg, (_iwl_read_prph(priv, reg) | mask))
#define _iwl3945_set_bits_prph(priv, reg, mask) \
_iwl3945_write_prph(priv, reg, (_iwl3945_read_prph(priv, reg) | mask))
#ifdef CONFIG_IWL3945_DEBUG
static inline void __iwl_set_bits_prph(u32 line, struct iwl_priv *priv,
static inline void __iwl3945_set_bits_prph(u32 line, struct iwl3945_priv *priv,
u32 reg, u32 mask)
{
if (!atomic_read(&priv->restrict_refcnt))
IWL_ERROR("Nic access not held from line %d\n", line);
_iwl_set_bits_prph(priv, reg, mask);
_iwl3945_set_bits_prph(priv, reg, mask);
}
#define iwl_set_bits_prph(priv, reg, mask) \
__iwl_set_bits_prph(__LINE__, priv, reg, mask)
#define iwl3945_set_bits_prph(priv, reg, mask) \
__iwl3945_set_bits_prph(__LINE__, priv, reg, mask)
#else
#define iwl_set_bits_prph _iwl_set_bits_prph
#define iwl3945_set_bits_prph _iwl3945_set_bits_prph
#endif
#define _iwl_set_bits_mask_prph(priv, reg, bits, mask) \
_iwl_write_prph(priv, reg, ((_iwl_read_prph(priv, reg) & mask) | bits))
#define _iwl3945_set_bits_mask_prph(priv, reg, bits, mask) \
_iwl3945_write_prph(priv, reg, ((_iwl3945_read_prph(priv, reg) & mask) | bits))
#ifdef CONFIG_IWL3945_DEBUG
static inline void __iwl_set_bits_mask_prph(u32 line,
struct iwl_priv *priv, u32 reg, u32 bits, u32 mask)
static inline void __iwl3945_set_bits_mask_prph(u32 line,
struct iwl3945_priv *priv, u32 reg, u32 bits, u32 mask)
{
if (!atomic_read(&priv->restrict_refcnt))
IWL_ERROR("Nic access not held from line %d\n", line);
_iwl_set_bits_mask_prph(priv, reg, bits, mask);
_iwl3945_set_bits_mask_prph(priv, reg, bits, mask);
}
#define iwl_set_bits_mask_prph(priv, reg, bits, mask) \
__iwl_set_bits_mask_prph(__LINE__, priv, reg, bits, mask)
#define iwl3945_set_bits_mask_prph(priv, reg, bits, mask) \
__iwl3945_set_bits_mask_prph(__LINE__, priv, reg, bits, mask)
#else
#define iwl_set_bits_mask_prph _iwl_set_bits_mask_prph
#define iwl3945_set_bits_mask_prph _iwl3945_set_bits_mask_prph
#endif
static inline void iwl_clear_bits_prph(struct iwl_priv
static inline void iwl3945_clear_bits_prph(struct iwl3945_priv
*priv, u32 reg, u32 mask)
{
u32 val = _iwl_read_prph(priv, reg);
_iwl_write_prph(priv, reg, (val & ~mask));
u32 val = _iwl3945_read_prph(priv, reg);
_iwl3945_write_prph(priv, reg, (val & ~mask));
}
static inline u32 iwl_read_targ_mem(struct iwl_priv *priv, u32 addr)
static inline u32 iwl3945_read_targ_mem(struct iwl3945_priv *priv, u32 addr)
{
iwl_write_direct32(priv, HBUS_TARG_MEM_RADDR, addr);
return iwl_read_direct32(priv, HBUS_TARG_MEM_RDAT);
iwl3945_write_direct32(priv, HBUS_TARG_MEM_RADDR, addr);
return iwl3945_read_direct32(priv, HBUS_TARG_MEM_RDAT);
}
static inline void iwl_write_targ_mem(struct iwl_priv *priv, u32 addr, u32 val)
static inline void iwl3945_write_targ_mem(struct iwl3945_priv *priv, u32 addr, u32 val)
{
iwl_write_direct32(priv, HBUS_TARG_MEM_WADDR, addr);
iwl_write_direct32(priv, HBUS_TARG_MEM_WDAT, val);
iwl3945_write_direct32(priv, HBUS_TARG_MEM_WADDR, addr);
iwl3945_write_direct32(priv, HBUS_TARG_MEM_WDAT, val);
}
static inline void iwl_write_targ_mem_buf(struct iwl_priv *priv, u32 addr,
static inline void iwl3945_write_targ_mem_buf(struct iwl3945_priv *priv, u32 addr,
u32 len, u32 *values)
{
iwl_write_direct32(priv, HBUS_TARG_MEM_WADDR, addr);
iwl3945_write_direct32(priv, HBUS_TARG_MEM_WADDR, addr);
for (; 0 < len; len -= sizeof(u32), values++)
iwl_write_direct32(priv, HBUS_TARG_MEM_WDAT, *values);
iwl3945_write_direct32(priv, HBUS_TARG_MEM_WDAT, *values);
}
#endif
......@@ -43,7 +43,7 @@
#define RS_NAME "iwl-3945-rs"
struct iwl_rate_scale_data {
struct iwl3945_rate_scale_data {
u64 data;
s32 success_counter;
s32 success_ratio;
......@@ -52,7 +52,7 @@ struct iwl_rate_scale_data {
unsigned long stamp;
};
struct iwl_rate_scale_priv {
struct iwl3945_rate_scale_priv {
spinlock_t lock;
s32 *expected_tpt;
unsigned long last_partial_flush;
......@@ -65,31 +65,31 @@ struct iwl_rate_scale_priv {
u8 start_rate;
u8 ibss_sta_added;
struct timer_list rate_scale_flush;
struct iwl_rate_scale_data win[IWL_RATE_COUNT];
struct iwl3945_rate_scale_data win[IWL_RATE_COUNT];
};
static s32 iwl_expected_tpt_g[IWL_RATE_COUNT] = {
static s32 iwl3945_expected_tpt_g[IWL_RATE_COUNT] = {
7, 13, 35, 58, 0, 0, 76, 104, 130, 168, 191, 202
};
static s32 iwl_expected_tpt_g_prot[IWL_RATE_COUNT] = {
static s32 iwl3945_expected_tpt_g_prot[IWL_RATE_COUNT] = {
7, 13, 35, 58, 0, 0, 0, 80, 93, 113, 123, 125
};
static s32 iwl_expected_tpt_a[IWL_RATE_COUNT] = {
static s32 iwl3945_expected_tpt_a[IWL_RATE_COUNT] = {
0, 0, 0, 0, 40, 57, 72, 98, 121, 154, 177, 186
};
static s32 iwl_expected_tpt_b[IWL_RATE_COUNT] = {
static s32 iwl3945_expected_tpt_b[IWL_RATE_COUNT] = {
7, 13, 35, 58, 0, 0, 0, 0, 0, 0, 0, 0
};
struct iwl_tpt_entry {
struct iwl3945_tpt_entry {
s8 min_rssi;
u8 index;
};
static struct iwl_tpt_entry iwl_tpt_table_a[] = {
static struct iwl3945_tpt_entry iwl3945_tpt_table_a[] = {
{-60, IWL_RATE_54M_INDEX},
{-64, IWL_RATE_48M_INDEX},
{-72, IWL_RATE_36M_INDEX},
......@@ -100,7 +100,7 @@ static struct iwl_tpt_entry iwl_tpt_table_a[] = {
{-89, IWL_RATE_6M_INDEX}
};
static struct iwl_tpt_entry iwl_tpt_table_b[] = {
static struct iwl3945_tpt_entry iwl3945_tpt_table_b[] = {
{-86, IWL_RATE_11M_INDEX},
{-88, IWL_RATE_5M_INDEX},
{-90, IWL_RATE_2M_INDEX},
......@@ -108,7 +108,7 @@ static struct iwl_tpt_entry iwl_tpt_table_b[] = {
};
static struct iwl_tpt_entry iwl_tpt_table_g[] = {
static struct iwl3945_tpt_entry iwl3945_tpt_table_g[] = {
{-60, IWL_RATE_54M_INDEX},
{-64, IWL_RATE_48M_INDEX},
{-68, IWL_RATE_36M_INDEX},
......@@ -129,30 +129,30 @@ static struct iwl_tpt_entry iwl_tpt_table_g[] = {
#define IWL_RATE_MIN_SUCCESS_TH 8
#define IWL_RATE_DECREASE_TH 1920
static u8 iwl_get_rate_index_by_rssi(s32 rssi, u8 mode)
static u8 iwl3945_get_rate_index_by_rssi(s32 rssi, u8 mode)
{
u32 index = 0;
u32 table_size = 0;
struct iwl_tpt_entry *tpt_table = NULL;
struct iwl3945_tpt_entry *tpt_table = NULL;
if ((rssi < IWL_MIN_RSSI_VAL) || (rssi > IWL_MAX_RSSI_VAL))
rssi = IWL_MIN_RSSI_VAL;
switch (mode) {
case MODE_IEEE80211G:
tpt_table = iwl_tpt_table_g;
table_size = ARRAY_SIZE(iwl_tpt_table_g);
tpt_table = iwl3945_tpt_table_g;
table_size = ARRAY_SIZE(iwl3945_tpt_table_g);
break;
case MODE_IEEE80211A:
tpt_table = iwl_tpt_table_a;
table_size = ARRAY_SIZE(iwl_tpt_table_a);
tpt_table = iwl3945_tpt_table_a;
table_size = ARRAY_SIZE(iwl3945_tpt_table_a);
break;
default:
case MODE_IEEE80211B:
tpt_table = iwl_tpt_table_b;
table_size = ARRAY_SIZE(iwl_tpt_table_b);
tpt_table = iwl3945_tpt_table_b;
table_size = ARRAY_SIZE(iwl3945_tpt_table_b);
break;
}
......@@ -164,7 +164,7 @@ static u8 iwl_get_rate_index_by_rssi(s32 rssi, u8 mode)
return tpt_table[index].index;
}
static void iwl_clear_window(struct iwl_rate_scale_data *window)
static void iwl3945_clear_window(struct iwl3945_rate_scale_data *window)
{
window->data = 0;
window->success_counter = 0;
......@@ -175,13 +175,13 @@ static void iwl_clear_window(struct iwl_rate_scale_data *window)
}
/**
* iwl_rate_scale_flush_windows - flush out the rate scale windows
* iwl3945_rate_scale_flush_windows - flush out the rate scale windows
*
* Returns the number of windows that have gathered data but were
* not flushed. If there were any that were not flushed, then
* reschedule the rate flushing routine.
*/
static int iwl_rate_scale_flush_windows(struct iwl_rate_scale_priv *rs_priv)
static int iwl3945_rate_scale_flush_windows(struct iwl3945_rate_scale_priv *rs_priv)
{
int unflushed = 0;
int i;
......@@ -202,7 +202,7 @@ static int iwl_rate_scale_flush_windows(struct iwl_rate_scale_priv *rs_priv)
IWL_DEBUG_RATE("flushing %d samples of rate "
"index %d\n",
rs_priv->win[i].counter, i);
iwl_clear_window(&rs_priv->win[i]);
iwl3945_clear_window(&rs_priv->win[i]);
} else
unflushed++;
spin_unlock_irqrestore(&rs_priv->lock, flags);
......@@ -214,16 +214,16 @@ static int iwl_rate_scale_flush_windows(struct iwl_rate_scale_priv *rs_priv)
#define IWL_RATE_FLUSH_MAX 5000 /* msec */
#define IWL_RATE_FLUSH_MIN 50 /* msec */
static void iwl_bg_rate_scale_flush(unsigned long data)
static void iwl3945_bg_rate_scale_flush(unsigned long data)
{
struct iwl_rate_scale_priv *rs_priv = (void *)data;
struct iwl3945_rate_scale_priv *rs_priv = (void *)data;
int unflushed = 0;
unsigned long flags;
u32 packet_count, duration, pps;
IWL_DEBUG_RATE("enter\n");
unflushed = iwl_rate_scale_flush_windows(rs_priv);
unflushed = iwl3945_rate_scale_flush_windows(rs_priv);
spin_lock_irqsave(&rs_priv->lock, flags);
......@@ -277,14 +277,14 @@ static void iwl_bg_rate_scale_flush(unsigned long data)
}
/**
* iwl_collect_tx_data - Update the success/failure sliding window
* iwl3945_collect_tx_data - Update the success/failure sliding window
*
* We keep a sliding window of the last 64 packets transmitted
* at this rate. window->data contains the bitmask of successful
* packets.
*/
static void iwl_collect_tx_data(struct iwl_rate_scale_priv *rs_priv,
struct iwl_rate_scale_data *window,
static void iwl3945_collect_tx_data(struct iwl3945_rate_scale_priv *rs_priv,
struct iwl3945_rate_scale_data *window,
int success, int retries)
{
unsigned long flags;
......@@ -373,12 +373,12 @@ static void rs_clear(void *priv)
static void *rs_alloc_sta(void *priv, gfp_t gfp)
{
struct iwl_rate_scale_priv *rs_priv;
struct iwl3945_rate_scale_priv *rs_priv;
int i;
IWL_DEBUG_RATE("enter\n");
rs_priv = kzalloc(sizeof(struct iwl_rate_scale_priv), gfp);
rs_priv = kzalloc(sizeof(struct iwl3945_rate_scale_priv), gfp);
if (!rs_priv) {
IWL_DEBUG_RATE("leave: ENOMEM\n");
return NULL;
......@@ -389,7 +389,7 @@ static void *rs_alloc_sta(void *priv, gfp_t gfp)
rs_priv->start_rate = IWL_RATE_INVALID;
/* default to just 802.11b */
rs_priv->expected_tpt = iwl_expected_tpt_b;
rs_priv->expected_tpt = iwl3945_expected_tpt_b;
rs_priv->last_partial_flush = jiffies;
rs_priv->last_flush = jiffies;
......@@ -399,10 +399,10 @@ static void *rs_alloc_sta(void *priv, gfp_t gfp)
init_timer(&rs_priv->rate_scale_flush);
rs_priv->rate_scale_flush.data = (unsigned long)rs_priv;
rs_priv->rate_scale_flush.function = &iwl_bg_rate_scale_flush;
rs_priv->rate_scale_flush.function = &iwl3945_bg_rate_scale_flush;
for (i = 0; i < IWL_RATE_COUNT; i++)
iwl_clear_window(&rs_priv->win[i]);
iwl3945_clear_window(&rs_priv->win[i]);
IWL_DEBUG_RATE("leave\n");
......@@ -411,7 +411,7 @@ static void *rs_alloc_sta(void *priv, gfp_t gfp)
static void rs_free_sta(void *priv, void *priv_sta)
{
struct iwl_rate_scale_priv *rs_priv = priv_sta;
struct iwl3945_rate_scale_priv *rs_priv = priv_sta;
IWL_DEBUG_RATE("enter\n");
del_timer_sync(&rs_priv->rate_scale_flush);
......@@ -425,9 +425,9 @@ static void rs_free_sta(void *priv, void *priv_sta)
* for A and B mode we need to overright prev
* value
*/
static int rs_adjust_next_rate(struct iwl_priv *priv, int rate)
static int rs_adjust_next_rate(struct iwl3945_priv *priv, int rate)
{
int next_rate = iwl_get_prev_ieee_rate(rate);
int next_rate = iwl3945_get_prev_ieee_rate(rate);
switch (priv->phymode) {
case MODE_IEEE80211A:
......@@ -449,7 +449,7 @@ static int rs_adjust_next_rate(struct iwl_priv *priv, int rate)
/**
* rs_tx_status - Update rate control values based on Tx results
*
* NOTE: Uses iwl_priv->retry_rate for the # of retries attempted by
* NOTE: Uses iwl3945_priv->retry_rate for the # of retries attempted by
* the hardware for each rate.
*/
static void rs_tx_status(void *priv_rate,
......@@ -462,9 +462,9 @@ static void rs_tx_status(void *priv_rate,
unsigned long flags;
struct sta_info *sta;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
struct iwl_priv *priv = (struct iwl_priv *)priv_rate;
struct iwl3945_priv *priv = (struct iwl3945_priv *)priv_rate;
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
struct iwl_rate_scale_priv *rs_priv;
struct iwl3945_rate_scale_priv *rs_priv;
IWL_DEBUG_RATE("enter\n");
......@@ -514,7 +514,7 @@ static void rs_tx_status(void *priv_rate,
/* Update this rate accounting for as many retries
* as was used for it (per current_count) */
iwl_collect_tx_data(rs_priv,
iwl3945_collect_tx_data(rs_priv,
&rs_priv->win[scale_rate_index],
0, current_count);
IWL_DEBUG_RATE("Update rate %d for %d retries.\n",
......@@ -533,7 +533,7 @@ static void rs_tx_status(void *priv_rate,
last_index,
(tx_resp->flags & IEEE80211_TX_STATUS_ACK) ?
"success" : "failure");
iwl_collect_tx_data(rs_priv,
iwl3945_collect_tx_data(rs_priv,
&rs_priv->win[last_index],
tx_resp->flags & IEEE80211_TX_STATUS_ACK, 1);
......@@ -560,8 +560,8 @@ static void rs_tx_status(void *priv_rate,
return;
}
static u16 iwl_get_adjacent_rate(struct iwl_rate_scale_priv *rs_priv,
u8 index, u16 rate_mask, int phymode)
static u16 iwl3945_get_adjacent_rate(struct iwl3945_rate_scale_priv *rs_priv,
u8 index, u16 rate_mask, int phymode)
{
u8 high = IWL_RATE_INVALID;
u8 low = IWL_RATE_INVALID;
......@@ -596,9 +596,9 @@ static u16 iwl_get_adjacent_rate(struct iwl_rate_scale_priv *rs_priv,
low = index;
while (low != IWL_RATE_INVALID) {
if (rs_priv->tgg)
low = iwl_rates[low].prev_rs_tgg;
low = iwl3945_rates[low].prev_rs_tgg;
else
low = iwl_rates[low].prev_rs;
low = iwl3945_rates[low].prev_rs;
if (low == IWL_RATE_INVALID)
break;
if (rate_mask & (1 << low))
......@@ -609,9 +609,9 @@ static u16 iwl_get_adjacent_rate(struct iwl_rate_scale_priv *rs_priv,
high = index;
while (high != IWL_RATE_INVALID) {
if (rs_priv->tgg)
high = iwl_rates[high].next_rs_tgg;
high = iwl3945_rates[high].next_rs_tgg;
else
high = iwl_rates[high].next_rs;
high = iwl3945_rates[high].next_rs;
if (high == IWL_RATE_INVALID)
break;
if (rate_mask & (1 << high))
......@@ -646,8 +646,8 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev,
u8 high = IWL_RATE_INVALID;
u16 high_low;
int index;
struct iwl_rate_scale_priv *rs_priv;
struct iwl_rate_scale_data *window = NULL;
struct iwl3945_rate_scale_priv *rs_priv;
struct iwl3945_rate_scale_data *window = NULL;
int current_tpt = IWL_INVALID_VALUE;
int low_tpt = IWL_INVALID_VALUE;
int high_tpt = IWL_INVALID_VALUE;
......@@ -658,7 +658,7 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev,
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
struct sta_info *sta;
u16 rate_mask;
struct iwl_priv *priv = (struct iwl_priv *)priv_rate;
struct iwl3945_priv *priv = (struct iwl3945_priv *)priv_rate;
DECLARE_MAC_BUF(mac);
IWL_DEBUG_RATE("enter\n");
......@@ -682,12 +682,12 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev,
if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) &&
!rs_priv->ibss_sta_added) {
u8 sta_id = iwl_hw_find_station(priv, hdr->addr1);
u8 sta_id = iwl3945_hw_find_station(priv, hdr->addr1);
if (sta_id == IWL_INVALID_STATION) {
IWL_DEBUG_RATE("LQ: ADD station %s\n",
print_mac(mac, hdr->addr1));
sta_id = iwl_add_station(priv,
sta_id = iwl3945_add_station(priv,
hdr->addr1, 0, CMD_ASYNC);
}
if (sta_id != IWL_INVALID_STATION)
......@@ -725,7 +725,7 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev,
rs_priv->expected_tpt[index] + 64) / 128);
current_tpt = window->average_tpt;
high_low = iwl_get_adjacent_rate(rs_priv, index, rate_mask,
high_low = iwl3945_get_adjacent_rate(rs_priv, index, rate_mask,
local->hw.conf.phymode);
low = high_low & 0xff;
high = (high_low >> 8) & 0xff;
......@@ -830,11 +830,11 @@ static struct rate_control_ops rs_ops = {
.free_sta = rs_free_sta,
};
int iwl_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id)
int iwl3945_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id)
{
struct ieee80211_local *local = hw_to_local(hw);
struct iwl_priv *priv = hw->priv;
struct iwl_rate_scale_priv *rs_priv;
struct iwl3945_priv *priv = hw->priv;
struct iwl3945_rate_scale_priv *rs_priv;
struct sta_info *sta;
unsigned long flags;
int count = 0, i;
......@@ -860,7 +860,7 @@ int iwl_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id)
int j;
count +=
sprintf(&buf[count], " %2dMbs: ", iwl_rates[i].ieee / 2);
sprintf(&buf[count], " %2dMbs: ", iwl3945_rates[i].ieee / 2);
mask = (1ULL << (IWL_RATE_MAX_WINDOW - 1));
for (j = 0; j < IWL_RATE_MAX_WINDOW; j++, mask >>= 1)
......@@ -869,7 +869,7 @@ int iwl_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id)
samples += rs_priv->win[i].counter;
good += rs_priv->win[i].success_counter;
success += rs_priv->win[i].success_counter * iwl_rates[i].ieee;
success += rs_priv->win[i].success_counter * iwl3945_rates[i].ieee;
if (rs_priv->win[i].stamp) {
int delta =
......@@ -882,7 +882,7 @@ int iwl_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id)
} else
buf[count++] = '\n';
j = iwl_get_prev_ieee_rate(i);
j = iwl3945_get_prev_ieee_rate(i);
if (j == i)
break;
i = j;
......@@ -893,7 +893,7 @@ int iwl_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id)
/* Display the average rate of all samples taken.
*
* NOTE: We multiple # of samples by 2 since the IEEE measurement
* added from iwl_rates is actually 2X the rate */
* added from iwl3945_rates is actually 2X the rate */
if (samples)
count += sprintf(
&buf[count],
......@@ -907,13 +907,13 @@ int iwl_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id)
return count;
}
void iwl_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
void iwl3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
{
struct iwl_priv *priv = hw->priv;
struct iwl3945_priv *priv = hw->priv;
s32 rssi = 0;
unsigned long flags;
struct ieee80211_local *local = hw_to_local(hw);
struct iwl_rate_scale_priv *rs_priv;
struct iwl3945_rate_scale_priv *rs_priv;
struct sta_info *sta;
IWL_DEBUG_RATE("enter\n");
......@@ -942,19 +942,19 @@ void iwl_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
case MODE_IEEE80211G:
if (priv->active_rxon.flags & RXON_FLG_TGG_PROTECT_MSK) {
rs_priv->tgg = 1;
rs_priv->expected_tpt = iwl_expected_tpt_g_prot;
rs_priv->expected_tpt = iwl3945_expected_tpt_g_prot;
} else
rs_priv->expected_tpt = iwl_expected_tpt_g;
rs_priv->expected_tpt = iwl3945_expected_tpt_g;
break;
case MODE_IEEE80211A:
rs_priv->expected_tpt = iwl_expected_tpt_a;
rs_priv->expected_tpt = iwl3945_expected_tpt_a;
break;
default:
IWL_WARNING("Invalid phymode. Defaulting to 802.11b\n");
case MODE_IEEE80211B:
rs_priv->expected_tpt = iwl_expected_tpt_b;
rs_priv->expected_tpt = iwl3945_expected_tpt_b;
break;
}
......@@ -967,19 +967,19 @@ void iwl_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
IWL_DEBUG(IWL_DL_INFO | IWL_DL_RATE, "Network RSSI: %d\n", rssi);
rs_priv->start_rate = iwl_get_rate_index_by_rssi(rssi, priv->phymode);
rs_priv->start_rate = iwl3945_get_rate_index_by_rssi(rssi, priv->phymode);
IWL_DEBUG_RATE("leave: rssi %d assign rate index: "
"%d (plcp 0x%x)\n", rssi, rs_priv->start_rate,
iwl_rates[rs_priv->start_rate].plcp);
iwl3945_rates[rs_priv->start_rate].plcp);
}
void iwl_rate_control_register(struct ieee80211_hw *hw)
void iwl3945_rate_control_register(struct ieee80211_hw *hw)
{
ieee80211_rate_control_register(&rs_ops);
}
void iwl_rate_control_unregister(struct ieee80211_hw *hw)
void iwl3945_rate_control_unregister(struct ieee80211_hw *hw)
{
ieee80211_rate_control_unregister(&rs_ops);
}
......
......@@ -27,7 +27,7 @@
#ifndef __iwl_3945_rs_h__
#define __iwl_3945_rs_h__
struct iwl_rate_info {
struct iwl3945_rate_info {
u8 plcp;
u8 ieee;
u8 prev_ieee; /* previous rate in IEEE speeds */
......@@ -159,11 +159,11 @@ enum {
#define IWL_MIN_RSSI_VAL -100
#define IWL_MAX_RSSI_VAL 0
extern const struct iwl_rate_info iwl_rates[IWL_RATE_COUNT];
extern const struct iwl3945_rate_info iwl3945_rates[IWL_RATE_COUNT];
static inline u8 iwl_get_prev_ieee_rate(u8 rate_index)
static inline u8 iwl3945_get_prev_ieee_rate(u8 rate_index)
{
u8 rate = iwl_rates[rate_index].prev_ieee;
u8 rate = iwl3945_rates[rate_index].prev_ieee;
if (rate == IWL_RATE_INVALID)
rate = rate_index;
......@@ -171,40 +171,40 @@ static inline u8 iwl_get_prev_ieee_rate(u8 rate_index)
}
/**
* iwl_fill_rs_info - Fill an output text buffer with the rate representation
* iwl3945_fill_rs_info - Fill an output text buffer with the rate representation
*
* NOTE: This is provided as a quick mechanism for a user to visualize
* the performance of the rate control algorithm and is not meant to be
* parsed software.
*/
extern int iwl_fill_rs_info(struct ieee80211_hw *, char *buf, u8 sta_id);
extern int iwl3945_fill_rs_info(struct ieee80211_hw *, char *buf, u8 sta_id);
/**
* iwl_rate_scale_init - Initialize the rate scale table based on assoc info
* iwl3945_rate_scale_init - Initialize the rate scale table based on assoc info
*
* The specific throughput table used is based on the type of network
* the associated with, including A, B, G, and G w/ TGG protection
*/
extern void iwl_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id);
extern void iwl3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id);
/**
* iwl_rate_control_register - Register the rate control algorithm callbacks
* iwl3945_rate_control_register - Register the rate control algorithm callbacks
*
* Since the rate control algorithm is hardware specific, there is no need
* or reason to place it as a stand alone module. The driver can call
* iwl_rate_control_register in order to register the rate control callbacks
* iwl3945_rate_control_register in order to register the rate control callbacks
* with the mac80211 subsystem. This should be performed prior to calling
* ieee80211_register_hw
*
*/
extern void iwl_rate_control_register(struct ieee80211_hw *hw);
extern void iwl3945_rate_control_register(struct ieee80211_hw *hw);
/**
* iwl_rate_control_unregister - Unregister the rate control callbacks
* iwl3945_rate_control_unregister - Unregister the rate control callbacks
*
* This should be called after calling ieee80211_unregister_hw, but before
* the driver is unloaded.
*/
extern void iwl_rate_control_unregister(struct ieee80211_hw *hw);
extern void iwl3945_rate_control_unregister(struct ieee80211_hw *hw);
#endif
......@@ -61,8 +61,8 @@
*
*****************************************************************************/
#ifndef __iwl_commands_h__
#define __iwl_commands_h__
#ifndef __iwl4965_commands_h__
#define __iwl4965_commands_h__
enum {
REPLY_ALIVE = 0x1,
......@@ -147,7 +147,7 @@ enum {
#define IWL_CMD_FAILED_MSK 0x40
struct iwl_cmd_header {
struct iwl4965_cmd_header {
u8 cmd;
u8 flags;
/* We have 15 LSB to use as we please (MSB indicates
......@@ -179,7 +179,7 @@ struct iwl_cmd_header {
/*
* REPLY_ALIVE = 0x1 (response only, not a command)
*/
struct iwl_alive_resp {
struct iwl4965_alive_resp {
u8 ucode_minor;
u8 ucode_major;
__le16 reserved1;
......@@ -193,7 +193,7 @@ struct iwl_alive_resp {
__le32 is_valid;
} __attribute__ ((packed));
struct iwl_init_alive_resp {
struct iwl4965_init_alive_resp {
u8 ucode_minor;
u8 ucode_major;
__le16 reserved1;
......@@ -225,7 +225,7 @@ union tsf {
/*
* REPLY_ERROR = 0x2 (response only, not a command)
*/
struct iwl_error_resp {
struct iwl4965_error_resp {
__le32 error_type;
u8 cmd_id;
u8 reserved1;
......@@ -293,7 +293,7 @@ enum {
/*
* REPLY_RXON = 0x10 (command, has simple generic response)
*/
struct iwl_rxon_cmd {
struct iwl4965_rxon_cmd {
u8 node_addr[6];
__le16 reserved1;
u8 bssid_addr[6];
......@@ -316,7 +316,7 @@ struct iwl_rxon_cmd {
/*
* REPLY_RXON_ASSOC = 0x11 (command, has simple generic response)
*/
struct iwl_rxon_assoc_cmd {
struct iwl4965_rxon_assoc_cmd {
__le32 flags;
__le32 filter_flags;
u8 ofdm_basic_rates;
......@@ -330,7 +330,7 @@ struct iwl_rxon_assoc_cmd {
/*
* REPLY_RXON_TIMING = 0x14 (command, has simple generic response)
*/
struct iwl_rxon_time_cmd {
struct iwl4965_rxon_time_cmd {
union tsf timestamp;
__le16 beacon_interval;
__le16 atim_window;
......@@ -339,7 +339,7 @@ struct iwl_rxon_time_cmd {
__le16 reserved;
} __attribute__ ((packed));
struct iwl_tx_power {
struct iwl4965_tx_power {
u8 tx_gain; /* gain for analog radio */
u8 dsp_atten; /* gain for DSP */
} __attribute__ ((packed));
......@@ -351,27 +351,27 @@ struct tx_power_dual_stream {
__le32 dw;
} __attribute__ ((packed));
struct iwl_tx_power_db {
struct iwl4965_tx_power_db {
struct tx_power_dual_stream power_tbl[POWER_TABLE_NUM_ENTRIES];
} __attribute__ ((packed));
/*
* REPLY_CHANNEL_SWITCH = 0x72 (command, has simple generic response)
*/
struct iwl_channel_switch_cmd {
struct iwl4965_channel_switch_cmd {
u8 band;
u8 expect_beacon;
__le16 channel;
__le32 rxon_flags;
__le32 rxon_filter_flags;
__le32 switch_time;
struct iwl_tx_power_db tx_power;
struct iwl4965_tx_power_db tx_power;
} __attribute__ ((packed));
/*
* CHANNEL_SWITCH_NOTIFICATION = 0x73 (notification only, not a command)
*/
struct iwl_csa_notification {
struct iwl4965_csa_notification {
__le16 band;
__le16 channel;
__le32 status; /* 0 - OK, 1 - fail */
......@@ -382,7 +382,7 @@ struct iwl_csa_notification {
* Quality-of-Service (QOS) Commands & Responses:
*
*****************************************************************************/
struct iwl_ac_qos {
struct iwl4965_ac_qos {
__le16 cw_min;
__le16 cw_max;
u8 aifsn;
......@@ -404,9 +404,9 @@ struct iwl_ac_qos {
/*
* REPLY_QOS_PARAM = 0x13 (command, has simple generic response)
*/
struct iwl_qosparam_cmd {
struct iwl4965_qosparam_cmd {
__le32 qos_flags;
struct iwl_ac_qos ac[AC_NUM];
struct iwl4965_ac_qos ac[AC_NUM];
} __attribute__ ((packed));
/******************************************************************************
......@@ -464,7 +464,7 @@ struct iwl_qosparam_cmd {
#define RATE_MCS_ANT_B_MSK 0x8000
#define RATE_MCS_ANT_AB_MSK 0xc000
struct iwl_keyinfo {
struct iwl4965_keyinfo {
__le16 key_flags;
u8 tkip_rx_tsc_byte2; /* TSC[2] for key mix ph1 detection */
u8 reserved1;
......@@ -484,11 +484,11 @@ struct sta_id_modify {
/*
* REPLY_ADD_STA = 0x18 (command)
*/
struct iwl_addsta_cmd {
struct iwl4965_addsta_cmd {
u8 mode;
u8 reserved[3];
struct sta_id_modify sta;
struct iwl_keyinfo key;
struct iwl4965_keyinfo key;
__le32 station_flags;
__le32 station_flags_msk;
__le16 tid_disable_tx;
......@@ -502,7 +502,7 @@ struct iwl_addsta_cmd {
/*
* REPLY_ADD_STA = 0x18 (response)
*/
struct iwl_add_sta_resp {
struct iwl4965_add_sta_resp {
u8 status;
} __attribute__ ((packed));
......@@ -514,7 +514,7 @@ struct iwl_add_sta_resp {
*
*****************************************************************************/
struct iwl_rx_frame_stats {
struct iwl4965_rx_frame_stats {
u8 phy_count;
u8 id;
u8 rssi;
......@@ -524,7 +524,7 @@ struct iwl_rx_frame_stats {
u8 payload[0];
} __attribute__ ((packed));
struct iwl_rx_frame_hdr {
struct iwl4965_rx_frame_hdr {
__le16 channel;
__le16 phy_flags;
u8 reserved1;
......@@ -554,7 +554,7 @@ struct iwl_rx_frame_hdr {
#define RX_RES_STATUS_BAD_ICV_MIC (0x1 << 11)
#define RX_RES_STATUS_BAD_KEY_TTAK (0x2 << 11)
struct iwl_rx_frame_end {
struct iwl4965_rx_frame_end {
__le32 status;
__le64 timestamp;
__le32 beacon_timestamp;
......@@ -568,10 +568,10 @@ struct iwl_rx_frame_end {
* The actual offsets of the hdr and end are dynamic based on
* stats.phy_count
*/
struct iwl_rx_frame {
struct iwl_rx_frame_stats stats;
struct iwl_rx_frame_hdr hdr;
struct iwl_rx_frame_end end;
struct iwl4965_rx_frame {
struct iwl4965_rx_frame_stats stats;
struct iwl4965_rx_frame_hdr hdr;
struct iwl4965_rx_frame_end end;
} __attribute__ ((packed));
/* Fixed (non-configurable) rx data from phy */
......@@ -666,7 +666,7 @@ struct iwl4965_rx_mpdu_res_start {
* TX command Frame life time
*/
struct iwl_dram_scratch {
struct iwl4965_dram_scratch {
u8 try_cnt;
u8 bt_kill_cnt;
__le16 reserved;
......@@ -675,11 +675,11 @@ struct iwl_dram_scratch {
/*
* REPLY_TX = 0x1c (command)
*/
struct iwl_tx_cmd {
struct iwl4965_tx_cmd {
__le16 len;
__le16 next_frame_len;
__le32 tx_flags;
struct iwl_dram_scratch scratch;
struct iwl4965_dram_scratch scratch;
__le32 rate_n_flags;
u8 sta_id;
u8 sec_ctl;
......@@ -807,7 +807,7 @@ enum {
/*
* REPLY_TX = 0x1c (response)
*/
struct iwl_tx_resp {
struct iwl4965_tx_resp {
u8 frame_count; /* 1 no aggregation, >1 aggregation */
u8 bt_kill_count;
u8 failure_rts;
......@@ -823,7 +823,7 @@ struct iwl_tx_resp {
/*
* REPLY_COMPRESSED_BA = 0xc5 (response only, not a command)
*/
struct iwl_compressed_ba_resp {
struct iwl4965_compressed_ba_resp {
__le32 sta_addr_lo32;
__le16 sta_addr_hi16;
__le16 reserved;
......@@ -839,11 +839,11 @@ struct iwl_compressed_ba_resp {
/*
* REPLY_TX_PWR_TABLE_CMD = 0x97 (command, has simple generic response)
*/
struct iwl_txpowertable_cmd {
struct iwl4965_txpowertable_cmd {
u8 band; /* 0: 5 GHz, 1: 2.4 GHz */
u8 reserved;
__le16 channel;
struct iwl_tx_power_db tx_power;
struct iwl4965_tx_power_db tx_power;
} __attribute__ ((packed));
/*RS_NEW_API: only TLC_RTS remains and moved to bit 0 */
......@@ -856,7 +856,7 @@ struct iwl_txpowertable_cmd {
#define LINK_QUAL_ANT_B_MSK (1<<1)
#define LINK_QUAL_ANT_MSK (LINK_QUAL_ANT_A_MSK|LINK_QUAL_ANT_B_MSK)
struct iwl_link_qual_general_params {
struct iwl4965_link_qual_general_params {
u8 flags;
u8 mimo_delimiter;
u8 single_stream_ant_msk;
......@@ -864,7 +864,7 @@ struct iwl_link_qual_general_params {
u8 start_rate_index[LINK_QUAL_AC_NUM];
} __attribute__ ((packed));
struct iwl_link_qual_agg_params {
struct iwl4965_link_qual_agg_params {
__le16 agg_time_limit;
u8 agg_dis_start_th;
u8 agg_frame_cnt_limit;
......@@ -874,12 +874,12 @@ struct iwl_link_qual_agg_params {
/*
* REPLY_TX_LINK_QUALITY_CMD = 0x4e (command, has simple generic response)
*/
struct iwl_link_quality_cmd {
struct iwl4965_link_quality_cmd {
u8 sta_id;
u8 reserved1;
__le16 control;
struct iwl_link_qual_general_params general_params;
struct iwl_link_qual_agg_params agg_params;
struct iwl4965_link_qual_general_params general_params;
struct iwl4965_link_qual_agg_params agg_params;
struct {
__le32 rate_n_flags;
} rs_table[LINK_QUAL_MAX_RETRY_NUM];
......@@ -889,7 +889,7 @@ struct iwl_link_quality_cmd {
/*
* REPLY_BT_CONFIG = 0x9b (command, has simple generic response)
*/
struct iwl_bt_cmd {
struct iwl4965_bt_cmd {
u8 flags;
u8 lead_time;
u8 max_kill;
......@@ -915,18 +915,18 @@ struct iwl_bt_cmd {
RXON_FILTER_ASSOC_MSK | \
RXON_FILTER_BCON_AWARE_MSK)
struct iwl_measure_channel {
struct iwl4965_measure_channel {
__le32 duration; /* measurement duration in extended beacon
* format */
u8 channel; /* channel to measure */
u8 type; /* see enum iwl_measure_type */
u8 type; /* see enum iwl4965_measure_type */
__le16 reserved;
} __attribute__ ((packed));
/*
* REPLY_SPECTRUM_MEASUREMENT_CMD = 0x74 (command)
*/
struct iwl_spectrum_cmd {
struct iwl4965_spectrum_cmd {
__le16 len; /* number of bytes starting from token */
u8 token; /* token id */
u8 id; /* measurement id -- 0 or 1 */
......@@ -939,13 +939,13 @@ struct iwl_spectrum_cmd {
__le32 filter_flags; /* rxon filter flags */
__le16 channel_count; /* minimum 1, maximum 10 */
__le16 reserved3;
struct iwl_measure_channel channels[10];
struct iwl4965_measure_channel channels[10];
} __attribute__ ((packed));
/*
* REPLY_SPECTRUM_MEASUREMENT_CMD = 0x74 (response)
*/
struct iwl_spectrum_resp {
struct iwl4965_spectrum_resp {
u8 token;
u8 id; /* id of the prior command replaced, or 0xff */
__le16 status; /* 0 - command will be handled
......@@ -953,12 +953,12 @@ struct iwl_spectrum_resp {
* measurement) */
} __attribute__ ((packed));
enum iwl_measurement_state {
enum iwl4965_measurement_state {
IWL_MEASUREMENT_START = 0,
IWL_MEASUREMENT_STOP = 1,
};
enum iwl_measurement_status {
enum iwl4965_measurement_status {
IWL_MEASUREMENT_OK = 0,
IWL_MEASUREMENT_CONCURRENT = 1,
IWL_MEASUREMENT_CSA_CONFLICT = 2,
......@@ -971,18 +971,18 @@ enum iwl_measurement_status {
#define NUM_ELEMENTS_IN_HISTOGRAM 8
struct iwl_measurement_histogram {
struct iwl4965_measurement_histogram {
__le32 ofdm[NUM_ELEMENTS_IN_HISTOGRAM]; /* in 0.8usec counts */
__le32 cck[NUM_ELEMENTS_IN_HISTOGRAM]; /* in 1usec counts */
} __attribute__ ((packed));
/* clear channel availability counters */
struct iwl_measurement_cca_counters {
struct iwl4965_measurement_cca_counters {
__le32 ofdm;
__le32 cck;
} __attribute__ ((packed));
enum iwl_measure_type {
enum iwl4965_measure_type {
IWL_MEASURE_BASIC = (1 << 0),
IWL_MEASURE_CHANNEL_LOAD = (1 << 1),
IWL_MEASURE_HISTOGRAM_RPI = (1 << 2),
......@@ -995,7 +995,7 @@ enum iwl_measure_type {
/*
* SPECTRUM_MEASURE_NOTIFICATION = 0x75 (notification only, not a command)
*/
struct iwl_spectrum_notification {
struct iwl4965_spectrum_notification {
u8 id; /* measurement id -- 0 or 1 */
u8 token;
u8 channel_index; /* index in measurement channel list */
......@@ -1003,7 +1003,7 @@ struct iwl_spectrum_notification {
__le32 start_time; /* lower 32-bits of TSF */
u8 band; /* 0 - 5.2GHz, 1 - 2.4GHz */
u8 channel;
u8 type; /* see enum iwl_measurement_type */
u8 type; /* see enum iwl4965_measurement_type */
u8 reserved1;
/* NOTE: cca_ofdm, cca_cck, basic_type, and histogram are only only
* valid if applicable for measurement type requested. */
......@@ -1013,9 +1013,9 @@ struct iwl_spectrum_notification {
u8 basic_type; /* 0 - bss, 1 - ofdm preamble, 2 -
* unidentified */
u8 reserved2[3];
struct iwl_measurement_histogram histogram;
struct iwl4965_measurement_histogram histogram;
__le32 stop_time; /* lower 32-bits of TSF */
__le32 status; /* see iwl_measurement_status */
__le32 status; /* see iwl4965_measurement_status */
} __attribute__ ((packed));
/******************************************************************************
......@@ -1025,7 +1025,7 @@ struct iwl_spectrum_notification {
*****************************************************************************/
/**
* struct iwl_powertable_cmd - Power Table Command
* struct iwl4965_powertable_cmd - Power Table Command
* @flags: See below:
*
* POWER_TABLE_CMD = 0x77 (command, has simple generic response)
......@@ -1058,7 +1058,7 @@ struct iwl_spectrum_notification {
#define IWL_POWER_SLEEP_OVER_DTIM_MSK __constant_cpu_to_le16(1<<2)
#define IWL_POWER_PCI_PM_MSK __constant_cpu_to_le16(1<<3)
struct iwl_powertable_cmd {
struct iwl4965_powertable_cmd {
__le16 flags;
u8 keep_alive_seconds;
u8 debug_flags;
......@@ -1072,7 +1072,7 @@ struct iwl_powertable_cmd {
* PM_SLEEP_NOTIFICATION = 0x7A (notification only, not a command)
* 3945 and 4965 identical.
*/
struct iwl_sleep_notification {
struct iwl4965_sleep_notification {
u8 pm_sleep_mode;
u8 pm_wakeup_src;
__le16 reserved;
......@@ -1102,14 +1102,14 @@ enum {
#define CARD_STATE_CMD_DISABLE 0x00 /* Put card to sleep */
#define CARD_STATE_CMD_ENABLE 0x01 /* Wake up card */
#define CARD_STATE_CMD_HALT 0x02 /* Power down permanently */
struct iwl_card_state_cmd {
struct iwl4965_card_state_cmd {
__le32 status; /* CARD_STATE_CMD_* request new power state */
} __attribute__ ((packed));
/*
* CARD_STATE_NOTIFICATION = 0xa1 (notification only, not a command)
*/
struct iwl_card_state_notif {
struct iwl4965_card_state_notif {
__le32 flags;
} __attribute__ ((packed));
......@@ -1118,7 +1118,7 @@ struct iwl_card_state_notif {
#define RF_CARD_DISABLED 0x04
#define RXON_CARD_DISABLED 0x10
struct iwl_ct_kill_config {
struct iwl4965_ct_kill_config {
__le32 reserved;
__le32 critical_temperature_M;
__le32 critical_temperature_R;
......@@ -1130,7 +1130,7 @@ struct iwl_ct_kill_config {
*
*****************************************************************************/
struct iwl_scan_channel {
struct iwl4965_scan_channel {
/* type is defined as:
* 0:0 active (0 - passive)
* 1:4 SSID direct
......@@ -1139,12 +1139,12 @@ struct iwl_scan_channel {
*/
u8 type;
u8 channel;
struct iwl_tx_power tpc;
struct iwl4965_tx_power tpc;
__le16 active_dwell;
__le16 passive_dwell;
} __attribute__ ((packed));
struct iwl_ssid_ie {
struct iwl4965_ssid_ie {
u8 id;
u8 len;
u8 ssid[32];
......@@ -1158,7 +1158,7 @@ struct iwl_ssid_ie {
/*
* REPLY_SCAN_CMD = 0x80 (command)
*/
struct iwl_scan_cmd {
struct iwl4965_scan_cmd {
__le16 len;
u8 reserved0;
u8 channel_count;
......@@ -1177,14 +1177,14 @@ struct iwl_scan_cmd {
__le32 flags;
__le32 filter_flags;
struct iwl_tx_cmd tx_cmd;
struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX];
struct iwl4965_tx_cmd tx_cmd;
struct iwl4965_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];
* struct iwl4965_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
......@@ -1201,14 +1201,14 @@ struct iwl_scan_cmd {
/*
* REPLY_SCAN_CMD = 0x80 (response)
*/
struct iwl_scanreq_notification {
struct iwl4965_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 {
struct iwl4965_scanstart_notification {
__le32 tsf_low;
__le32 tsf_high;
__le32 beacon_timer;
......@@ -1225,7 +1225,7 @@ struct iwl_scanstart_notification {
/*
* SCAN_RESULTS_NOTIFICATION = 0x83 (notification only, not a command)
*/
struct iwl_scanresults_notification {
struct iwl4965_scanresults_notification {
u8 channel;
u8 band;
u8 reserved[2];
......@@ -1237,7 +1237,7 @@ struct iwl_scanresults_notification {
/*
* SCAN_COMPLETE_NOTIFICATION = 0x84 (notification only, not a command)
*/
struct iwl_scancomplete_notification {
struct iwl4965_scancomplete_notification {
u8 scanned_channels;
u8 status;
u8 reserved;
......@@ -1256,8 +1256,8 @@ struct iwl_scancomplete_notification {
/*
* BEACON_NOTIFICATION = 0x90 (notification only, not a command)
*/
struct iwl_beacon_notif {
struct iwl_tx_resp beacon_notify_hdr;
struct iwl4965_beacon_notif {
struct iwl4965_tx_resp beacon_notify_hdr;
__le32 low_tsf;
__le32 high_tsf;
__le32 ibss_mgr_status;
......@@ -1266,8 +1266,8 @@ struct iwl_beacon_notif {
/*
* REPLY_TX_BEACON = 0x91 (command, has simple generic response)
*/
struct iwl_tx_beacon_cmd {
struct iwl_tx_cmd tx;
struct iwl4965_tx_beacon_cmd {
struct iwl4965_tx_cmd tx;
__le16 tim_idx;
u8 tim_size;
u8 reserved1;
......@@ -1458,7 +1458,7 @@ struct statistics_general {
*/
#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 {
struct iwl4965_statistics_cmd {
__le32 configuration_flags; /* IWL_STATS_CONF_* */
} __attribute__ ((packed));
......@@ -1479,7 +1479,7 @@ struct iwl_statistics_cmd {
*/
#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 {
struct iwl4965_notif_statistics {
__le32 flag;
struct statistics_rx rx;
struct statistics_tx tx;
......@@ -1494,7 +1494,7 @@ struct iwl_notif_statistics {
* then this notification will be sent. */
#define CONSECUTIVE_MISSED_BCONS_TH 20
struct iwl_missed_beacon_notif {
struct iwl4965_missed_beacon_notif {
__le32 consequtive_missed_beacons;
__le32 total_missed_becons;
__le32 num_expected_beacons;
......@@ -1510,12 +1510,12 @@ struct iwl_missed_beacon_notif {
#define PHY_CALIBRATE_DIFF_GAIN_CMD (7)
#define HD_TABLE_SIZE (11)
struct iwl_sensitivity_cmd {
struct iwl4965_sensitivity_cmd {
__le16 control;
__le16 table[HD_TABLE_SIZE];
} __attribute__ ((packed));
struct iwl_calibration_cmd {
struct iwl4965_calibration_cmd {
u8 opCode;
u8 flags;
__le16 reserved;
......@@ -1538,7 +1538,7 @@ struct iwl_calibration_cmd {
* 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 {
struct iwl4965_led_cmd {
__le32 interval; /* "interval" in uSec */
u8 id; /* 1: Activity, 2: Link, 3: Tech */
u8 off; /* # intervals off while blinking;
......@@ -1554,29 +1554,29 @@ struct iwl_led_cmd {
*
*****************************************************************************/
struct iwl_rx_packet {
struct iwl4965_rx_packet {
__le32 len;
struct iwl_cmd_header hdr;
struct iwl4965_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;
struct iwl_compressed_ba_resp compressed_ba;
struct iwl_missed_beacon_notif missed_beacon;
struct iwl4965_alive_resp alive_frame;
struct iwl4965_rx_frame rx_frame;
struct iwl4965_tx_resp tx_resp;
struct iwl4965_spectrum_notification spectrum_notif;
struct iwl4965_csa_notification csa_notif;
struct iwl4965_error_resp err_resp;
struct iwl4965_card_state_notif card_state_notif;
struct iwl4965_beacon_notif beacon_status;
struct iwl4965_add_sta_resp add_sta;
struct iwl4965_sleep_notification sleep_notif;
struct iwl4965_spectrum_resp spectrum;
struct iwl4965_notif_statistics stats;
struct iwl4965_compressed_ba_resp compressed_ba;
struct iwl4965_missed_beacon_notif missed_beacon;
__le32 status;
u8 raw[0];
} u;
} __attribute__ ((packed));
#define IWL_RX_FRAME_SIZE (4 + sizeof(struct iwl_rx_frame))
#define IWL_RX_FRAME_SIZE (4 + sizeof(struct iwl4965_rx_frame))
#endif /* __iwl_commands_h__ */
#endif /* __iwl4965_commands_h__ */
......@@ -26,18 +26,18 @@
*
*****************************************************************************/
#ifndef __iwl_debug_h__
#define __iwl_debug_h__
#ifndef __iwl4965_debug_h__
#define __iwl4965_debug_h__
#ifdef CONFIG_IWL4965_DEBUG
extern u32 iwl_debug_level;
extern u32 iwl4965_debug_level;
#define IWL_DEBUG(level, fmt, args...) \
do { if (iwl_debug_level & (level)) \
do { if (iwl4965_debug_level & (level)) \
printk(KERN_ERR DRV_NAME": %c %s " fmt, \
in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
#define IWL_DEBUG_LIMIT(level, fmt, args...) \
do { if ((iwl_debug_level & (level)) && net_ratelimit()) \
do { if ((iwl4965_debug_level & (level)) && net_ratelimit()) \
printk(KERN_ERR DRV_NAME": %c %s " fmt, \
in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
#else
......@@ -68,7 +68,7 @@ static inline void IWL_DEBUG_LIMIT(int level, const char *fmt, ...)
*
* % cat /proc/net/iwl/debug_level
*
* you simply need to add your entry to the iwl_debug_levels array.
* you simply need to add your entry to the iwl4965_debug_levels array.
*
* If you do not see debug_level in /proc/net/iwl then you do not have
* CONFIG_IWL4965_DEBUG defined in your kernel configuration
......
......@@ -137,7 +137,7 @@ enum {
#define EEPROM_SKU_CAP_OP_MODE_MRC (1 << 7)
/* *regulatory* channel data from eeprom, one for each channel */
struct iwl_eeprom_channel {
struct iwl4965_eeprom_channel {
u8 flags; /* flags copied from EEPROM */
s8 max_power_avg; /* max power (dBm) on this chnl, limit 31 */
} __attribute__ ((packed));
......@@ -152,7 +152,7 @@ struct iwl_eeprom_channel {
* level.
* Data copied from EEPROM.
*/
struct iwl_eeprom_txpower_sample {
struct iwl4965_eeprom_txpower_sample {
u8 gain_index; /* index into power (gain) setup table ... */
s8 power; /* ... for this pwr level for this chnl group */
u16 v_det; /* PA output voltage */
......@@ -166,8 +166,8 @@ struct iwl_eeprom_txpower_sample {
* Data copied from EEPROM.
* DO NOT ALTER THIS STRUCTURE!!!
*/
struct iwl_eeprom_txpower_group {
struct iwl_eeprom_txpower_sample samples[5]; /* 5 power levels */
struct iwl4965_eeprom_txpower_group {
struct iwl4965_eeprom_txpower_sample samples[5]; /* 5 power levels */
s32 a, b, c, d, e; /* coefficients for voltage->power
* formula (signed) */
s32 Fa, Fb, Fc, Fd, Fe; /* these modify coeffs based on
......@@ -185,7 +185,7 @@ struct iwl_eeprom_txpower_group {
* difference between current temperature and factory calib temperature.
* Data copied from EEPROM.
*/
struct iwl_eeprom_temperature_corr {
struct iwl4965_eeprom_temperature_corr {
u32 Ta;
u32 Tb;
u32 Tc;
......@@ -199,35 +199,35 @@ struct iwl_eeprom_temperature_corr {
#define EEPROM_TX_POWER_VERSION (2)
#define EEPROM_TX_POWER_VERSION_NEW (5)
struct iwl_eeprom_calib_measure {
struct iwl4965_eeprom_calib_measure {
u8 temperature;
u8 gain_idx;
u8 actual_pow;
s8 pa_det;
} __attribute__ ((packed));
struct iwl_eeprom_calib_ch_info {
struct iwl4965_eeprom_calib_ch_info {
u8 ch_num;
struct iwl_eeprom_calib_measure measurements[EEPROM_TX_POWER_TX_CHAINS]
struct iwl4965_eeprom_calib_measure measurements[EEPROM_TX_POWER_TX_CHAINS]
[EEPROM_TX_POWER_MEASUREMENTS];
} __attribute__ ((packed));
struct iwl_eeprom_calib_subband_info {
struct iwl4965_eeprom_calib_subband_info {
u8 ch_from;
u8 ch_to;
struct iwl_eeprom_calib_ch_info ch1;
struct iwl_eeprom_calib_ch_info ch2;
struct iwl4965_eeprom_calib_ch_info ch1;
struct iwl4965_eeprom_calib_ch_info ch2;
} __attribute__ ((packed));
struct iwl_eeprom_calib_info {
struct iwl4965_eeprom_calib_info {
u8 saturation_power24;
u8 saturation_power52;
s16 voltage; /* signed */
struct iwl_eeprom_calib_subband_info band_info[EEPROM_TX_POWER_BANDS];
struct iwl4965_eeprom_calib_subband_info band_info[EEPROM_TX_POWER_BANDS];
} __attribute__ ((packed));
struct iwl_eeprom {
struct iwl4965_eeprom {
u8 reserved0[16];
#define EEPROM_DEVICE_ID (2*0x08) /* 2 bytes */
u16 device_id; /* abs.ofs: 16 */
......@@ -276,30 +276,30 @@ struct iwl_eeprom {
#define EEPROM_REGULATORY_BAND_1 (2*0x62) /* 2 bytes */
u16 band_1_count; /* abs.ofs: 196 */
#define EEPROM_REGULATORY_BAND_1_CHANNELS (2*0x63) /* 28 bytes */
struct iwl_eeprom_channel band_1_channels[14]; /* abs.ofs: 196 */
struct iwl4965_eeprom_channel band_1_channels[14]; /* abs.ofs: 196 */
#define EEPROM_REGULATORY_BAND_2 (2*0x71) /* 2 bytes */
u16 band_2_count; /* abs.ofs: 226 */
#define EEPROM_REGULATORY_BAND_2_CHANNELS (2*0x72) /* 26 bytes */
struct iwl_eeprom_channel band_2_channels[13]; /* abs.ofs: 228 */
struct iwl4965_eeprom_channel band_2_channels[13]; /* abs.ofs: 228 */
#define EEPROM_REGULATORY_BAND_3 (2*0x7F) /* 2 bytes */
u16 band_3_count; /* abs.ofs: 254 */
#define EEPROM_REGULATORY_BAND_3_CHANNELS (2*0x80) /* 24 bytes */
struct iwl_eeprom_channel band_3_channels[12]; /* abs.ofs: 256 */
struct iwl4965_eeprom_channel band_3_channels[12]; /* abs.ofs: 256 */
#define EEPROM_REGULATORY_BAND_4 (2*0x8C) /* 2 bytes */
u16 band_4_count; /* abs.ofs: 280 */
#define EEPROM_REGULATORY_BAND_4_CHANNELS (2*0x8D) /* 22 bytes */
struct iwl_eeprom_channel band_4_channels[11]; /* abs.ofs: 282 */
struct iwl4965_eeprom_channel band_4_channels[11]; /* abs.ofs: 282 */
#define EEPROM_REGULATORY_BAND_5 (2*0x98) /* 2 bytes */
u16 band_5_count; /* abs.ofs: 304 */
#define EEPROM_REGULATORY_BAND_5_CHANNELS (2*0x99) /* 12 bytes */
struct iwl_eeprom_channel band_5_channels[6]; /* abs.ofs: 306 */
struct iwl4965_eeprom_channel band_5_channels[6]; /* abs.ofs: 306 */
u8 reserved10[2];
#define EEPROM_REGULATORY_BAND_24_FAT_CHANNELS (2*0xA0) /* 14 bytes */
struct iwl_eeprom_channel band_24_channels[7]; /* abs.ofs: 320 */
struct iwl4965_eeprom_channel band_24_channels[7]; /* abs.ofs: 320 */
u8 reserved11[2];
#define EEPROM_REGULATORY_BAND_52_FAT_CHANNELS (2*0xA8) /* 22 bytes */
struct iwl_eeprom_channel band_52_channels[11]; /* abs.ofs: 336 */
struct iwl4965_eeprom_channel band_52_channels[11]; /* abs.ofs: 336 */
u8 reserved12[6];
#define EEPROM_CALIB_VERSION_OFFSET (2*0xB6) /* 2 bytes */
u16 calib_version; /* abs.ofs: 364 */
......@@ -308,7 +308,7 @@ struct iwl_eeprom {
u16 satruation_power; /* abs.ofs: 368 */
u8 reserved14[94];
#define EEPROM_IWL_CALIB_TXPOWER_OFFSET (2*0xE8) /* 48 bytes */
struct iwl_eeprom_calib_info calib_info; /* abs.ofs: 464 */
struct iwl4965_eeprom_calib_info calib_info; /* abs.ofs: 464 */
u8 reserved16[140]; /* fill out to full 1024 byte block */
......@@ -731,8 +731,8 @@ struct iwl_eeprom {
#define TFD_TX_CMD_SLOTS 256
#define TFD_CMD_SLOTS 32
#define TFD_MAX_PAYLOAD_SIZE (sizeof(struct iwl_cmd) - \
sizeof(struct iwl_cmd_meta))
#define TFD_MAX_PAYLOAD_SIZE (sizeof(struct iwl4965_cmd) - \
sizeof(struct iwl4965_cmd_meta))
/*
* RX related structures and functions
......@@ -751,7 +751,7 @@ struct iwl_eeprom {
#define IWL_MAX_INST_SIZE KDR_RTC_INST_SIZE
#define IWL_MAX_DATA_SIZE KDR_RTC_DATA_SIZE
static inline int iwl_hw_valid_rtc_data_addr(u32 addr)
static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr)
{
return (addr >= RTC_DATA_LOWER_BOUND) &&
(addr < KDR_RTC_DATA_UPPER_BOUND);
......@@ -873,7 +873,7 @@ enum {
#define CALIB_IWL_TX_ATTEN_GR5_LCH 20
union iwl_tx_power_dual_stream {
union iwl4965_tx_power_dual_stream {
struct {
u8 radio_tx_gain[2];
u8 dsp_predis_atten[2];
......@@ -1115,20 +1115,20 @@ union iwl_tx_power_dual_stream {
#define CSR_HW_IF_CONFIG_REG_BIT_MAC_SI (0x00000100)
#define CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI (0x00000200)
static inline u8 iwl_hw_get_rate(__le32 rate_n_flags)
static inline u8 iwl4965_hw_get_rate(__le32 rate_n_flags)
{
return le32_to_cpu(rate_n_flags) & 0xFF;
}
static inline u16 iwl_hw_get_rate_n_flags(__le32 rate_n_flags)
static inline u16 iwl4965_hw_get_rate_n_flags(__le32 rate_n_flags)
{
return le32_to_cpu(rate_n_flags) & 0xFFFF;
}
static inline __le32 iwl_hw_set_rate_n_flags(u8 rate, u16 flags)
static inline __le32 iwl4965_hw_set_rate_n_flags(u8 rate, u16 flags)
{
return cpu_to_le32(flags|(u16)rate);
}
struct iwl_tfd_frame_data {
struct iwl4965_tfd_frame_data {
__le32 tb1_addr;
__le32 val1;
......@@ -1156,7 +1156,7 @@ struct iwl_tfd_frame_data {
#define IWL_tb2_len_SYM val2
} __attribute__ ((packed));
struct iwl_tfd_frame {
struct iwl4965_tfd_frame {
__le32 val0;
/* __le32 rsvd1:24; */
/* __le32 num_tbs:5; */
......@@ -1165,7 +1165,7 @@ struct iwl_tfd_frame {
#define IWL_num_tbs_SYM val0
/* __le32 rsvd2:1; */
/* __le32 padding:2; */
struct iwl_tfd_frame_data pa[10];
struct iwl4965_tfd_frame_data pa[10];
__le32 reserved;
} __attribute__ ((packed));
......@@ -1191,9 +1191,9 @@ struct iwl4965_sched_queue_byte_cnt_tbl {
sizeof(__le16)];
} __attribute__ ((packed));
/* Base physical address of iwl_shared is provided to KDR_SCD_DRAM_BASE_ADDR
* and &iwl_shared.val0 is provided to FH_RSCSR_CHNL0_STTS_WPTR_REG */
struct iwl_shared {
/* Base physical address of iwl4965_shared is provided to KDR_SCD_DRAM_BASE_ADDR
* and &iwl4965_shared.val0 is provided to FH_RSCSR_CHNL0_STTS_WPTR_REG */
struct iwl4965_shared {
struct iwl4965_sched_queue_byte_cnt_tbl
queues_byte_cnt_tbls[IWL_MAX_NUM_QUEUES];
__le32 val0;
......@@ -1225,4 +1225,4 @@ struct iwl_shared {
__le32 padding2;
} __attribute__ ((packed));
#endif /* __iwl_4965_hw_h__ */
#endif /* __iwl4965_4965_hw_h__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册