Lines Matching +full:clip +full:- +full:x +full:- +full:high
1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright(c) 2003 - 2011 Intel Corporation. All rights reserved.
8 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
16 #include <linux/dma-mapping.h>
94 * il3945_disable_events - Disable selected events in uCode event log
99 * Use for only special debugging. This function is just a placeholder as-is,
107 u32 disable_ptr; /* SRAM address of event-disable bitmap array */ in il3945_disable_events()
110 0x00000000, /* 31 - 0 Event id numbers */ in il3945_disable_events()
111 0x00000000, /* 63 - 32 */ in il3945_disable_events()
112 0x00000000, /* 95 - 64 */ in il3945_disable_events()
113 0x00000000, /* 127 - 96 */ in il3945_disable_events()
114 0x00000000, /* 159 - 128 */ in il3945_disable_events()
115 0x00000000, /* 191 - 160 */ in il3945_disable_events()
116 0x00000000, /* 223 - 192 */ in il3945_disable_events()
117 0x00000000, /* 255 - 224 */ in il3945_disable_events()
118 0x00000000, /* 287 - 256 */ in il3945_disable_events()
119 0x00000000, /* 319 - 288 */ in il3945_disable_events()
120 0x00000000, /* 351 - 320 */ in il3945_disable_events()
121 0x00000000, /* 383 - 352 */ in il3945_disable_events()
122 0x00000000, /* 415 - 384 */ in il3945_disable_events()
123 0x00000000, /* 447 - 416 */ in il3945_disable_events()
124 0x00000000, /* 479 - 448 */ in il3945_disable_events()
125 0x00000000, /* 511 - 480 */ in il3945_disable_events()
126 0x00000000, /* 543 - 512 */ in il3945_disable_events()
127 0x00000000, /* 575 - 544 */ in il3945_disable_events()
128 0x00000000, /* 607 - 576 */ in il3945_disable_events()
129 0x00000000, /* 639 - 608 */ in il3945_disable_events()
130 0x00000000, /* 671 - 640 */ in il3945_disable_events()
131 0x00000000, /* 703 - 672 */ in il3945_disable_events()
132 0x00000000, /* 735 - 704 */ in il3945_disable_events()
133 0x00000000, /* 767 - 736 */ in il3945_disable_events()
134 0x00000000, /* 799 - 768 */ in il3945_disable_events()
135 0x00000000, /* 831 - 800 */ in il3945_disable_events()
136 0x00000000, /* 863 - 832 */ in il3945_disable_events()
137 0x00000000, /* 895 - 864 */ in il3945_disable_events()
138 0x00000000, /* 927 - 896 */ in il3945_disable_events()
139 0x00000000, /* 959 - 928 */ in il3945_disable_events()
140 0x00000000, /* 991 - 960 */ in il3945_disable_events()
141 0x00000000, /* 1023 - 992 */ in il3945_disable_events()
142 0x00000000, /* 1055 - 1024 */ in il3945_disable_events()
143 0x00000000, /* 1087 - 1056 */ in il3945_disable_events()
144 0x00000000, /* 1119 - 1088 */ in il3945_disable_events()
145 0x00000000, /* 1151 - 1120 */ in il3945_disable_events()
146 0x00000000, /* 1183 - 1152 */ in il3945_disable_events()
147 0x00000000, /* 1215 - 1184 */ in il3945_disable_events()
148 0x00000000, /* 1247 - 1216 */ in il3945_disable_events()
149 0x00000000, /* 1279 - 1248 */ in il3945_disable_events()
150 0x00000000, /* 1311 - 1280 */ in il3945_disable_events()
151 0x00000000, /* 1343 - 1312 */ in il3945_disable_events()
152 0x00000000, /* 1375 - 1344 */ in il3945_disable_events()
153 0x00000000, /* 1407 - 1376 */ in il3945_disable_events()
154 0x00000000, /* 1439 - 1408 */ in il3945_disable_events()
155 0x00000000, /* 1471 - 1440 */ in il3945_disable_events()
156 0x00000000, /* 1503 - 1472 */ in il3945_disable_events()
159 base = le32_to_cpu(il->card_alive.log_event_table_ptr); in il3945_disable_events()
161 IL_ERR("Invalid event log pointer 0x%08X\n", base); in il3945_disable_events()
169 D_INFO("Disabling selected uCode log events at 0x%x\n", in il3945_disable_events()
178 D_INFO(" in SRAM at 0x%x, size %d u32s\n", disable_ptr, in il3945_disable_events()
192 return -1; in il3945_hwrate_to_plcp_idx()
196 #define TX_STATUS_ENTRY(x) case TX_3945_STATUS_FAIL_ ## x: return #x argument
242 switch (il->band) { in il3945_rs_next_rate()
250 if (!(il->_3945.sta_supp_rates & IL_OFDM_RATES_MASK) && in il3945_rs_next_rate()
265 * il3945_tx_queue_reclaim - Reclaim Tx queue entries already Tx'd
274 struct il_tx_queue *txq = &il->txq[txq_id]; in il3945_tx_queue_reclaim()
275 struct il_queue *q = &txq->q; in il3945_tx_queue_reclaim()
280 for (idx = il_queue_inc_wrap(idx, q->n_bd); q->read_ptr != idx; in il3945_tx_queue_reclaim()
281 q->read_ptr = il_queue_inc_wrap(q->read_ptr, q->n_bd)) { in il3945_tx_queue_reclaim()
283 skb = txq->skbs[txq->q.read_ptr]; in il3945_tx_queue_reclaim()
284 ieee80211_tx_status_irqsafe(il->hw, skb); in il3945_tx_queue_reclaim()
285 txq->skbs[txq->q.read_ptr] = NULL; in il3945_tx_queue_reclaim()
286 il->ops->txq_free_tfd(il, txq); in il3945_tx_queue_reclaim()
289 if (il_queue_space(q) > q->low_mark && txq_id >= 0 && in il3945_tx_queue_reclaim()
290 txq_id != IL39_CMD_QUEUE_NUM && il->mac80211_registered) in il3945_tx_queue_reclaim()
295 * il3945_hdl_tx - Handle Tx response
301 u16 sequence = le16_to_cpu(pkt->hdr.sequence); in il3945_hdl_tx()
304 struct il_tx_queue *txq = &il->txq[txq_id]; in il3945_hdl_tx()
306 struct il3945_tx_resp *tx_resp = (void *)&pkt->u.raw[0]; in il3945_hdl_tx()
307 u32 status = le32_to_cpu(tx_resp->status); in il3945_hdl_tx()
311 if (idx >= txq->q.n_bd || il_queue_used(&txq->q, idx) == 0) { in il3945_hdl_tx()
313 "is out of range [0-%d] %d %d\n", txq_id, idx, in il3945_hdl_tx()
314 txq->q.n_bd, txq->q.write_ptr, txq->q.read_ptr); in il3945_hdl_tx()
326 il->iw_mode == NL80211_IFTYPE_STATION) { in il3945_hdl_tx()
328 D_INFO("Stopped queues - RX waiting on passive channel\n"); in il3945_hdl_tx()
331 txq->time_stamp = jiffies; in il3945_hdl_tx()
332 info = IEEE80211_SKB_CB(txq->skbs[txq->q.read_ptr]); in il3945_hdl_tx()
335 /* Fill the MRR chain with some info about on-chip retransmissions */ in il3945_hdl_tx()
336 rate_idx = il3945_hwrate_to_plcp_idx(tx_resp->rate); in il3945_hdl_tx()
337 if (info->band == NL80211_BAND_5GHZ) in il3945_hdl_tx()
338 rate_idx -= IL_FIRST_OFDM_RATE; in il3945_hdl_tx()
340 fail = tx_resp->failure_frame; in il3945_hdl_tx()
342 info->status.rates[0].idx = rate_idx; in il3945_hdl_tx()
343 info->status.rates[0].count = fail + 1; /* add final attempt */ in il3945_hdl_tx()
345 /* tx_status->rts_retry_count = tx_resp->failure_rts; */ in il3945_hdl_tx()
346 info->flags |= in il3945_hdl_tx()
350 D_TX("Tx queue %d Status %s (0x%08x) plcp rate %d retries %d\n", txq_id, in il3945_hdl_tx()
351 il3945_get_tx_fail_reason(status), status, tx_resp->rate, in il3945_hdl_tx()
352 tx_resp->failure_frame); in il3945_hdl_tx()
377 prev_stats = (__le32 *) &il->_3945.stats; in il3945_accumulative_stats()
378 accum_stats = (u32 *) &il->_3945.accum_stats; in il3945_accumulative_stats()
379 delta = (u32 *) &il->_3945.delta_stats; in il3945_accumulative_stats()
380 max_delta = (u32 *) &il->_3945.max_delta; in il3945_accumulative_stats()
388 (le32_to_cpu(*stats) - le32_to_cpu(*prev_stats)); in il3945_accumulative_stats()
395 /* reset accumulative stats for "no-counter" type stats */ in il3945_accumulative_stats()
396 il->_3945.accum_stats.general.temperature = in il3945_accumulative_stats()
397 il->_3945.stats.general.temperature; in il3945_accumulative_stats()
398 il->_3945.accum_stats.general.ttl_timestamp = in il3945_accumulative_stats()
399 il->_3945.stats.general.ttl_timestamp; in il3945_accumulative_stats()
410 le32_to_cpu(pkt->len_n_flags) & IL_RX_FRAME_SIZE_MSK); in il3945_hdl_stats()
412 il3945_accumulative_stats(il, (__le32 *) &pkt->u.raw); in il3945_hdl_stats()
415 memcpy(&il->_3945.stats, pkt->u.raw, sizeof(il->_3945.stats)); in il3945_hdl_stats()
422 __le32 *flag = (__le32 *) &pkt->u.raw; in il3945_hdl_c_stats()
426 memset(&il->_3945.accum_stats, 0, in il3945_hdl_c_stats()
428 memset(&il->_3945.delta_stats, 0, in il3945_hdl_c_stats()
430 memset(&il->_3945.max_delta, 0, in il3945_hdl_c_stats()
450 switch (il->iw_mode) { in il3945_is_network_packet()
453 return ether_addr_equal_64bits(header->addr3, il->bssid); in il3945_is_network_packet()
456 return ether_addr_equal_64bits(header->addr2, il->bssid); in il3945_is_network_packet()
472 u32 len = le16_to_cpu(rx_hdr->len); in il3945_pass_packet_to_mac80211()
474 __le16 fc = hdr->frame_control; in il3945_pass_packet_to_mac80211()
475 u32 fraglen = PAGE_SIZE << il->hw_params.rx_page_order; in il3945_pass_packet_to_mac80211()
484 if (unlikely(!il->is_open)) { in il3945_pass_packet_to_mac80211()
489 if (unlikely(test_bit(IL_STOP_REASON_PASSIVE, &il->stop_reason))) { in il3945_pass_packet_to_mac80211()
491 D_INFO("Woke queues - frame received on passive channel\n"); in il3945_pass_packet_to_mac80211()
502 le32_to_cpu(rx_end->status), stats); in il3945_pass_packet_to_mac80211()
504 /* If frame is small enough to fit into skb->head, copy it in il3945_pass_packet_to_mac80211()
508 skb_put_data(skb, rx_hdr->payload, len); in il3945_pass_packet_to_mac80211()
510 skb_add_rx_frag(skb, 0, rxb->page, in il3945_pass_packet_to_mac80211()
511 (void *)rx_hdr->payload - (void *)pkt, len, in il3945_pass_packet_to_mac80211()
513 il->alloc_rxb_page--; in il3945_pass_packet_to_mac80211()
514 rxb->page = NULL; in il3945_pass_packet_to_mac80211()
519 ieee80211_rx(il->hw, skb); in il3945_pass_packet_to_mac80211()
533 u16 rx_stats_sig_avg __maybe_unused = le16_to_cpu(rx_stats->sig_avg); in il3945_hdl_rx()
535 le16_to_cpu(rx_stats->noise_diff); in il3945_hdl_rx()
539 rx_status.mactime = le64_to_cpu(rx_end->timestamp); in il3945_hdl_rx()
541 (rx_hdr-> in il3945_hdl_rx()
545 ieee80211_channel_to_frequency(le16_to_cpu(rx_hdr->channel), in il3945_hdl_rx()
548 rx_status.rate_idx = il3945_hwrate_to_plcp_idx(rx_hdr->rate); in il3945_hdl_rx()
550 rx_status.rate_idx -= IL_FIRST_OFDM_RATE; in il3945_hdl_rx()
553 (le16_to_cpu(rx_hdr->phy_flags) & RX_RES_PHY_FLAGS_ANTENNA_MSK) >> in il3945_hdl_rx()
557 if (rx_hdr->phy_flags & RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK) in il3945_hdl_rx()
560 if ((unlikely(rx_stats->phy_count > 20))) { in il3945_hdl_rx()
562 rx_stats->phy_count); in il3945_hdl_rx()
566 if (!(rx_end->status & RX_RES_STATUS_NO_CRC32_ERROR) || in il3945_hdl_rx()
567 !(rx_end->status & RX_RES_STATUS_NO_RXE_OVERFLOW)) { in il3945_hdl_rx()
568 D_RX("Bad CRC or FIFO: 0x%08X.\n", rx_end->status); in il3945_hdl_rx()
573 rx_status.signal = rx_stats->rssi - IL39_RSSI_OFFSET; in il3945_hdl_rx()
583 network_packet ? '*' : ' ', le16_to_cpu(rx_hdr->channel), in il3945_hdl_rx()
587 il->_3945.last_beacon_time = in il3945_hdl_rx()
588 le32_to_cpu(rx_end->beacon_timestamp); in il3945_hdl_rx()
589 il->_3945.last_tsf = le64_to_cpu(rx_end->timestamp); in il3945_hdl_rx()
590 il->_3945.last_rx_rssi = rx_status.signal; in il3945_hdl_rx()
604 q = &txq->q; in il3945_hw_txq_attach_buf_to_tfd()
605 tfd_tmp = (struct il3945_tfd *)txq->tfds; in il3945_hw_txq_attach_buf_to_tfd()
606 tfd = &tfd_tmp[q->write_ptr]; in il3945_hw_txq_attach_buf_to_tfd()
611 count = TFD_CTL_COUNT_GET(le32_to_cpu(tfd->control_flags)); in il3945_hw_txq_attach_buf_to_tfd()
616 return -EINVAL; in il3945_hw_txq_attach_buf_to_tfd()
619 tfd->tbs[count].addr = cpu_to_le32(addr); in il3945_hw_txq_attach_buf_to_tfd()
620 tfd->tbs[count].len = cpu_to_le32(len); in il3945_hw_txq_attach_buf_to_tfd()
624 tfd->control_flags = in il3945_hw_txq_attach_buf_to_tfd()
631 * il3945_hw_txq_free_tfd - Free one TFD, those at idx [txq->q.read_ptr]
638 struct il3945_tfd *tfd_tmp = (struct il3945_tfd *)txq->tfds; in il3945_hw_txq_free_tfd()
639 int idx = txq->q.read_ptr; in il3945_hw_txq_free_tfd()
641 struct pci_dev *dev = il->pci_dev; in il3945_hw_txq_free_tfd()
646 counter = TFD_CTL_COUNT_GET(le32_to_cpu(tfd->control_flags)); in il3945_hw_txq_free_tfd()
655 dma_unmap_single(&dev->dev, in il3945_hw_txq_free_tfd()
656 dma_unmap_addr(&txq->meta[idx], mapping), in il3945_hw_txq_free_tfd()
657 dma_unmap_len(&txq->meta[idx], len), in il3945_hw_txq_free_tfd()
663 dma_unmap_single(&dev->dev, le32_to_cpu(tfd->tbs[i].addr), in il3945_hw_txq_free_tfd()
664 le32_to_cpu(tfd->tbs[i].len), DMA_TO_DEVICE); in il3945_hw_txq_free_tfd()
667 if (txq->skbs) { in il3945_hw_txq_free_tfd()
668 struct sk_buff *skb = txq->skbs[txq->q.read_ptr]; in il3945_hw_txq_free_tfd()
670 /* can be called from irqs-disabled context */ in il3945_hw_txq_free_tfd()
673 txq->skbs[txq->q.read_ptr] = NULL; in il3945_hw_txq_free_tfd()
679 * il3945_hw_build_tx_cmd_rate - Add rate portion to TX_CMD:
687 u16 hw_value = ieee80211_get_tx_rate(il->hw, info)->hw_value; in il3945_hw_build_tx_cmd_rate()
688 u16 rate_idx = min(hw_value & 0xffff, RATE_COUNT_3945 - 1); in il3945_hw_build_tx_cmd_rate()
694 __le16 fc = hdr->frame_control; in il3945_hw_build_tx_cmd_rate()
695 struct il3945_tx_cmd *tx_cmd = (struct il3945_tx_cmd *)cmd->cmd.payload; in il3945_hw_build_tx_cmd_rate()
698 tx_flags = tx_cmd->tx_flags; in il3945_hw_build_tx_cmd_rate()
700 /* We need to figure out how to get the sta->supp_rates while in il3945_hw_build_tx_cmd_rate()
709 tx_cmd->data_retry_limit = data_retry_limit; in il3945_hw_build_tx_cmd_rate()
711 tx_cmd->rts_retry_limit = min(data_retry_limit, rts_retry_limit); in il3945_hw_build_tx_cmd_rate()
713 tx_cmd->rate = rate; in il3945_hw_build_tx_cmd_rate()
714 tx_cmd->tx_flags = tx_flags; in il3945_hw_build_tx_cmd_rate()
717 tx_cmd->supp_rates[0] = in il3945_hw_build_tx_cmd_rate()
721 tx_cmd->supp_rates[1] = (rate_mask & 0xF); in il3945_hw_build_tx_cmd_rate()
723 D_RATE("Tx sta id: %d, rate: %d (plcp), flags: 0x%4X " in il3945_hw_build_tx_cmd_rate()
724 "cck/ofdm mask: 0x%x/0x%x\n", sta_id, tx_cmd->rate, in il3945_hw_build_tx_cmd_rate()
725 le32_to_cpu(tx_cmd->tx_flags), tx_cmd->supp_rates[1], in il3945_hw_build_tx_cmd_rate()
726 tx_cmd->supp_rates[0]); in il3945_hw_build_tx_cmd_rate()
738 spin_lock_irqsave(&il->sta_lock, flags_spin); in il3945_sync_sta()
739 station = &il->stations[sta_id]; in il3945_sync_sta()
741 station->sta.sta.modify_mask = STA_MODIFY_TX_RATE_MSK; in il3945_sync_sta()
742 station->sta.rate_n_flags = cpu_to_le16(tx_rate); in il3945_sync_sta()
743 station->sta.mode = STA_CONTROL_MODIFY_MSK; in il3945_sync_sta()
744 il_send_add_sta(il, &station->sta, CMD_ASYNC); in il3945_sync_sta()
745 spin_unlock_irqrestore(&il->sta_lock, flags_spin); in il3945_sync_sta()
758 if (pci_pme_capable(il->pci_dev, PCI_D3cold)) { in il3945_set_pwr_vmain()
780 il_wr(il, FH39_RCSR_RBD_BASE(0), rxq->bd_dma); in il3945_rx_init()
781 il_wr(il, FH39_RCSR_RPTR_ADDR(0), rxq->rb_stts_dma); in il3945_rx_init()
817 il_wr(il, FH39_TSSR_CBB_BASE, il->_3945.shared_phys); in il3945_tx_reset()
832 * il3945_txq_ctx_reset - Reset TX queue context
854 for (txq_id = 0; txq_id < il->hw_params.max_txq_num; txq_id++) { in il3945_txq_ctx_reset()
894 struct il3945_eeprom *eeprom = (struct il3945_eeprom *)il->eeprom; in il3945_nic_config()
896 u8 rev_id = il->pci_dev->revision; in il3945_nic_config()
898 spin_lock_irqsave(&il->lock, flags); in il3945_nic_config()
901 D_INFO("HW Revision ID = 0x%X\n", rev_id); in il3945_nic_config()
906 D_INFO("3945 RADIO-MB type\n"); in il3945_nic_config()
910 D_INFO("3945 RADIO-MM type\n"); in il3945_nic_config()
915 if (EEPROM_SKU_CAP_OP_MODE_MRC == eeprom->sku_cap) { in il3945_nic_config()
922 if ((eeprom->board_revision & 0xF0) == 0xD0) { in il3945_nic_config()
923 D_INFO("3945ABG revision is 0x%X\n", eeprom->board_revision); in il3945_nic_config()
927 D_INFO("3945ABG revision is 0x%X\n", eeprom->board_revision); in il3945_nic_config()
932 if (eeprom->almgor_m_version <= 1) { in il3945_nic_config()
935 D_INFO("Card M type A version is 0x%X\n", in il3945_nic_config()
936 eeprom->almgor_m_version); in il3945_nic_config()
938 D_INFO("Card M type B version is 0x%X\n", in il3945_nic_config()
939 eeprom->almgor_m_version); in il3945_nic_config()
943 spin_unlock_irqrestore(&il->lock, flags); in il3945_nic_config()
945 if (eeprom->sku_cap & EEPROM_SKU_CAP_SW_RF_KILL_ENABLE) in il3945_nic_config()
948 if (eeprom->sku_cap & EEPROM_SKU_CAP_HW_RF_KILL_ENABLE) in il3945_nic_config()
957 struct il_rx_queue *rxq = &il->rxq; in il3945_hw_nic_init()
959 spin_lock_irqsave(&il->lock, flags); in il3945_hw_nic_init()
961 spin_unlock_irqrestore(&il->lock, flags); in il3945_hw_nic_init()
967 if (!rxq->bd) { in il3945_hw_nic_init()
971 return -ENOMEM; in il3945_hw_nic_init()
981 rxq->need_update = 1; in il3945_hw_nic_init()
985 il_wr(il, FH39_RCSR_WPTR(0), rxq->write & ~7); in il3945_hw_nic_init()
991 set_bit(S_INIT, &il->status); in il3945_hw_nic_init()
997 * il3945_hw_txq_ctx_free - Free TXQ Context
1007 if (il->txq) { in il3945_hw_txq_ctx_free()
1008 for (txq_id = 0; txq_id < il->hw_params.max_txq_num; txq_id++) in il3945_hw_txq_ctx_free()
1029 for (txq_id = 0; txq_id < il->hw_params.max_txq_num; txq_id++) { in il3945_hw_txq_ctx_stop()
1045 return (new_reading - old_reading) * (-11) / 100; in il3945_hw_reg_adjust_power_by_temp()
1049 * il3945_hw_reg_temp_out_of_range - Keep temperature in sane range
1054 return (temperature < -260 || temperature > 25) ? 1 : 0; in il3945_hw_reg_temp_out_of_range()
1070 struct il3945_eeprom *eeprom = (struct il3945_eeprom *)il->eeprom; in il3945_hw_reg_txpower_get_temperature()
1075 /* driver's okay range is -260 to +25. in il3945_hw_reg_txpower_get_temperature()
1085 if (il->last_temperature > 100) in il3945_hw_reg_txpower_get_temperature()
1086 temperature = eeprom->groups[2].temperature; in il3945_hw_reg_txpower_get_temperature()
1088 temperature = il->last_temperature; in il3945_hw_reg_txpower_get_temperature()
1100 * il3945_is_temp_calib_needed - determines if new calibration is needed
1102 * records new temperature in tx_mgr->temperature.
1103 * replaces tx_mgr->last_temperature *only* if calib needed
1110 il->temperature = il3945_hw_reg_txpower_get_temperature(il); in il3945_is_temp_calib_needed()
1111 temp_diff = il->temperature - il->last_temperature; in il3945_is_temp_calib_needed()
1116 temp_diff = -temp_diff; in il3945_is_temp_calib_needed()
1132 il->last_temperature = il->temperature; in il3945_is_temp_calib_needed()
1137 #define IL_CCK_FROM_OFDM_POWER_DIFF -5
1141 * 1st number is for RF analog gain, 2nd number is for DSP pre-DAC gain. */
1224 {251, 127}, /* 5.x GHz, highest power */
1301 {3, 120} /* 5.x GHz, lowest power */
1311 return IL_MAX_GAIN_ENTRIES - 1; in il3945_hw_reg_fix_power_idx()
1319 * il3945_hw_reg_set_scan_power - Set Tx power for scan probe requests
1333 scan_power_info = &ch_info->scan_pwr_info[scan_tbl_idx]; in il3945_hw_reg_set_scan_power()
1338 power = min(ch_info->scan_power, clip_pwrs[RATE_6M_IDX_TBL]); in il3945_hw_reg_set_scan_power()
1340 power = min(power, il->tx_power_user_lmt); in il3945_hw_reg_set_scan_power()
1341 scan_power_info->requested_power = power; in il3945_hw_reg_set_scan_power()
1345 * current "normal" temperature-compensated Tx power *idx* for in il3945_hw_reg_set_scan_power()
1346 * this rate (1Mb or 6Mb) to yield new temp-compensated scan power in il3945_hw_reg_set_scan_power()
1349 ch_info->power_info[rate_idx].power_table_idx - (power - in il3945_hw_reg_set_scan_power()
1350 ch_info-> in il3945_hw_reg_set_scan_power()
1368 scan_power_info->power_table_idx = power_idx; in il3945_hw_reg_set_scan_power()
1369 scan_power_info->tpc.tx_gain = in il3945_hw_reg_set_scan_power()
1371 scan_power_info->tpc.dsp_atten = in il3945_hw_reg_set_scan_power()
1376 * il3945_send_tx_power - fill in Tx Power command with gain settings
1387 .channel = il->active.channel, in il3945_send_tx_power()
1392 (test_bit(S_SCAN_HW, &il->status), in il3945_send_tx_power()
1394 return -EAGAIN; in il3945_send_tx_power()
1396 chan = le16_to_cpu(il->active.channel); in il3945_send_tx_power()
1398 txpower.band = (il->band == NL80211_BAND_5GHZ) ? 0 : 1; in il3945_send_tx_power()
1399 ch_info = il_get_channel_info(il, il->band, chan); in il3945_send_tx_power()
1402 il->band); in il3945_send_tx_power()
1403 return -EINVAL; in il3945_send_tx_power()
1407 D_POWER("Not calling TX_PWR_TBL_CMD on " "non-Tx channel.\n"); in il3945_send_tx_power()
1416 txpower.power[i].tpc = ch_info->power_info[i].tpc; in il3945_send_tx_power()
1419 D_POWER("ch %d:%d rf %d dsp %3d rate code 0x%02x\n", in il3945_send_tx_power()
1427 txpower.power[i].tpc = ch_info->power_info[i].tpc; in il3945_send_tx_power()
1430 D_POWER("ch %d:%d rf %d dsp %3d rate code 0x%02x\n", in il3945_send_tx_power()
1443 * il3945_hw_reg_set_new_power - Configures power tables at new levels
1450 * Takes into account h/w and modulation limitations (clip power).
1467 /* Get this chnlgrp's rate-to-max/clip-powers table */ in il3945_hw_reg_set_new_power()
1468 clip_pwrs = il->_3945.clip_groups[ch_info->group_idx].clip_powers; in il3945_hw_reg_set_new_power()
1470 /* Get this channel's rate-to-current-power settings table */ in il3945_hw_reg_set_new_power()
1471 power_info = ch_info->power_info; in il3945_hw_reg_set_new_power()
1478 power = min(ch_info->curr_txpow, clip_pwrs[i]); in il3945_hw_reg_set_new_power()
1479 if (power == power_info->requested_power) in il3945_hw_reg_set_new_power()
1483 * update base (non-temp-compensated) power idx */ in il3945_hw_reg_set_new_power()
1484 delta_idx = (power - power_info->requested_power) * 2; in il3945_hw_reg_set_new_power()
1485 power_info->base_power_idx -= delta_idx; in il3945_hw_reg_set_new_power()
1488 power_info->requested_power = power; in il3945_hw_reg_set_new_power()
1497 ch_info->power_info[RATE_12M_IDX_TBL].requested_power + in il3945_hw_reg_set_new_power()
1502 power_info->requested_power = power; in il3945_hw_reg_set_new_power()
1503 power_info->base_power_idx = in il3945_hw_reg_set_new_power()
1504 ch_info->power_info[RATE_12M_IDX_TBL]. in il3945_hw_reg_set_new_power()
1514 * il3945_hw_reg_get_ch_txpower_limit - returns new power limit for channel
1527 if (ch_info->tgd_data.max_power != 0) in il3945_hw_reg_get_ch_txpower_limit()
1529 min(ch_info->tgd_data.max_power, in il3945_hw_reg_get_ch_txpower_limit()
1530 ch_info->eeprom.max_power_avg); in il3945_hw_reg_get_ch_txpower_limit()
1535 max_power = ch_info->eeprom.max_power_avg; in il3945_hw_reg_get_ch_txpower_limit()
1537 return min(max_power, ch_info->max_power_avg); in il3945_hw_reg_get_ch_txpower_limit()
1541 * il3945_hw_reg_comp_txpower_temp - Compensate for temperature
1554 struct il3945_eeprom *eeprom = (struct il3945_eeprom *)il->eeprom; in il3945_hw_reg_comp_txpower_temp()
1562 int temperature = il->temperature; in il3945_hw_reg_comp_txpower_temp()
1564 if (il->disable_tx_power_cal || test_bit(S_SCANNING, &il->status)) { in il3945_hw_reg_comp_txpower_temp()
1568 /* set up new Tx power info for each and every channel, 2.4 and 5.x */ in il3945_hw_reg_comp_txpower_temp()
1569 for (i = 0; i < il->channel_count; i++) { in il3945_hw_reg_comp_txpower_temp()
1570 ch_info = &il->channel_info[i]; in il3945_hw_reg_comp_txpower_temp()
1574 ref_temp = (s16) eeprom->groups[ch_info->group_idx].temperature; in il3945_hw_reg_comp_txpower_temp()
1584 ch_info->power_info[rate_idx].base_power_idx; in il3945_hw_reg_comp_txpower_temp()
1591 ch_info->power_info[rate_idx].power_table_idx = in il3945_hw_reg_comp_txpower_temp()
1593 ch_info->power_info[rate_idx].tpc = in il3945_hw_reg_comp_txpower_temp()
1597 /* Get this chnlgrp's rate-to-max/clip-powers table */ in il3945_hw_reg_comp_txpower_temp()
1599 il->_3945.clip_groups[ch_info->group_idx].clip_powers; in il3945_hw_reg_comp_txpower_temp()
1614 return il->ops->send_tx_power(il); in il3945_hw_reg_comp_txpower_temp()
1624 if (il->tx_power_user_lmt == power) { in il3945_hw_reg_set_txpower()
1631 il->tx_power_user_lmt = power; in il3945_hw_reg_set_txpower()
1633 /* set up new Tx powers for each and every channel, 2.4 and 5.x */ in il3945_hw_reg_set_txpower()
1635 for (i = 0; i < il->channel_count; i++) { in il3945_hw_reg_set_txpower()
1636 ch_info = &il->channel_info[i]; in il3945_hw_reg_set_txpower()
1642 if (max_power != ch_info->curr_txpow) { in il3945_hw_reg_set_txpower()
1643 ch_info->curr_txpow = max_power; in il3945_hw_reg_set_txpower()
1670 const struct il_rxon_cmd *rxon1 = &il->staging; in il3945_send_rxon_assoc()
1671 const struct il_rxon_cmd *rxon2 = &il->active; in il3945_send_rxon_assoc()
1673 if (rxon1->flags == rxon2->flags && in il3945_send_rxon_assoc()
1674 rxon1->filter_flags == rxon2->filter_flags && in il3945_send_rxon_assoc()
1675 rxon1->cck_basic_rates == rxon2->cck_basic_rates && in il3945_send_rxon_assoc()
1676 rxon1->ofdm_basic_rates == rxon2->ofdm_basic_rates) { in il3945_send_rxon_assoc()
1681 rxon_assoc.flags = il->staging.flags; in il3945_send_rxon_assoc()
1682 rxon_assoc.filter_flags = il->staging.filter_flags; in il3945_send_rxon_assoc()
1683 rxon_assoc.ofdm_basic_rates = il->staging.ofdm_basic_rates; in il3945_send_rxon_assoc()
1684 rxon_assoc.cck_basic_rates = il->staging.cck_basic_rates; in il3945_send_rxon_assoc()
1692 if (pkt->hdr.flags & IL_CMD_FAILED_MSK) { in il3945_send_rxon_assoc()
1694 rc = -EIO; in il3945_send_rxon_assoc()
1703 * il3945_commit_rxon - commit staging_rxon to hardware
1714 struct il3945_rxon_cmd *active_rxon = (void *)&il->active; in il3945_commit_rxon()
1715 struct il3945_rxon_cmd *staging_rxon = (void *)&il->staging; in il3945_commit_rxon()
1717 bool new_assoc = !!(staging_rxon->filter_flags & RXON_FILTER_ASSOC_MSK); in il3945_commit_rxon()
1719 if (test_bit(S_EXIT_PENDING, &il->status)) in il3945_commit_rxon()
1720 return -EINVAL; in il3945_commit_rxon()
1723 return -1; in il3945_commit_rxon()
1726 staging_rxon->flags |= RXON_FLG_TSF2HOST_MSK; in il3945_commit_rxon()
1729 staging_rxon->flags &= ~(RXON_FLG_DIS_DIV_MSK | RXON_FLG_ANT_SEL_MSK); in il3945_commit_rxon()
1730 staging_rxon->flags |= il3945_get_antenna_flags(il); in il3945_commit_rxon()
1735 return -EINVAL; in il3945_commit_rxon()
1754 il_set_tx_power(il, il->tx_power_next, false); in il3945_commit_rxon()
1764 active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK; in il3945_commit_rxon()
1770 active_rxon->reserved4 = 0; in il3945_commit_rxon()
1771 active_rxon->reserved5 = 0; in il3945_commit_rxon()
1773 &il->active); in il3945_commit_rxon()
1778 active_rxon->filter_flags |= RXON_FILTER_ASSOC_MSK; in il3945_commit_rxon()
1789 le16_to_cpu(staging_rxon->channel), staging_rxon->bssid_addr); in il3945_commit_rxon()
1795 staging_rxon->reserved4 = 0; in il3945_commit_rxon()
1796 staging_rxon->reserved5 = 0; in il3945_commit_rxon()
1817 rc = il_set_tx_power(il, il->tx_power_next, true); in il3945_commit_rxon()
1826 IL_ERR("Error setting HW rate table: %02X\n", rc); in il3945_commit_rxon()
1827 return -EIO; in il3945_commit_rxon()
1834 * il3945_reg_txpower_periodic - called when time to check our temperature.
1836 * -- reset periodic timer
1837 * -- see if temp has changed enough to warrant re-calibration ... if so:
1838 * -- correct coeffs for temp (can reset temp timer)
1839 * -- save this temp as "last",
1840 * -- send new set of gain settings to NIC
1851 /* Set up a new set of temp-adjusted TxPowers, send to NIC. in il3945_reg_txpower_periodic()
1857 queue_delayed_work(il->workqueue, &il->_3945.thermal_periodic, in il3945_reg_txpower_periodic()
1867 mutex_lock(&il->mutex); in il3945_bg_reg_txpower_periodic()
1868 if (test_bit(S_EXIT_PENDING, &il->status) || il->txq == NULL) in il3945_bg_reg_txpower_periodic()
1873 mutex_unlock(&il->mutex); in il3945_bg_reg_txpower_periodic()
1877 * il3945_hw_reg_get_ch_grp_idx - find the channel-group idx (0-4) for channel.
1879 * This function is used when initializing channel-info structs.
1882 * These channel groups are based on factory-tested channels;
1883 * on A-band, EEPROM's "group frequency" entries represent the top
1884 * channel in each group 1-4. Group 5 All B/G channels are in group 0.
1890 struct il3945_eeprom *eeprom = (struct il3945_eeprom *)il->eeprom; in il3945_hw_reg_get_ch_grp_idx()
1891 struct il3945_eeprom_txpower_group *ch_grp = &eeprom->groups[0]; in il3945_hw_reg_get_ch_grp_idx()
1900 if (ch_info->channel <= grp_channel) { in il3945_hw_reg_get_ch_grp_idx()
1911 D_POWER("Chnl %d mapped to grp %d\n", ch_info->channel, group_idx); in il3945_hw_reg_get_ch_grp_idx()
1916 * il3945_hw_reg_get_matched_power_idx - Interpolate to get nominal idx
1926 struct il3945_eeprom *eeprom = (struct il3945_eeprom *)il->eeprom; in il3945_hw_reg_get_matched_power_idx()
1935 chnl_grp = &eeprom->groups[setting_idx]; in il3945_hw_reg_get_matched_power_idx()
1936 samples = chnl_grp->samples; in il3945_hw_reg_get_matched_power_idx()
1958 denominator = (s32) samples[idx1].power - (s32) samples[idx0].power; in il3945_hw_reg_get_matched_power_idx()
1960 return -EINVAL; in il3945_hw_reg_get_matched_power_idx()
1964 gains0 + (gains1 - gains0) * ((s32) power - in il3945_hw_reg_get_matched_power_idx()
1976 struct il3945_eeprom *eeprom = (struct il3945_eeprom *)il->eeprom; in il3945_hw_reg_init_channel_groups()
1984 group = &eeprom->groups[i]; in il3945_hw_reg_init_channel_groups()
1987 if (group->saturation_power < 40) { in il3945_hw_reg_init_channel_groups()
1990 group->saturation_power); in il3945_hw_reg_init_channel_groups()
1999 * backoffs provide headroom for high rate modulation in il3945_hw_reg_init_channel_groups()
2003 clip_pwrs = (s8 *) il->_3945.clip_groups[i].clip_powers; in il3945_hw_reg_init_channel_groups()
2005 /* divide factory saturation power by 2 to find -3dB level */ in il3945_hw_reg_init_channel_groups()
2006 satur_pwr = (s8) (group->saturation_power >> 1); in il3945_hw_reg_init_channel_groups()
2016 *clip_pwrs = satur_pwr - 5; in il3945_hw_reg_init_channel_groups()
2020 *clip_pwrs = satur_pwr - 7; in il3945_hw_reg_init_channel_groups()
2022 *clip_pwrs = satur_pwr - 10; in il3945_hw_reg_init_channel_groups()
2026 *clip_pwrs = satur_pwr - 9; in il3945_hw_reg_init_channel_groups()
2028 *clip_pwrs = satur_pwr - 12; in il3945_hw_reg_init_channel_groups()
2039 * il3945_txpower_set_from_eeprom - Set channel power info based on EEPROM
2041 * Second pass (during init) to set up il->channel_info
2043 * Set up Tx-power settings in our channel info database for each VALID
2058 struct il3945_eeprom *eeprom = (struct il3945_eeprom *)il->eeprom; in il3945_txpower_set_from_eeprom()
2072 il->last_temperature = temperature; in il3945_txpower_set_from_eeprom()
2076 /* initialize Tx power info for each and every channel, 2.4 and 5.x */ in il3945_txpower_set_from_eeprom()
2077 for (i = 0, ch_info = il->channel_info; i < il->channel_count; in il3945_txpower_set_from_eeprom()
2084 ch_info->group_idx = il3945_hw_reg_get_ch_grp_idx(il, ch_info); in il3945_txpower_set_from_eeprom()
2086 /* Get this chnlgrp's rate->max/clip-powers table */ in il3945_txpower_set_from_eeprom()
2088 il->_3945.clip_groups[ch_info->group_idx].clip_powers; in il3945_txpower_set_from_eeprom()
2094 eeprom->groups[ch_info-> in il3945_txpower_set_from_eeprom()
2098 D_POWER("Delta idx for channel %d: %d [%d]\n", ch_info->channel, in il3945_txpower_set_from_eeprom()
2106 /* use channel group's clip-power table, in il3945_txpower_set_from_eeprom()
2108 s8 pwr = min(ch_info->max_power_avg, in il3945_txpower_set_from_eeprom()
2111 pwr_info = &ch_info->power_info[rate_idx]; in il3945_txpower_set_from_eeprom()
2113 /* get base (i.e. at factory-measured temperature) in il3945_txpower_set_from_eeprom()
2116 ch_info-> in il3945_txpower_set_from_eeprom()
2123 pwr_info->base_power_idx = (u8) power_idx; in il3945_txpower_set_from_eeprom()
2132 pwr_info->requested_power = pwr; in il3945_txpower_set_from_eeprom()
2133 pwr_info->power_table_idx = (u8) power_idx; in il3945_txpower_set_from_eeprom()
2134 pwr_info->tpc.tx_gain = in il3945_txpower_set_from_eeprom()
2136 pwr_info->tpc.dsp_atten = in il3945_txpower_set_from_eeprom()
2141 pwr_info = &ch_info->power_info[RATE_12M_IDX_TBL]; in il3945_txpower_set_from_eeprom()
2142 power = pwr_info->requested_power + IL_CCK_FROM_OFDM_POWER_DIFF; in il3945_txpower_set_from_eeprom()
2143 pwr_idx = pwr_info->power_table_idx + IL_CCK_FROM_OFDM_IDX_DIFF; in il3945_txpower_set_from_eeprom()
2145 pwr_info->base_power_idx + IL_CCK_FROM_OFDM_IDX_DIFF; in il3945_txpower_set_from_eeprom()
2153 * NOTE: All CCK-rate Txpwrs are the same for a given chnl! in il3945_txpower_set_from_eeprom()
2157 &ch_info->power_info[rate_idx + IL_OFDM_RATES]; in il3945_txpower_set_from_eeprom()
2158 pwr_info->requested_power = power; in il3945_txpower_set_from_eeprom()
2159 pwr_info->power_table_idx = pwr_idx; in il3945_txpower_set_from_eeprom()
2160 pwr_info->base_power_idx = base_pwr_idx; in il3945_txpower_set_from_eeprom()
2161 pwr_info->tpc.tx_gain = gain; in il3945_txpower_set_from_eeprom()
2162 pwr_info->tpc.dsp_atten = dsp_atten; in il3945_txpower_set_from_eeprom()
2199 int txq_id = txq->q.id; in il3945_hw_tx_queue_init()
2201 struct il3945_shared *shared_data = il->_3945.shared_virt; in il3945_hw_tx_queue_init()
2203 shared_data->tx_base_ptr[txq_id] = cpu_to_le32((u32) txq->q.dma_addr); in il3945_hw_tx_queue_init()
2241 addsta->mode = cmd->mode; in il3945_build_addsta_hcmd()
2242 memcpy(&addsta->sta, &cmd->sta, sizeof(struct sta_id_modify)); in il3945_build_addsta_hcmd()
2243 memcpy(&addsta->key, &cmd->key, sizeof(struct il4965_keyinfo)); in il3945_build_addsta_hcmd()
2244 addsta->station_flags = cmd->station_flags; in il3945_build_addsta_hcmd()
2245 addsta->station_flags_msk = cmd->station_flags_msk; in il3945_build_addsta_hcmd()
2246 addsta->tid_disable_tx = cpu_to_le16(0); in il3945_build_addsta_hcmd()
2247 addsta->rate_n_flags = cmd->rate_n_flags; in il3945_build_addsta_hcmd()
2248 addsta->add_immediate_ba_tid = cmd->add_immediate_ba_tid; in il3945_build_addsta_hcmd()
2249 addsta->remove_immediate_ba_tid = cmd->remove_immediate_ba_tid; in il3945_build_addsta_hcmd()
2250 addsta->add_immediate_ba_ssn = cmd->add_immediate_ba_ssn; in il3945_build_addsta_hcmd()
2274 spin_lock_irqsave(&il->sta_lock, flags); in il3945_add_bssid_station()
2275 il->stations[sta_id].used |= IL_STA_LOCAL; in il3945_add_bssid_station()
2276 spin_unlock_irqrestore(&il->sta_lock, flags); in il3945_add_bssid_station()
2285 struct il_vif_priv *vif_priv = (void *)vif->drv_priv; in il3945_manage_ibss_station()
2290 il3945_add_bssid_station(il, vif->bss_conf.bssid, in il3945_manage_ibss_station()
2291 &vif_priv->ibss_bssid_sta_id); in il3945_manage_ibss_station()
2295 il3945_sync_sta(il, vif_priv->ibss_bssid_sta_id, in il3945_manage_ibss_station()
2296 (il->band == in il3945_manage_ibss_station()
2299 il3945_rate_scale_init(il->hw, vif_priv->ibss_bssid_sta_id); in il3945_manage_ibss_station()
2304 return il_remove_station(il, vif_priv->ibss_bssid_sta_id, in il3945_manage_ibss_station()
2305 vif->bss_conf.bssid); in il3945_manage_ibss_station()
2309 * il3945_init_hw_rate_table - Initialize the hardware rate fallback table
2324 table[idx].try_cnt = il->retry_rate; in il3945_init_hw_rate_table()
2329 switch (il->band) { in il3945_init_hw_rate_table()
2351 if (!(il->_3945.sta_supp_rates & IL_OFDM_RATES_MASK) && in il3945_init_hw_rate_table()
2385 memset((void *)&il->hw_params, 0, sizeof(struct il_hw_params)); in il3945_hw_set_hw_params()
2387 il->_3945.shared_virt = in il3945_hw_set_hw_params()
2388 dma_alloc_coherent(&il->pci_dev->dev, sizeof(struct il3945_shared), in il3945_hw_set_hw_params()
2389 &il->_3945.shared_phys, GFP_KERNEL); in il3945_hw_set_hw_params()
2390 if (!il->_3945.shared_virt) in il3945_hw_set_hw_params()
2391 return -ENOMEM; in il3945_hw_set_hw_params()
2393 il->hw_params.bcast_id = IL3945_BROADCAST_ID; in il3945_hw_set_hw_params()
2396 il->hw_params.max_txq_num = il->cfg->num_of_queues; in il3945_hw_set_hw_params()
2398 il->hw_params.tfd_size = sizeof(struct il3945_tfd); in il3945_hw_set_hw_params()
2399 il->hw_params.rx_page_order = get_order(IL_RX_BUF_SIZE_3K); in il3945_hw_set_hw_params()
2400 il->hw_params.max_rxq_size = RX_QUEUE_SIZE; in il3945_hw_set_hw_params()
2401 il->hw_params.max_rxq_log = RX_QUEUE_SIZE_LOG; in il3945_hw_set_hw_params()
2402 il->hw_params.max_stations = IL3945_STATION_COUNT; in il3945_hw_set_hw_params()
2404 il->sta_key_max_num = STA_KEY_MAX_NUM; in il3945_hw_set_hw_params()
2406 il->hw_params.rx_wrt_ptr_reg = FH39_RSCSR_CHNL0_WPTR; in il3945_hw_set_hw_params()
2407 il->hw_params.max_beacon_itrvl = IL39_MAX_UCODE_BEACON_INTERVAL; in il3945_hw_set_hw_params()
2408 il->hw_params.beacon_time_tsf_bits = IL3945_EXT_BEACON_TIME_POS; in il3945_hw_set_hw_params()
2420 tx_beacon_cmd = (struct il3945_tx_beacon_cmd *)&frame->u; in il3945_hw_get_beacon_cmd()
2423 tx_beacon_cmd->tx.sta_id = il->hw_params.bcast_id; in il3945_hw_get_beacon_cmd()
2424 tx_beacon_cmd->tx.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; in il3945_hw_get_beacon_cmd()
2427 il3945_fill_beacon_frame(il, tx_beacon_cmd->frame, in il3945_hw_get_beacon_cmd()
2428 sizeof(frame->u) - sizeof(*tx_beacon_cmd)); in il3945_hw_get_beacon_cmd()
2431 tx_beacon_cmd->tx.len = cpu_to_le16((u16) frame_size); in il3945_hw_get_beacon_cmd()
2433 tx_beacon_cmd->tx.rate = rate; in il3945_hw_get_beacon_cmd()
2434 tx_beacon_cmd->tx.tx_flags = in il3945_hw_get_beacon_cmd()
2438 tx_beacon_cmd->tx.supp_rates[0] = in il3945_hw_get_beacon_cmd()
2441 tx_beacon_cmd->tx.supp_rates[1] = (IL_CCK_BASIC_RATES_MASK & 0xF); in il3945_hw_get_beacon_cmd()
2449 il->handlers[C_TX] = il3945_hdl_tx; in il3945_hw_handler_setup()
2450 il->handlers[N_3945_RX] = il3945_hdl_rx; in il3945_hw_handler_setup()
2456 INIT_DELAYED_WORK(&il->_3945.thermal_periodic, in il3945_hw_setup_deferred_work()
2463 cancel_delayed_work(&il->_3945.thermal_periodic); in il3945_hw_cancel_deferred_work()
2470 __le32 *image = il->ucode_boot.v_addr; in il3945_verify_bsm()
2471 u32 len = il->ucode_boot.len; in il3945_verify_bsm()
2484 "addr 0x%08X+%u (of %u), is 0x%x, s/b 0x%x\n", in il3945_verify_bsm()
2485 BSM_SRAM_LOWER_BOUND, reg - BSM_SRAM_LOWER_BOUND, in il3945_verify_bsm()
2487 return -EIO; in il3945_verify_bsm()
2524 * il3945_load_bsm - Load bootstrap instructions
2530 * up after power-saving sleeps (or during initial uCode load), the BSM loads
2531 * the bootstrap program into the on-board processor, and starts it.
2544 * (filled initially with starting data values for the on-board processor),
2548 * When doing a power-save shutdown, runtime uCode saves data SRAM into
2553 * and re-launches the runtime uCode from where it left off.
2558 __le32 *image = il->ucode_boot.v_addr; in il3945_load_bsm()
2559 u32 len = il->ucode_boot.len; in il3945_load_bsm()
2573 return -EINVAL; in il3945_load_bsm()
2580 pinst = il->ucode_init.p_addr; in il3945_load_bsm()
2581 pdata = il->ucode_init_data.p_addr; in il3945_load_bsm()
2582 inst_len = il->ucode_init.len; in il3945_load_bsm()
2583 data_len = il->ucode_init_data.len; in il3945_load_bsm()
2620 return -EIO; in il3945_load_bsm()
2624 * (e.g. when powering back up after power-save shutdown) */ in il3945_load_bsm()