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

Commit d82689e2 authored by John W. Linville's avatar John W. Linville
Browse files

Merge branch 'wireless-next-2.6' of...

parents 819bfecc fa8f130c
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -212,6 +212,9 @@ static struct iwl_lib_ops iwl1000_lib = {
		.set_ct_kill = iwl1000_set_ct_threshold,
	 },
	.add_bcast_station = iwl_add_bcast_station,
	.recover_from_tx_stall = iwl_bg_monitor_recover,
	.check_plcp_health = iwl_good_plcp_health,
	.check_ack_health = iwl_good_ack_health,
};

static const struct iwl_ops iwl1000_ops = {
@@ -223,7 +226,7 @@ static const struct iwl_ops iwl1000_ops = {
};

struct iwl_cfg iwl1000_bgn_cfg = {
	.name = "1000 Series BGN",
	.name = "Intel(R) Centrino(R) Wireless-N 1000 BGN",
	.fw_name_pre = IWL1000_FW_PRE,
	.ucode_api_max = IWL1000_UCODE_API_MAX,
	.ucode_api_min = IWL1000_UCODE_API_MIN,
@@ -249,10 +252,11 @@ struct iwl_cfg iwl1000_bgn_cfg = {
	.support_ct_kill_exit = true,
	.plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
	.chain_noise_scale = 1000,
	.monitor_recover_period = IWL_MONITORING_PERIOD,
};

struct iwl_cfg iwl1000_bg_cfg = {
	.name = "1000 Series BG",
	.name = "Intel(R) Centrino(R) Wireless-N 1000 BG",
	.fw_name_pre = IWL1000_FW_PRE,
	.ucode_api_max = IWL1000_UCODE_API_MAX,
	.ucode_api_min = IWL1000_UCODE_API_MIN,
@@ -277,6 +281,7 @@ struct iwl_cfg iwl1000_bg_cfg = {
	.support_ct_kill_exit = true,
	.plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
	.chain_noise_scale = 1000,
	.monitor_recover_period = IWL_MONITORING_PERIOD,
};

MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
+52 −31
Original line number Diff line number Diff line
@@ -329,16 +329,25 @@ static void iwl3945_collect_tx_data(struct iwl3945_rs_sta *rs_sta,

}

static void rs_rate_init(void *priv_r, struct ieee80211_supported_band *sband,
			 struct ieee80211_sta *sta, void *priv_sta)
/*
 * Called after adding a new station to initialize rate scaling
 */
void iwl3945_rs_rate_init(struct iwl_priv *priv, struct ieee80211_sta *sta, u8 sta_id)
{
	struct iwl3945_rs_sta *rs_sta = priv_sta;
	struct iwl_priv *priv = (struct iwl_priv *)priv_r;
	struct ieee80211_hw *hw = priv->hw;
	struct ieee80211_conf *conf = &priv->hw->conf;
	struct iwl3945_sta_priv *psta;
	struct iwl3945_rs_sta *rs_sta;
	struct ieee80211_supported_band *sband;
	int i;

	IWL_DEBUG_RATE(priv, "enter\n");
	IWL_DEBUG_INFO(priv, "enter \n");
	if (sta_id == priv->hw_params.bcast_sta_id)
		goto out;

	spin_lock_init(&rs_sta->lock);
	psta = (struct iwl3945_sta_priv *) sta->drv_priv;
	rs_sta = &psta->rs_sta;
	sband = hw->wiphy->bands[conf->channel->band];

	rs_sta->priv = priv;

@@ -351,9 +360,7 @@ static void rs_rate_init(void *priv_r, struct ieee80211_supported_band *sband,
	rs_sta->last_flush = jiffies;
	rs_sta->flush_time = IWL_RATE_FLUSH;
	rs_sta->last_tx_packets = 0;
	rs_sta->ibss_sta_added = 0;

	init_timer(&rs_sta->rate_scale_flush);
	rs_sta->rate_scale_flush.data = (unsigned long)rs_sta;
	rs_sta->rate_scale_flush.function = iwl3945_bg_rate_scale_flush;

@@ -380,8 +387,10 @@ static void rs_rate_init(void *priv_r, struct ieee80211_supported_band *sband,
						IWL_FIRST_OFDM_RATE;
	}

out:
	priv->stations[sta_id].used &= ~IWL_STA_UCODE_INPROGRESS;

	IWL_DEBUG_RATE(priv, "leave\n");
	IWL_DEBUG_INFO(priv, "leave\n");
}

static void *rs_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
@@ -405,6 +414,9 @@ static void *rs_alloc_sta(void *iwl_priv, struct ieee80211_sta *sta, gfp_t gfp)

	rs_sta = &psta->rs_sta;

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

	IWL_DEBUG_RATE(priv, "leave\n");

	return rs_sta;
@@ -413,13 +425,14 @@ static void *rs_alloc_sta(void *iwl_priv, struct ieee80211_sta *sta, gfp_t gfp)
static void rs_free_sta(void *iwl_priv, struct ieee80211_sta *sta,
			void *priv_sta)
{
	struct iwl3945_sta_priv *psta = (void *) sta->drv_priv;
	struct iwl3945_rs_sta *rs_sta = &psta->rs_sta;
	struct iwl_priv *priv __maybe_unused = rs_sta->priv;
	struct iwl3945_rs_sta *rs_sta = priv_sta;

	IWL_DEBUG_RATE(priv, "enter\n");
	/*
	 * Be careful not to use any members of iwl3945_rs_sta (like trying
	 * to use iwl_priv to print out debugging) since it may not be fully
	 * initialized at this point.
	 */
	del_timer_sync(&rs_sta->rate_scale_flush);
	IWL_DEBUG_RATE(priv, "leave\n");
}


@@ -458,6 +471,13 @@ static void rs_tx_status(void *priv_rate, struct ieee80211_supported_band *sband
		return;
	}

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


	rs_sta->tx_packets++;

	scale_rate_index = first_index;
@@ -625,7 +645,6 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
	u32 fail_count;
	s8 scale_action = 0;
	unsigned long flags;
	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
	u16 rate_mask = sta ? sta->supp_rates[sband->band] : 0;
	s8 max_rate_idx = -1;
	struct iwl_priv *priv = (struct iwl_priv *)priv_r;
@@ -633,6 +652,12 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,

	IWL_DEBUG_RATE(priv, "enter\n");

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

	if (rate_control_send_low(sta, priv_sta, txrc))
		return;

@@ -650,20 +675,6 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
	if (sband->band == IEEE80211_BAND_5GHZ)
		rate_mask = rate_mask << IWL_FIRST_OFDM_RATE;

	if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) &&
	    !rs_sta->ibss_sta_added) {
		u8 sta_id = iwl_find_station(priv, hdr->addr1);

		if (sta_id == IWL_INVALID_STATION) {
			IWL_DEBUG_RATE(priv, "LQ: ADD station %pM\n",
				       hdr->addr1);
			sta_id = iwl_add_station(priv, hdr->addr1, false,
				CMD_ASYNC, NULL);
		}
		if (sta_id != IWL_INVALID_STATION)
			rs_sta->ibss_sta_added = 1;
	}

	spin_lock_irqsave(&rs_sta->lock, flags);

	/* for recent assoc, choose best rate regarding
@@ -883,12 +894,22 @@ static void iwl3945_remove_debugfs(void *priv, void *priv_sta)
}
#endif

/*
 * Initialization of rate scaling information is done by driver after
 * the station is added. Since mac80211 calls this function before a
 * station is added we ignore it.
 */
static void rs_rate_init_stub(void *priv_r, struct ieee80211_supported_band *sband,
			      struct ieee80211_sta *sta, void *priv_sta)
{
}

static struct rate_control_ops rs_ops = {
	.module = NULL,
	.name = RS_NAME,
	.tx_status = rs_tx_status,
	.get_rate = rs_get_rate,
	.rate_init = rs_rate_init,
	.rate_init = rs_rate_init_stub,
	.alloc = rs_alloc,
	.free = rs_free,
	.alloc_sta = rs_alloc_sta,
@@ -899,7 +920,6 @@ static struct rate_control_ops rs_ops = {
#endif

};

void iwl3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
{
	struct iwl_priv *priv = hw->priv;
@@ -916,6 +936,7 @@ void iwl3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
	sta = ieee80211_find_sta(priv->vif,
				 priv->stations[sta_id].sta.sta.addr);
	if (!sta) {
		IWL_DEBUG_RATE(priv, "Unable to find station to initialize rate scaling.\n");
		rcu_read_unlock();
		return;
	}
+8 −14
Original line number Diff line number Diff line
@@ -1911,6 +1911,8 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv)
				  "configuration (%d).\n", rc);
			return rc;
		}
		iwl_clear_ucode_stations(priv, false);
		iwl_restore_stations(priv);
	}

	IWL_DEBUG_INFO(priv, "Sending RXON\n"
@@ -1941,7 +1943,10 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv)

	memcpy(active_rxon, staging_rxon, sizeof(*active_rxon));

	iwl_clear_stations_table(priv);
	if (!new_assoc) {
		iwl_clear_ucode_stations(priv, false);
		iwl_restore_stations(priv);
	}

	/* If we issue a new RXON command which required a tune then we must
	 * send a new TXPOWER command or we won't be able to Tx any frames */
