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

Commit 30d0c8fd authored by Eliad Peller's avatar Eliad Peller Committed by Luciano Coelho
Browse files

wl12xx: move rate_set into wlvif



move rate_set into the per-interface data, rather than
being global.

Signed-off-by: default avatarEliad Peller <eliad@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 87fbcb0f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -739,7 +739,7 @@ int wl1271_acx_statistics(struct wl1271 *wl, struct acx_statistics *stats)
	return 0;
}

int wl1271_acx_sta_rate_policies(struct wl1271 *wl)
int wl1271_acx_sta_rate_policies(struct wl1271 *wl, struct wl12xx_vif *wlvif)
{
	struct acx_rate_policy *acx;
	struct conf_tx_rate_class *c = &wl->conf.tx.sta_rc_conf;
@@ -755,7 +755,7 @@ int wl1271_acx_sta_rate_policies(struct wl1271 *wl)
	}

	wl1271_debug(DEBUG_ACX, "basic_rate: 0x%x, full_rate: 0x%x",
		wl->basic_rate, wl->rate_set);
		wl->basic_rate, wlvif->rate_set);

	/* configure one basic rate class */
	acx->rate_policy_idx = cpu_to_le32(ACX_TX_BASIC_RATE);
@@ -772,7 +772,7 @@ int wl1271_acx_sta_rate_policies(struct wl1271 *wl)

	/* configure one AP supported rate class */
	acx->rate_policy_idx = cpu_to_le32(ACX_TX_AP_FULL_RATE);
	acx->rate_policy.enabled_rates = cpu_to_le32(wl->rate_set);
	acx->rate_policy.enabled_rates = cpu_to_le32(wlvif->rate_set);
	acx->rate_policy.short_retry_limit = c->short_retry_limit;
	acx->rate_policy.long_retry_limit = c->long_retry_limit;
	acx->rate_policy.aflags = c->aflags;
+1 −1
Original line number Diff line number Diff line
@@ -1261,7 +1261,7 @@ int wl1271_acx_set_preamble(struct wl1271 *wl, enum acx_preamble_type preamble);
int wl1271_acx_cts_protect(struct wl1271 *wl,
			   enum acx_ctsprotect_type ctsprotect);
int wl1271_acx_statistics(struct wl1271 *wl, struct acx_statistics *stats);
int wl1271_acx_sta_rate_policies(struct wl1271 *wl);
int wl1271_acx_sta_rate_policies(struct wl1271 *wl, struct wl12xx_vif *wlvif);
int wl1271_acx_ap_rate_policy(struct wl1271 *wl, struct conf_tx_rate_class *c,
		      u8 idx);
int wl1271_acx_ac_cfg(struct wl1271 *wl, u8 ac, u8 cw_min, u16 cw_max,
+6 −6
Original line number Diff line number Diff line
@@ -578,7 +578,7 @@ int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif)
	cmd->sta.ssid_len = wl->ssid_len;
	memcpy(cmd->sta.ssid, wl->ssid, wl->ssid_len);
	memcpy(cmd->sta.bssid, wl->bssid, ETH_ALEN);
	cmd->sta.local_rates = cpu_to_le32(wl->rate_set);
	cmd->sta.local_rates = cpu_to_le32(wlvif->rate_set);

	if (wl->sta_hlid == WL12XX_INVALID_LINK_ID) {
		ret = wl12xx_allocate_link(wl, &wl->sta_hlid);
@@ -587,12 +587,12 @@ int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif)
	}
	cmd->sta.hlid = wl->sta_hlid;
	cmd->sta.session = wl12xx_get_new_session_id(wl);
	cmd->sta.remote_rates = cpu_to_le32(wl->rate_set);
	cmd->sta.remote_rates = cpu_to_le32(wlvif->rate_set);

	wl1271_debug(DEBUG_CMD, "role start: roleid=%d, hlid=%d, session=%d "
		     "basic_rate_set: 0x%x, remote_rates: 0x%x",
		     wl->role_id, cmd->sta.hlid, cmd->sta.session,
		     wlvif->basic_rate_set, wl->rate_set);
		     wlvif->basic_rate_set, wlvif->rate_set);

	ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0);
	if (ret < 0) {
@@ -792,7 +792,7 @@ int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif)
	cmd->ibss.ssid_len = wl->ssid_len;
	memcpy(cmd->ibss.ssid, wl->ssid, wl->ssid_len);
	memcpy(cmd->ibss.bssid, wl->bssid, ETH_ALEN);
	cmd->sta.local_rates = cpu_to_le32(wl->rate_set);
	cmd->sta.local_rates = cpu_to_le32(wlvif->rate_set);

	if (wl->sta_hlid == WL12XX_INVALID_LINK_ID) {
		ret = wl12xx_allocate_link(wl, &wl->sta_hlid);
@@ -800,12 +800,12 @@ int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif)
			goto out_free;
	}
	cmd->ibss.hlid = wl->sta_hlid;
	cmd->ibss.remote_rates = cpu_to_le32(wl->rate_set);
	cmd->ibss.remote_rates = cpu_to_le32(wlvif->rate_set);

	wl1271_debug(DEBUG_CMD, "role start: roleid=%d, hlid=%d, session=%d "
		     "basic_rate_set: 0x%x, remote_rates: 0x%x",
		     wl->role_id, cmd->sta.hlid, cmd->sta.session,
		     wlvif->basic_rate_set, wl->rate_set);
		     wlvif->basic_rate_set, wlvif->rate_set);

	wl1271_debug(DEBUG_CMD, "wl->bssid = %pM", wl->bssid);

+0 −1
Original line number Diff line number Diff line
@@ -352,7 +352,6 @@ static ssize_t driver_state_read(struct file *file, char __user *user_buf,
	DRIVER_STATE_PRINT_INT(state);
	DRIVER_STATE_PRINT_INT(bss_type);
	DRIVER_STATE_PRINT_INT(channel);
	DRIVER_STATE_PRINT_HEX(rate_set);
	DRIVER_STATE_PRINT_HEX(basic_rate);
	DRIVER_STATE_PRINT_INT(band);
	DRIVER_STATE_PRINT_INT(beacon_int);
+3 −3
Original line number Diff line number Diff line
@@ -320,7 +320,7 @@ static int wl12xx_init_fwlog(struct wl1271 *wl)
}

/* generic sta initialization (non vif-specific) */
static int wl1271_sta_hw_init(struct wl1271 *wl)
static int wl1271_sta_hw_init(struct wl1271 *wl, struct wl12xx_vif *wlvif)
{
	int ret;

@@ -345,7 +345,7 @@ static int wl1271_sta_hw_init(struct wl1271 *wl)
	if (ret < 0)
		return ret;

	ret = wl1271_acx_sta_rate_policies(wl);
	ret = wl1271_acx_sta_rate_policies(wl, wlvif);
	if (ret < 0)
		return ret;

@@ -586,7 +586,7 @@ int wl1271_init_vif_specific(struct wl1271 *wl, struct ieee80211_vif *vif)
		if (ret < 0)
			return ret;
	} else {
		ret = wl1271_sta_hw_init(wl);
		ret = wl1271_sta_hw_init(wl, wlvif);
		if (ret < 0)
			return ret;

Loading