Go back –> iwl4965 kerneldoc

iwl4965_load_bsm - Load bootstrap instructions

int iwl4965_load_bsm (struct iwl_priv * priv)

Arguments

BSM operation

The Bootstrap State Machine (BSM) stores a short bootstrap uCode program in special SRAM that does not power down during RFKILL. When powering back up after power-saving sleeps (or during initial uCode load), the BSM loads the bootstrap program into the on-board processor, and starts it.

The bootstrap program loads (via DMA) instructions and data for a new program from host DRAM locations indicated by the host driver in the BSM_DRAM_* registers. Once the new program is loaded, it starts automatically.

When initializing the NIC, the host driver points the BSM to the "initialize" uCode image. This uCode sets up some internal data, then notifies host via "initialize alive" that it is complete.

The host then replaces the BSM_DRAM_* pointer values to point to the normal runtime uCode instructions and a backup uCode data cache buffer (filled initially with starting data values for the on-board processor), then triggers the "initialize" uCode to load and launch the runtime uCode, which begins normal operation.

When doing a power-save shutdown, runtime uCode saves data SRAM into the backup data cache in DRAM before SRAM is powered down.

When powering back up, the BSM loads the bootstrap program. This reloads the runtime uCode instructions and the backup data cache into SRAM, and re-launches the runtime uCode from where it left off.


iwl4965_set_ucode_ptrs - Set uCode address location

int iwl4965_set_ucode_ptrs (struct iwl_priv * priv)

Arguments

Description

Tell initialization uCode where to find runtime uCode.

BSM registers initially contain pointers to initialization uCode. We need to replace them to load runtime uCode inst and data, and to save runtime data when powering down.


iwl4965_init_alive_start - Called after REPLY_ALIVE notification received

void iwl4965_init_alive_start (struct iwl_priv * priv)

Arguments

Description

Called after REPLY_ALIVE notification received from "initialize" uCode.

The 4965 "initialize" ALIVE reply contains calibration data for: Voltage, temperature, and MIMO tx gain correction, now stored in priv (3945 does not contain this data).

Tell "initialize" uCode to go ahead and load the runtime uCode.


iwl4965_tx_queue_set_status - (optionally) start Tx/Cmd queue

void iwl4965_tx_queue_set_status (struct iwl_priv * priv, struct iwl_tx_queue * txq, int tx_fifo_id, int scd_retry)

Arguments

tx_fifo_id
Tx DMA/FIFO channel (range 0-7) that the queue will feed
scd_retry
(1) Indicates queue will be used in aggregation mode

NOTE

Acquire priv->lock before calling this function !

iwl4965_hw_set_hw_params -

int iwl4965_hw_set_hw_params (struct iwl_priv * priv)

Arguments

Description

Called when initializing driver


iwl4965_get_voltage_compensation - Power supply voltage comp for txpower

s32 iwl4965_get_voltage_compensation (s32 eeprom_voltage, s32 current_voltage)

Arguments

Description

Determines power supply voltage compensation for txpower calculations. Returns number of 1/2-dB steps to subtract from gain table index, to compensate for difference between power supply voltage during factory measurements, vs. current power supply voltage.

Voltage indication is higher for lower voltage. Lower voltage requires more gain (lower gain table index).


iwl4965_interpolate_chan - Interpolate factory measurements for one channel

int iwl4965_interpolate_chan (struct iwl_priv * priv, u32 channel, struct iwl_eeprom_calib_ch_info * chan_info)

Arguments

Description

Interpolates factory measurements from the two sample channels within a sub-band, to apply to channel of interest. Interpolation is proportional to differences in channel frequencies, which is proportional to differences in channel number.


iwl4965_send_tx_power - Configure the TXPOWER level user limit

int iwl4965_send_tx_power (struct iwl_priv * priv)

Arguments

Description

Uses the active RXON for channel, band, and characteristics (ht40, high) The power limit is taken from priv->tx_power_user_lmt.


iwl4965_txq_update_byte_cnt_tbl - Set up entry in Tx byte-count array

void iwl4965_txq_update_byte_cnt_tbl (struct iwl_priv * priv, struct iwl_tx_queue * txq, u16 byte_cnt)

Arguments


sign_extend - Sign extend a value using specified bit as sign-bit

s32 sign_extend (u32 oper, int index)

Arguments

Example

sign_extend(9, 3) would return -7 as bit3 of 1001b is 1 and bit0..2 is 001b which when sign extended to 1111111111111001b is -7.

param oper value to sign extend param index 0 based bit index (0<=index<32) to sign bit


iwl4965_hw_get_temperature - return the calibrated temperature (in Kelvin)

int iwl4965_hw_get_temperature (struct iwl_priv * priv)

Arguments

Description

A return of <0 indicates bogus data in the statistics

iwl4965_is_temp_calib_needed - determines if new calibration is needed

int iwl4965_is_temp_calib_needed (struct iwl_priv * priv)

Arguments

Description

If the temperature changed has changed sufficiently, then a recalibration is needed.

Assumes caller will replace priv->last_temperature once calibration executed.


iwl4965_tx_queue_stop_scheduler - Stop queue, but keep configuration

void iwl4965_tx_queue_stop_scheduler (struct iwl_priv * priv, u16 txq_id)

Arguments


iwl4965_txq_agg_disable - priv-\\\gt;lock must be held by the caller

int iwl4965_txq_agg_disable (struct iwl_priv * priv, u16 txq_id, u16 ssn_idx, u8 tx_fifo)

Arguments


iwl4965_tx_queue_set_q2ratid - Map unique receiver/tid combination to a queue

int iwl4965_tx_queue_set_q2ratid (struct iwl_priv * priv, u16 ra_tid, u16 txq_id)

Arguments


iwl4965_txq_agg_enable - Set up \\\amp; enable aggregation for selected queue

int iwl4965_txq_agg_enable (struct iwl_priv * priv, int txq_id, int tx_fifo, int sta_id, int tid, u16 ssn_idx)

Arguments

NOTE

txq_id must be greater than IWL49_FIRST_AMPDU_QUEUE, i.e. it must be one of the higher queues used for aggregation

iwl4965_tx_status_reply_tx - Handle Tx response for frames in aggregation queue

int iwl4965_tx_status_reply_tx (struct iwl_priv * priv, struct iwl_ht_agg * agg, struct iwl4965_tx_resp * tx_resp, int txq_id, u16 start_idx)

Arguments


iwl4965_rx_reply_tx - Handle standard (non-aggregation) Tx response

void iwl4965_rx_reply_tx (struct iwl_priv * priv, struct iwl_rx_mem_buffer * rxb)

Arguments