@@ -1951,19 +1956,6 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv)
		return rc;
	}

	/* Add the broadcast address so we can send broadcast frames */
	priv->cfg->ops->lib->add_bcast_station(priv);

	/* If we have set the ASSOC_MSK and we are in BSS mode then
	 * add the IWL_AP_ID to the station rate table */
	if (iwl_is_associated(priv) &&
	    (priv->iw_mode == NL80211_IFTYPE_STATION))
		if (iwl_add_station(priv, priv->active_rxon.bssid_addr,
				true, CMD_SYNC, NULL) == IWL_INVALID_STATION) {
			IWL_ERR(priv, "Error adding AP address for transmit\n");
			return -EIO;
		}

	/* Init the hardware's rate fallback order based on the band */
	rc = iwl3945_init_hw_rate_table(priv);
	if (rc) {
@@ -2828,6 +2820,7 @@ static struct iwl_cfg iwl3945_bg_cfg = {
	.led_compensation = 64,
	.broken_powersave = true,
	.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
	.monitor_recover_period = IWL_MONITORING_PERIOD,
};

static struct iwl_cfg iwl3945_abg_cfg = {
@@ -2846,6 +2839,7 @@ static struct iwl_cfg iwl3945_abg_cfg = {
	.led_compensation = 64,
	.broken_powersave = true,
	.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
	.monitor_recover_period = IWL_MONITORING_PERIOD,
};

DEFINE_PCI_DEVICE_TABLE(iwl3945_hw_card_ids) = {
+0 −1
Original line number Diff line number Diff line
@@ -95,7 +95,6 @@ struct iwl3945_rs_sta {
	u8 tgg;
	u8 flush_pending;
	u8 start_rate;
	u8 ibss_sta_added;
	struct timer_list rate_scale_flush;
	struct iwl3945_rate_scale_data win[IWL_RATE_COUNT_3945];
#ifdef CONFIG_MAC80211_DEBUGFS
+4 −1
Original line number Diff line number Diff line
@@ -2187,6 +2187,7 @@ static struct iwl_lib_ops iwl4965_lib = {
	.load_ucode = iwl4965_load_bsm,
	.dump_nic_event_log = iwl_dump_nic_event_log,
	.dump_nic_error_log = iwl_dump_nic_error_log,
	.dump_fh = iwl_dump_fh,
	.set_channel_switch = iwl4965_hw_channel_switch,
	.apm_ops = {
		.init = iwl_apm_init,
@@ -2220,6 +2221,7 @@ static struct iwl_lib_ops iwl4965_lib = {
		.set_ct_kill = iwl4965_set_ct_threshold,
	},
	.add_bcast_station = iwl_add_bcast_station,
	.check_plcp_health = iwl_good_plcp_health,
};

static const struct iwl_ops iwl4965_ops = {
@@ -2231,7 +2233,7 @@ static const struct iwl_ops iwl4965_ops = {
};

struct iwl_cfg iwl4965_agn_cfg = {
	.name = "4965AGN",
	.name = "Intel(R) Wireless WiFi Link 4965AGN",
	.fw_name_pre = IWL4965_FW_PRE,
	.ucode_api_max = IWL4965_UCODE_API_MAX,
	.ucode_api_min = IWL4965_UCODE_API_MIN,
@@ -2254,6 +2256,7 @@ struct iwl_cfg iwl4965_agn_cfg = {
	.led_compensation = 61,
	.chain_noise_num_beacons = IWL4965_CAL_NUM_BEACONS,
	.plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
	.monitor_recover_period = IWL_MONITORING_PERIOD,
};

/* Module firmware */
Loading