Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58de00a4 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka
Browse files

iwlegacy: rename IL_DEBUG_ to D_

parent 2d27c5db
Loading
Loading
Loading
Loading
+32 −32
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ static int il3945_rate_scale_flush_windows(struct il3945_rs_sta *rs_sta)
		spin_lock_irqsave(&rs_sta->lock, flags);
		if (time_after(jiffies, rs_sta->win[i].stamp +
			       IL_RATE_WIN_FLUSH)) {
			IL_DEBUG_RATE(il, "flushing %d samples of rate "
			D_RATE("flushing %d samples of rate "
				       "index %d\n",
				       rs_sta->win[i].counter, i);
			il3945_clear_window(&rs_sta->win[i]);
@@ -191,7 +191,7 @@ static void il3945_bg_rate_scale_flush(unsigned long data)
	unsigned long flags;
	u32 packet_count, duration, pps;

	IL_DEBUG_RATE(il, "enter\n");
	D_RATE("enter\n");

	unflushed = il3945_rate_scale_flush_windows(rs_sta);

@@ -206,7 +206,7 @@ static void il3945_bg_rate_scale_flush(unsigned long data)
		duration =
		    jiffies_to_msecs(jiffies - rs_sta->last_partial_flush);

		IL_DEBUG_RATE(il, "Tx'd %d packets in %dms\n",
		D_RATE("Tx'd %d packets in %dms\n",
			       packet_count, duration);

		/* Determine packets per second */
@@ -226,7 +226,7 @@ static void il3945_bg_rate_scale_flush(unsigned long data)

		rs_sta->flush_time = msecs_to_jiffies(duration);

		IL_DEBUG_RATE(il, "new flush period: %d msec ave %d\n",
		D_RATE("new flush period: %d msec ave %d\n",
			       duration, packet_count);

		mod_timer(&rs_sta->rate_scale_flush, jiffies +
@@ -244,7 +244,7 @@ static void il3945_bg_rate_scale_flush(unsigned long data)

	spin_unlock_irqrestore(&rs_sta->lock, flags);

	IL_DEBUG_RATE(il, "leave\n");
	D_RATE("leave\n");
}

/**
@@ -263,7 +263,7 @@ static void il3945_collect_tx_data(struct il3945_rs_sta *rs_sta,
	struct il_priv *il __maybe_unused = rs_sta->il;

	if (!retries) {
		IL_DEBUG_RATE(il, "leave: retries == 0 -- should be at least 1\n");
		D_RATE("leave: retries == 0 -- should be at least 1\n");
		return;
	}

@@ -341,7 +341,7 @@ void il3945_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_i
	struct ieee80211_supported_band *sband;
	int i;

	IL_DEBUG_INFO(il, "enter\n");
	D_INFO("enter\n");
	if (sta_id == il->contexts[IL_RXON_CTX_BSS].bcast_sta_id)
		goto out;

@@ -390,7 +390,7 @@ void il3945_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_i
out:
	il->stations[sta_id].used &= ~IL_STA_UCODE_INPROGRESS;

	IL_DEBUG_INFO(il, "leave\n");
	D_INFO("leave\n");
}

static void *il3945_rs_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
@@ -410,14 +410,14 @@ static void *il3945_rs_alloc_sta(void *il_priv, struct ieee80211_sta *sta, gfp_t
	struct il3945_sta_priv *psta = (void *) sta->drv_priv;
	struct il_priv *il __maybe_unused = il_priv;

	IL_DEBUG_RATE(il, "enter\n");
	D_RATE("enter\n");

	rs_sta = &psta->rs_sta;

	spin_lock_init(&rs_sta->lock);
	init_timer(&rs_sta->rate_scale_flush);

	IL_DEBUG_RATE(il, "leave\n");
	D_RATE("leave\n");

	return rs_sta;
}
@@ -453,7 +453,7 @@ static void il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band *
	struct il3945_rs_sta *rs_sta = il_sta;
	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);

	IL_DEBUG_RATE(il, "enter\n");
	D_RATE("enter\n");

	retries = info->status.rates[0].count;
	/* Sanity Check for retries */
@@ -462,18 +462,18 @@ static void il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band *

	first_index = sband->bitrates[info->status.rates[0].idx].hw_value;
	if ((first_index < 0) || (first_index >= IL_RATE_COUNT_3945)) {
		IL_DEBUG_RATE(il, "leave: Rate out of bounds: %d\n", first_index);
		D_RATE("leave: Rate out of bounds: %d\n", first_index);
		return;
	}

	if (!il_sta) {
		IL_DEBUG_RATE(il, "leave: No STA il data to update!\n");
		D_RATE("leave: No STA il data to update!\n");
		return;
	}

	/* Treat uninitialized rate scaling data same as non-existing. */
	if (!rs_sta->il) {
		IL_DEBUG_RATE(il, "leave: STA il data uninitialized!\n");
		D_RATE("leave: STA il data uninitialized!\n");
		return;
	}

@@ -508,7 +508,7 @@ static void il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band *
		il3945_collect_tx_data(rs_sta,
				    &rs_sta->win[scale_rate_index],
				    0, current_count, scale_rate_index);
		IL_DEBUG_RATE(il, "Update rate %d for %d retries.\n",
		D_RATE("Update rate %d for %d retries.\n",
			       scale_rate_index, current_count);

		retries -= current_count;
@@ -518,7 +518,7 @@ static void il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band *


	/* Update the last index window with success/failure based on ACK */
	IL_DEBUG_RATE(il, "Update rate %d with %s.\n",
	D_RATE("Update rate %d with %s.\n",
		       last_index,
		       (info->flags & IEEE80211_TX_STAT_ACK) ?
		       "success" : "failure");
@@ -543,7 +543,7 @@ static void il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band *

	spin_unlock_irqrestore(&rs_sta->lock, flags);

	IL_DEBUG_RATE(il, "leave\n");
	D_RATE("leave\n");
}

static u16 il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta,
@@ -591,7 +591,7 @@ static u16 il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta,
			break;
		if (rate_mask & (1 << low))
			break;
		IL_DEBUG_RATE(il, "Skipping masked lower rate: %d\n", low);
		D_RATE("Skipping masked lower rate: %d\n", low);
	}

	high = index;
@@ -604,7 +604,7 @@ static u16 il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta,
			break;
		if (rate_mask & (1 << high))
			break;
		IL_DEBUG_RATE(il, "Skipping masked higher rate: %d\n", high);
		D_RATE("Skipping masked higher rate: %d\n", high);
	}

	return (high << 8) | low;
@@ -648,11 +648,11 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta,
	struct il_priv *il __maybe_unused = (struct il_priv *)il_r;
	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);

	IL_DEBUG_RATE(il, "enter\n");
	D_RATE("enter\n");

	/* Treat uninitialized rate scaling data same as non-existing. */
	if (rs_sta && !rs_sta->il) {
		IL_DEBUG_RATE(il, "Rate scaling information not initialized yet.\n");
		D_RATE("Rate scaling information not initialized yet.\n");
		il_sta = NULL;
	}

@@ -699,7 +699,7 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta,
	     (window->success_counter < IL_RATE_MIN_SUCCESS_TH))) {
		spin_unlock_irqrestore(&rs_sta->lock, flags);

		IL_DEBUG_RATE(il, "Invalid average_tpt on rate %d: "
		D_RATE("Invalid average_tpt on rate %d: "
			       "counter: %d, success_counter: %d, "
			       "expected_tpt is %sNULL\n",
			       index,
@@ -737,7 +737,7 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta,

	/* Low success ratio , need to drop the rate */
	if ((window->success_ratio < IL_RATE_DECREASE_TH) || !current_tpt) {
		IL_DEBUG_RATE(il, "decrease rate because of low success_ratio\n");
		D_RATE("decrease rate because of low success_ratio\n");
		scale_action = -1;
	/* No throughput measured yet for adjacent rates,
	 * try increase */
@@ -756,7 +756,7 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta,
		 (high_tpt != IL_INVALID_VALUE) &&
		 (low_tpt < current_tpt) && (high_tpt < current_tpt)) {

		IL_DEBUG_RATE(il, "No action -- low [%d] & high [%d] < "
		D_RATE("No action -- low [%d] & high [%d] < "
			       "current_tpt [%d]\n",
			       low_tpt, high_tpt, current_tpt);
		scale_action = 0;
@@ -771,13 +771,13 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta,
				window->success_ratio >= IL_RATE_INCREASE_TH)
				scale_action = 1;
			else {
				IL_DEBUG_RATE(il,
				D_RATE(
				    "decrease rate because of high tpt\n");
				scale_action = 0;
			}
		} else if (low_tpt != IL_INVALID_VALUE) {
			if (low_tpt > current_tpt) {
				IL_DEBUG_RATE(il,
				D_RATE(
				    "decrease rate because of low tpt\n");
				scale_action = -1;
			} else if (window->success_ratio >= IL_RATE_INCREASE_TH) {
@@ -816,7 +816,7 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta,
		break;
	}

	IL_DEBUG_RATE(il, "Selected %d (action %d) - low %d high %d\n",
	D_RATE("Selected %d (action %d) - low %d high %d\n",
		       index, scale_action, low, high);

 out:
@@ -831,7 +831,7 @@ static void il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta,
		info->control.rates[0].idx = rs_sta->last_txrate_idx;
	}

	IL_DEBUG_RATE(il, "leave: %d\n", index);
	D_RATE("leave: %d\n", index);
}

#ifdef CONFIG_MAC80211_DEBUGFS
@@ -932,14 +932,14 @@ void il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
	struct ieee80211_sta *sta;
	struct il3945_sta_priv *psta;

	IL_DEBUG_RATE(il, "enter\n");
	D_RATE("enter\n");

	rcu_read_lock();

	sta = ieee80211_find_sta(il->contexts[IL_RXON_CTX_BSS].vif,
				 il->stations[sta_id].sta.sta.addr);
	if (!sta) {
		IL_DEBUG_RATE(il, "Unable to find station to initialize rate scaling.\n");
		D_RATE("Unable to find station to initialize rate scaling.\n");
		rcu_read_unlock();
		return;
	}
@@ -975,11 +975,11 @@ void il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
	if (rssi == 0)
		rssi = IL_MIN_RSSI_VAL;

	IL_DEBUG_RATE(il, "Network RSSI: %d\n", rssi);
	D_RATE("Network RSSI: %d\n", rssi);

	rs_sta->start_rate = il3945_get_rate_index_by_rssi(rssi, il->band);

	IL_DEBUG_RATE(il, "leave: rssi %d assign rate index: "
	D_RATE("leave: rssi %d assign rate index: "
		       "%d (plcp 0x%x)\n", rssi, rs_sta->start_rate,
		       il3945_rates[rs_sta->start_rate].plcp);
	rcu_read_unlock();
+51 −51
Original line number Diff line number Diff line
@@ -174,7 +174,7 @@ void il3945_disable_events(struct il_priv *il)
	array_size = il_read_targ_mem(il, base + (5 * sizeof(u32)));

	if (IL_EVT_DISABLE && (array_size == IL_EVT_DISABLE_SIZE)) {
		IL_DEBUG_INFO(il, "Disabling selected uCode log events at 0x%x\n",
		D_INFO("Disabling selected uCode log events at 0x%x\n",
			       disable_ptr);
		for (i = 0; i < IL_EVT_DISABLE_SIZE; i++)
			il_write_targ_mem(il,
@@ -182,9 +182,9 @@ void il3945_disable_events(struct il_priv *il)
					   evt_disable[i]);

	} else {
		IL_DEBUG_INFO(il, "Selected uCode log events may be disabled\n");
		IL_DEBUG_INFO(il, "  by writing \"1\"s into disable bitmap\n");
		IL_DEBUG_INFO(il, "  in SRAM at 0x%x, size %d u32s\n",
		D_INFO("Selected uCode log events may be disabled\n");
		D_INFO("  by writing \"1\"s into disable bitmap\n");
		D_INFO("  in SRAM at 0x%x, size %d u32s\n",
			       disable_ptr, array_size);
	}

@@ -342,11 +342,11 @@ static void il3945_rx_reply_tx(struct il_priv *il,
	info->flags |= ((status & TX_STATUS_MSK) == TX_STATUS_SUCCESS) ?
				IEEE80211_TX_STAT_ACK : 0;

	IL_DEBUG_TX(il, "Tx queue %d Status %s (0x%08x) plcp rate %d retries %d\n",
	D_TX("Tx queue %d Status %s (0x%08x) plcp rate %d retries %d\n",
			txq_id, il3945_get_tx_fail_reason(status), status,
			tx_resp->rate, tx_resp->failure_frame);

	IL_DEBUG_TX_REPLY(il, "Tx queue reclaim %d\n", index);
	D_TX_REPLY("Tx queue reclaim %d\n", index);
	il3945_tx_queue_reclaim(il, txq_id, index);

	if (status & TX_ABORT_REQUIRED_MSK)
@@ -401,7 +401,7 @@ void il3945_hw_rx_statistics(struct il_priv *il,
{
	struct il_rx_packet *pkt = rxb_addr(rxb);

	IL_DEBUG_RX(il, "Statistics notification received (%d vs %d).\n",
	D_RX("Statistics notification received (%d vs %d).\n",
		     (int)sizeof(struct il3945_notif_statistics),
		     le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK);
#ifdef CONFIG_IWLWIFI_LEGACY_DEBUGFS
@@ -426,7 +426,7 @@ void il3945_reply_statistics(struct il_priv *il,
		memset(&il->_3945.max_delta, 0,
			sizeof(struct il3945_notif_statistics));
#endif
		IL_DEBUG_RX(il, "Statistics have been cleared\n");
		D_RX("Statistics have been cleared\n");
	}
	il3945_hw_rx_statistics(il, rxb);
}
@@ -471,13 +471,13 @@ static void il3945_pass_packet_to_mac80211(struct il_priv *il,
	/* We received data from the HW, so stop the watchdog */
	if (unlikely(len + IWL39_RX_FRAME_SIZE >
		     PAGE_SIZE << il->hw_params.rx_page_order)) {
		IL_DEBUG_DROP(il, "Corruption detected!\n");
		D_DROP("Corruption detected!\n");
		return;
	}

	/* We only process data packets if the interface is open */
	if (unlikely(!il->is_open)) {
		IL_DEBUG_DROP(il,
		D_DROP(
			"Dropping packet while interface is not open.\n");
		return;
	}
@@ -539,14 +539,14 @@ static void il3945_rx_reply_rx(struct il_priv *il,
		rx_status.flag |= RX_FLAG_SHORTPRE;

	if ((unlikely(rx_stats->phy_count > 20))) {
		IL_DEBUG_DROP(il, "dsp size out of range [0,20]: %d/n",
		D_DROP("dsp size out of range [0,20]: %d/n",
				rx_stats->phy_count);
		return;
	}

	if (!(rx_end->status & RX_RES_STATUS_NO_CRC32_ERROR)
	    || !(rx_end->status & RX_RES_STATUS_NO_RXE_OVERFLOW)) {
		IL_DEBUG_RX(il, "Bad CRC or FIFO: 0x%08X.\n", rx_end->status);
		D_RX("Bad CRC or FIFO: 0x%08X.\n", rx_end->status);
		return;
	}

@@ -555,7 +555,7 @@ static void il3945_rx_reply_rx(struct il_priv *il,
	/* Convert 3945's rssi indicator to dBm */
	rx_status.signal = rx_stats->rssi - IWL39_RSSI_OFFSET;

	IL_DEBUG_STATS(il, "Rssi %d sig_avg %d noise_diff %d\n",
	D_STATS("Rssi %d sig_avg %d noise_diff %d\n",
			rx_status.signal, rx_stats_sig_avg,
			rx_stats_noise_diff);

@@ -563,7 +563,7 @@ static void il3945_rx_reply_rx(struct il_priv *il,

	network_packet = il3945_is_network_packet(il, header);

	IL_DEBUG_STATS(il, "[%c] %d RSSI:%d Signal:%u, Rate:%u\n",
	D_STATS("[%c] %d RSSI:%d Signal:%u, Rate:%u\n",
			      network_packet ? '*' : ' ',
			      le16_to_cpu(rx_hdr->channel),
			      rx_status.signal, rx_status.signal,
@@ -718,7 +718,7 @@ void il3945_hw_build_tx_cmd_rate(struct il_priv *il,
	/* CCK */
	tx_cmd->supp_rates[1] = (rate_mask & 0xF);

	IL_DEBUG_RATE(il, "Tx sta id: %d, rate: %d (plcp), flags: 0x%4X "
	D_RATE("Tx sta id: %d, rate: %d (plcp), flags: 0x%4X "
		       "cck/ofdm mask: 0x%x/0x%x\n", sta_id,
		       tx_cmd->rate, le32_to_cpu(tx_cmd->tx_flags),
		       tx_cmd->supp_rates[1], tx_cmd->supp_rates[0]);
@@ -741,7 +741,7 @@ static u8 il3945_sync_sta(struct il_priv *il, int sta_id, u16 tx_rate)
	il_send_add_sta(il, &station->sta, CMD_ASYNC);
	spin_unlock_irqrestore(&il->sta_lock, flags_spin);

	IL_DEBUG_RATE(il, "SCALE sync station %d to rate %d\n",
	D_RATE("SCALE sync station %d to rate %d\n",
			sta_id, tx_rate);
	return sta_id;
}
@@ -900,34 +900,34 @@ static void il3945_nic_config(struct il_priv *il)
	spin_lock_irqsave(&il->lock, flags);

	/* Determine HW type */
	IL_DEBUG_INFO(il, "HW Revision ID = 0x%X\n", rev_id);
	D_INFO("HW Revision ID = 0x%X\n", rev_id);

	if (rev_id & PCI_CFG_REV_ID_BIT_RTP)
		IL_DEBUG_INFO(il, "RTP type\n");
		D_INFO("RTP type\n");
	else if (rev_id & PCI_CFG_REV_ID_BIT_BASIC_SKU) {
		IL_DEBUG_INFO(il, "3945 RADIO-MB type\n");
		D_INFO("3945 RADIO-MB type\n");
		il_set_bit(il, CSR_HW_IF_CONFIG_REG,
			    CSR39_HW_IF_CONFIG_REG_BIT_3945_MB);
	} else {
		IL_DEBUG_INFO(il, "3945 RADIO-MM type\n");
		D_INFO("3945 RADIO-MM type\n");
		il_set_bit(il, CSR_HW_IF_CONFIG_REG,
			    CSR39_HW_IF_CONFIG_REG_BIT_3945_MM);
	}

	if (EEPROM_SKU_CAP_OP_MODE_MRC == eeprom->sku_cap) {
		IL_DEBUG_INFO(il, "SKU OP mode is mrc\n");
		D_INFO("SKU OP mode is mrc\n");
		il_set_bit(il, CSR_HW_IF_CONFIG_REG,
			    CSR39_HW_IF_CONFIG_REG_BIT_SKU_MRC);
	} else
		IL_DEBUG_INFO(il, "SKU OP mode is basic\n");
		D_INFO("SKU OP mode is basic\n");

	if ((eeprom->board_revision & 0xF0) == 0xD0) {
		IL_DEBUG_INFO(il, "3945ABG revision is 0x%X\n",
		D_INFO("3945ABG revision is 0x%X\n",
			       eeprom->board_revision);
		il_set_bit(il, CSR_HW_IF_CONFIG_REG,
			    CSR39_HW_IF_CONFIG_REG_BIT_BOARD_TYPE);
	} else {
		IL_DEBUG_INFO(il, "3945ABG revision is 0x%X\n",
		D_INFO("3945ABG revision is 0x%X\n",
			       eeprom->board_revision);
		il_clear_bit(il, CSR_HW_IF_CONFIG_REG,
			      CSR39_HW_IF_CONFIG_REG_BIT_BOARD_TYPE);
@@ -936,10 +936,10 @@ static void il3945_nic_config(struct il_priv *il)
	if (eeprom->almgor_m_version <= 1) {
		il_set_bit(il, CSR_HW_IF_CONFIG_REG,
			    CSR39_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_A);
		IL_DEBUG_INFO(il, "Card M type A version is 0x%X\n",
		D_INFO("Card M type A version is 0x%X\n",
			       eeprom->almgor_m_version);
	} else {
		IL_DEBUG_INFO(il, "Card M type B version is 0x%X\n",
		D_INFO("Card M type B version is 0x%X\n",
			       eeprom->almgor_m_version);
		il_set_bit(il, CSR_HW_IF_CONFIG_REG,
			    CSR39_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_B);
@@ -947,10 +947,10 @@ static void il3945_nic_config(struct il_priv *il)
	spin_unlock_irqrestore(&il->lock, flags);

	if (eeprom->sku_cap & EEPROM_SKU_CAP_SW_RF_KILL_ENABLE)
		IL_DEBUG_RF_KILL(il, "SW RF KILL supported in EEPROM.\n");
		D_RF_KILL("SW RF KILL supported in EEPROM.\n");

	if (eeprom->sku_cap & EEPROM_SKU_CAP_HW_RF_KILL_ENABLE)
		IL_DEBUG_RF_KILL(il, "HW RF KILL supported in EEPROM.\n");
		D_RF_KILL("HW RF KILL supported in EEPROM.\n");
}

int il3945_hw_nic_init(struct il_priv *il)
@@ -1074,7 +1074,7 @@ static int il3945_hw_reg_txpower_get_temperature(struct il_priv *il)

	/* driver's okay range is -260 to +25.
	 *   human readable okay range is 0 to +285 */
	IL_DEBUG_INFO(il, "Temperature: %d\n", temperature + IL_TEMP_CONVERT);
	D_INFO("Temperature: %d\n", temperature + IL_TEMP_CONVERT);

	/* handle insane temp reading */
	if (il3945_hw_reg_temp_out_of_range(temperature)) {
@@ -1111,20 +1111,20 @@ static int il3945_is_temp_calib_needed(struct il_priv *il)

	/* get absolute value */
	if (temp_diff < 0) {
		IL_DEBUG_POWER(il, "Getting cooler, delta %d,\n", temp_diff);
		D_POWER("Getting cooler, delta %d,\n", temp_diff);
		temp_diff = -temp_diff;
	} else if (temp_diff == 0)
		IL_DEBUG_POWER(il, "Same temp,\n");
		D_POWER("Same temp,\n");
	else
		IL_DEBUG_POWER(il, "Getting warmer, delta %d,\n", temp_diff);
		D_POWER("Getting warmer, delta %d,\n", temp_diff);

	/* if we don't need calibration, *don't* update last_temperature */
	if (temp_diff < IL_TEMPERATURE_LIMIT_TIMER) {
		IL_DEBUG_POWER(il, "Timed thermal calib not needed\n");
		D_POWER("Timed thermal calib not needed\n");
		return 0;
	}

	IL_DEBUG_POWER(il, "Timed thermal calib needed\n");
	D_POWER("Timed thermal calib needed\n");

	/* assume that caller will actually do calib ...
	 *   update the "last temperature" value */
@@ -1395,7 +1395,7 @@ static int il3945_send_tx_power(struct il_priv *il)
	}

	if (!il_is_channel_valid(ch_info)) {
		IL_DEBUG_POWER(il, "Not calling TX_PWR_TABLE_CMD on "
		D_POWER("Not calling TX_PWR_TABLE_CMD on "
				"non-Tx channel.\n");
		return 0;
	}
@@ -1408,7 +1408,7 @@ static int il3945_send_tx_power(struct il_priv *il)
		txpower.power[i].tpc = ch_info->power_info[i].tpc;
		txpower.power[i].rate = il3945_rates[rate_idx].plcp;

		IL_DEBUG_POWER(il, "ch %d:%d rf %d dsp %3d rate code 0x%02x\n",
		D_POWER("ch %d:%d rf %d dsp %3d rate code 0x%02x\n",
				le16_to_cpu(txpower.channel),
				txpower.band,
				txpower.power[i].tpc.tx_gain,
@@ -1421,7 +1421,7 @@ static int il3945_send_tx_power(struct il_priv *il)
		txpower.power[i].tpc = ch_info->power_info[i].tpc;
		txpower.power[i].rate = il3945_rates[rate_idx].plcp;

		IL_DEBUG_POWER(il, "ch %d:%d rf %d dsp %3d rate code 0x%02x\n",
		D_POWER("ch %d:%d rf %d dsp %3d rate code 0x%02x\n",
				le16_to_cpu(txpower.channel),
				txpower.band,
				txpower.power[i].tpc.tx_gain,
@@ -1617,12 +1617,12 @@ int il3945_hw_reg_set_txpower(struct il_priv *il, s8 power)
	u8 i;

	if (il->tx_power_user_lmt == power) {
		IL_DEBUG_POWER(il, "Requested Tx power same as current "
		D_POWER("Requested Tx power same as current "
				"limit: %ddBm.\n", power);
		return 0;
	}

	IL_DEBUG_POWER(il, "Setting upper limit clamp to %ddBm.\n", power);
	D_POWER("Setting upper limit clamp to %ddBm.\n", power);
	il->tx_power_user_lmt = power;

	/* set up new Tx powers for each and every channel, 2.4 and 5.x */
@@ -1670,7 +1670,7 @@ static int il3945_send_rxon_assoc(struct il_priv *il,
	    (rxon1->filter_flags == rxon2->filter_flags) &&
	    (rxon1->cck_basic_rates == rxon2->cck_basic_rates) &&
	    (rxon1->ofdm_basic_rates == rxon2->ofdm_basic_rates)) {
		IL_DEBUG_INFO(il, "Using current RXON_ASSOC.  Not resending.\n");
		D_INFO("Using current RXON_ASSOC.  Not resending.\n");
		return 0;
	}

@@ -1758,7 +1758,7 @@ int il3945_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx)
	 * we must clear the associated from the active configuration
	 * before we apply the new config */
	if (il_is_associated(il, IL_RXON_CTX_BSS) && new_assoc) {
		IL_DEBUG_INFO(il, "Toggling associated bit on current RXON\n");
		D_INFO("Toggling associated bit on current RXON\n");
		active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK;

		/*
@@ -1785,7 +1785,7 @@ int il3945_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx)
					 &il->contexts[IL_RXON_CTX_BSS]);
	}

	IL_DEBUG_INFO(il, "Sending RXON\n"
	D_INFO("Sending RXON\n"
		       "* with%s RXON_FILTER_ASSOC_MSK\n"
		       "* channel = %d\n"
		       "* bssid = %pM\n",
@@ -1913,7 +1913,7 @@ static u16 il3945_hw_reg_get_ch_grp_index(struct il_priv *il,
	} else
		group_index = 0;	/* 2.4 GHz, group 0 */

	IL_DEBUG_POWER(il, "Chnl %d mapped to grp %d\n", ch_info->channel,
	D_POWER("Chnl %d mapped to grp %d\n", ch_info->channel,
			group_index);
	return group_index;
}
@@ -1980,7 +1980,7 @@ static void il3945_hw_reg_init_channel_groups(struct il_priv *il)
	struct il3945_eeprom *eeprom = (struct il3945_eeprom *)il->eeprom;
	const struct il3945_eeprom_txpower_group *group;

	IL_DEBUG_POWER(il, "Initializing factory calib info from EEPROM\n");
	D_POWER("Initializing factory calib info from EEPROM\n");

	for (i = 0; i < IL_NUM_TX_CALIB_GROUPS; i++) {
		s8 *clip_pwrs;	/* table of power levels for each rate */
@@ -2096,7 +2096,7 @@ int il3945_txpower_set_from_eeprom(struct il_priv *il)
				eeprom->groups[ch_info->group_index].
				temperature);

		IL_DEBUG_POWER(il, "Delta index for channel %d: %d [%d]\n",
		D_POWER("Delta index for channel %d: %d [%d]\n",
				ch_info->channel, delta_index, temperature +
				IL_TEMP_CONVERT);

@@ -2324,7 +2324,7 @@ int il3945_init_hw_rate_table(struct il_priv *il)

	switch (il->band) {
	case IEEE80211_BAND_5GHZ:
		IL_DEBUG_RATE(il, "Select A mode rate scale\n");
		D_RATE("Select A mode rate scale\n");
		/* If one of the following CCK rates is used,
		 * have it fall back to the 6M OFDM rate */
		for (i = IL_RATE_1M_INDEX_TABLE;
@@ -2342,7 +2342,7 @@ int il3945_init_hw_rate_table(struct il_priv *il)
		break;

	case IEEE80211_BAND_2GHZ:
		IL_DEBUG_RATE(il, "Select B/G mode rate scale\n");
		D_RATE("Select B/G mode rate scale\n");
		/* If an OFDM rate is used, have it fall back to the
		 * 1M CCK rates */

@@ -2472,7 +2472,7 @@ static int il3945_verify_bsm(struct il_priv *il)
	u32 reg;
	u32 val;

	IL_DEBUG_INFO(il, "Begin verify bsm\n");
	D_INFO("Begin verify bsm\n");

	/* verify BSM SRAM contents */
	val = il_read_prph(il, BSM_WR_DWCOUNT_REG);
@@ -2490,7 +2490,7 @@ static int il3945_verify_bsm(struct il_priv *il)
		}
	}

	IL_DEBUG_INFO(il, "BSM bootstrap uCode image OK\n");
	D_INFO("BSM bootstrap uCode image OK\n");

	return 0;
}
@@ -2567,7 +2567,7 @@ static int il3945_load_bsm(struct il_priv *il)
	u32 done;
	u32 reg_offset;

	IL_DEBUG_INFO(il, "Begin load bsm\n");
	D_INFO("Begin load bsm\n");

	/* make sure bootstrap program is no larger than BSM's SRAM size */
	if (len > IWL39_MAX_BSM_SIZE)
@@ -2618,7 +2618,7 @@ static int il3945_load_bsm(struct il_priv *il)
		udelay(10);
	}
	if (i < 100)
		IL_DEBUG_INFO(il, "BSM write complete, poll %d iterations\n", i);
		D_INFO("BSM write complete, poll %d iterations\n", i);
	else {
		IL_ERR(il, "BSM write did not complete!\n");
		return -EIO;
+40 −40

File changed.

Preview size limit exceeded, changes collapsed.

+19 −19
Original line number Diff line number Diff line
@@ -303,7 +303,7 @@ static void il4965_rx_allocate(struct il_priv *il, gfp_t priority)
		page = alloc_pages(gfp_mask, il->hw_params.rx_page_order);
		if (!page) {
			if (net_ratelimit())
				IL_DEBUG_INFO(il, "alloc_pages failed, "
				D_INFO("alloc_pages failed, "
					       "order: %d\n",
					       il->hw_params.rx_page_order);

@@ -456,7 +456,7 @@ static int il4965_calc_rssi(struct il_priv *il,
		if (valid_antennae & (1 << i))
			max_rssi = max(ncphy->rssi_info[i << 1], max_rssi);

	IL_DEBUG_STATS(il, "Rssi In A %d B %d C %d Max %d AGC dB %d\n",
	D_STATS("Rssi In A %d B %d C %d Max %d AGC dB %d\n",
		ncphy->rssi_info[0], ncphy->rssi_info[2], ncphy->rssi_info[4],
		max_rssi, agc);

@@ -519,7 +519,7 @@ static u32 il4965_translate_rx_status(struct il_priv *il, u32 decrypt_in)
		break;
	}

	IL_DEBUG_RX(il, "decrypt_in:0x%x  decrypt_out = 0x%x\n",
	D_RX("decrypt_in:0x%x  decrypt_out = 0x%x\n",
					decrypt_in, decrypt_out);

	return decrypt_out;
@@ -537,7 +537,7 @@ static void il4965_pass_packet_to_mac80211(struct il_priv *il,

	/* We only process data packets if the interface is open */
	if (unlikely(!il->is_open)) {
		IL_DEBUG_DROP(il,
		D_DROP(
		    "Dropping packet while interface is not open.\n");
		return;
	}
@@ -611,14 +611,14 @@ void il4965_rx_reply_rx(struct il_priv *il,
	}

	if ((unlikely(phy_res->cfg_phy_cnt > 20))) {
		IL_DEBUG_DROP(il, "dsp size out of range [0,20]: %d/n",
		D_DROP("dsp size out of range [0,20]: %d/n",
				phy_res->cfg_phy_cnt);
		return;
	}

	if (!(rx_pkt_status & RX_RES_STATUS_NO_CRC32_ERROR) ||
	    !(rx_pkt_status & RX_RES_STATUS_NO_RXE_OVERFLOW)) {
		IL_DEBUG_RX(il, "Bad CRC or FIFO: 0x%08X.\n",
		D_RX("Bad CRC or FIFO: 0x%08X.\n",
				le32_to_cpu(rx_pkt_status));
		return;
	}
@@ -647,7 +647,7 @@ void il4965_rx_reply_rx(struct il_priv *il,
	rx_status.signal = il4965_calc_rssi(il, phy_res);

	il_dbg_log_rx_data_frame(il, len, header);
	IL_DEBUG_STATS(il, "Rssi %d, TSF %llu\n",
	D_STATS("Rssi %d, TSF %llu\n",
		rx_status.signal, (unsigned long long)rx_status.mactime);

	/*
@@ -729,7 +729,7 @@ static int il4965_get_channels_for_scan(struct il_priv *il,

		ch_info = il_get_channel_info(il, band, channel);
		if (!il_is_channel_valid(ch_info)) {
			IL_DEBUG_SCAN(il,
			D_SCAN(
				 "Channel %d is INVALID for this band.\n",
					channel);
			continue;
@@ -759,7 +759,7 @@ static int il4965_get_channels_for_scan(struct il_priv *il,
		else
			scan_ch->tx_gain = ((1 << 5) | (5 << 3));

		IL_DEBUG_SCAN(il, "Scanning ch=%d prob=0x%X [%s %d]\n",
		D_SCAN("Scanning ch=%d prob=0x%X [%s %d]\n",
			       channel, le32_to_cpu(scan_ch->type),
			       (scan_ch->type & SCAN_CHANNEL_TYPE_ACTIVE) ?
				"ACTIVE" : "PASSIVE",
@@ -770,7 +770,7 @@ static int il4965_get_channels_for_scan(struct il_priv *il,
		added++;
	}

	IL_DEBUG_SCAN(il, "total channels to scan %d\n", added);
	D_SCAN("total channels to scan %d\n", added);
	return added;
}

@@ -805,7 +805,7 @@ int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
		il->scan_cmd = kmalloc(sizeof(struct il_scan_cmd) +
					 IL_MAX_SCAN_SIZE, GFP_KERNEL);
		if (!il->scan_cmd) {
			IL_DEBUG_SCAN(il,
			D_SCAN(
				       "fail to allocate memory for scan\n");
			return -ENOMEM;
		}
@@ -822,7 +822,7 @@ int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
		u32 suspend_time = 100;
		u32 scan_suspend_time = 100;

		IL_DEBUG_INFO(il, "Scanning while associated...\n");
		D_INFO("Scanning while associated...\n");
		interval = vif->bss_conf.beacon_int;

		scan->suspend_time = 0;
@@ -834,13 +834,13 @@ int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
		scan_suspend_time = (extra |
		    ((suspend_time % interval) * 1024));
		scan->suspend_time = cpu_to_le32(scan_suspend_time);
		IL_DEBUG_SCAN(il, "suspend_time 0x%X beacon interval %d\n",
		D_SCAN("suspend_time 0x%X beacon interval %d\n",
			       scan_suspend_time, interval);
	}

	if (il->scan_request->n_ssids) {
		int i, p = 0;
		IL_DEBUG_SCAN(il, "Kicking off active scan\n");
		D_SCAN("Kicking off active scan\n");
		for (i = 0; i < il->scan_request->n_ssids; i++) {
			/* always does wildcard anyway */
			if (!il->scan_request->ssids[i].ssid_len)
@@ -856,7 +856,7 @@ int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
		}
		is_active = true;
	} else
		IL_DEBUG_SCAN(il, "Start passive scan.\n");
		D_SCAN("Start passive scan.\n");

	scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK;
	scan->tx_cmd.sta_id = ctx->bcast_sta_id;
@@ -923,7 +923,7 @@ int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
		if (!active_chains)
			active_chains = rx_ant;

		IL_DEBUG_SCAN(il, "chain_noise_data.active_chains: %u\n",
		D_SCAN("chain_noise_data.active_chains: %u\n",
				il->chain_noise_data.active_chains);

		rx_ant = il4965_first_antenna(active_chains);
@@ -951,7 +951,7 @@ int il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
						is_active, n_probes,
						(void *)&scan->data[cmd_len]);
	if (scan->channel_count == 0) {
		IL_DEBUG_SCAN(il, "channel count %d\n", scan->channel_count);
		D_SCAN("channel count %d\n", scan->channel_count);
		return -EIO;
	}

@@ -990,7 +990,7 @@ void il4965_free_tfds_in_queue(struct il_priv *il,
	if (il->stations[sta_id].tid[tid].tfds_in_queue >= freed)
		il->stations[sta_id].tid[tid].tfds_in_queue -= freed;
	else {
		IL_DEBUG_TX(il, "free more than tfds_in_queue (%u:%d)\n",
		D_TX("free more than tfds_in_queue (%u:%d)\n",
			il->stations[sta_id].tid[tid].tfds_in_queue,
			freed);
		il->stations[sta_id].tid[tid].tfds_in_queue = 0;
@@ -1111,7 +1111,7 @@ void il4965_set_rxon_chain(struct il_priv *il, struct il_rxon_context *ctx)
	else
		ctx->staging.rx_chain &= ~RXON_RX_CHAIN_MIMO_FORCE_MSK;

	IL_DEBUG_ASSOC(il, "rx_chain=0x%X active=%d idle=%d\n",
	D_ASSOC("rx_chain=0x%X active=%d idle=%d\n",
			ctx->staging.rx_chain,
			active_rx_cnt, idle_rx_cnt);

+53 −53

File changed.

Preview size limit exceeded, changes collapsed.

Loading