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

Commit 3618f30f authored by Arik Nemtsov's avatar Arik Nemtsov Committed by Luciano Coelho
Browse files

wl12xx: AP mode - support FW TX inactivity triggers



In AP mode we register for the MAX_TX_RETRY and INACTIVE_STA events.
Both are reported to the upper layers as a TX failure in the offending
stations.

Signed-off-by: default avatarArik Nemtsov <arik@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent b992c682
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -1624,22 +1624,22 @@ int wl1271_acx_ps_rx_streaming(struct wl1271 *wl, bool enable)
	return ret;
	return ret;
}
}


int wl1271_acx_max_tx_retry(struct wl1271 *wl)
int wl1271_acx_ap_max_tx_retry(struct wl1271 *wl)
{
{
	struct wl1271_acx_max_tx_retry *acx = NULL;
	struct wl1271_acx_ap_max_tx_retry *acx = NULL;
	int ret;
	int ret;


	wl1271_debug(DEBUG_ACX, "acx max tx retry");
	wl1271_debug(DEBUG_ACX, "acx ap max tx retry");


	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
	acx = kzalloc(sizeof(*acx), GFP_KERNEL);
	if (!acx)
	if (!acx)
		return -ENOMEM;
		return -ENOMEM;


	acx->max_tx_retry = cpu_to_le16(wl->conf.tx.ap_max_tx_retries);
	acx->max_tx_retry = cpu_to_le16(wl->conf.tx.max_tx_retries);


	ret = wl1271_cmd_configure(wl, ACX_MAX_TX_FAILURE, acx, sizeof(*acx));
	ret = wl1271_cmd_configure(wl, ACX_MAX_TX_FAILURE, acx, sizeof(*acx));
	if (ret < 0) {
	if (ret < 0) {
		wl1271_warning("acx max tx retry failed: %d", ret);
		wl1271_warning("acx ap max tx retry failed: %d", ret);
		goto out;
		goto out;
	}
	}


+2 −2
Original line number Original line Diff line number Diff line
@@ -1168,7 +1168,7 @@ struct wl1271_acx_ps_rx_streaming {
	u8 timeout;
	u8 timeout;
} __packed;
} __packed;


struct wl1271_acx_max_tx_retry {
struct wl1271_acx_ap_max_tx_retry {
	struct acx_header header;
	struct acx_header header;


	/*
	/*
@@ -1400,7 +1400,7 @@ int wl1271_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, u16 ssn,
				       bool enable);
				       bool enable);
int wl1271_acx_tsf_info(struct wl1271 *wl, u64 *mactime);
int wl1271_acx_tsf_info(struct wl1271 *wl, u64 *mactime);
int wl1271_acx_ps_rx_streaming(struct wl1271 *wl, bool enable);
int wl1271_acx_ps_rx_streaming(struct wl1271 *wl, bool enable);
int wl1271_acx_max_tx_retry(struct wl1271 *wl);
int wl1271_acx_ap_max_tx_retry(struct wl1271 *wl);
int wl1271_acx_config_ps(struct wl1271 *wl);
int wl1271_acx_config_ps(struct wl1271 *wl);
int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, u8 *addr);
int wl1271_acx_set_inconnection_sta(struct wl1271 *wl, u8 *addr);
int wl1271_acx_set_ap_beacon_filter(struct wl1271 *wl, bool enable);
int wl1271_acx_set_ap_beacon_filter(struct wl1271 *wl, bool enable);
+3 −1
Original line number Original line Diff line number Diff line
@@ -513,7 +513,9 @@ static int wl1271_boot_run_firmware(struct wl1271 *wl)
		PERIODIC_SCAN_COMPLETE_EVENT_ID;
		PERIODIC_SCAN_COMPLETE_EVENT_ID;


	if (wl->bss_type == BSS_TYPE_AP_BSS)
	if (wl->bss_type == BSS_TYPE_AP_BSS)
		wl->event_mask |= STA_REMOVE_COMPLETE_EVENT_ID;
		wl->event_mask |= STA_REMOVE_COMPLETE_EVENT_ID |
				  INACTIVE_STA_EVENT_ID |
				  MAX_TX_RETRY_EVENT_ID;
	else
	else
		wl->event_mask |= DUMMY_PACKET_EVENT_ID |
		wl->event_mask |= DUMMY_PACKET_EVENT_ID |
			BA_SESSION_RX_CONSTRAINT_EVENT_ID;
			BA_SESSION_RX_CONSTRAINT_EVENT_ID;
+1 −1
Original line number Original line Diff line number Diff line
@@ -1080,7 +1080,7 @@ int wl1271_cmd_start_bss(struct wl1271 *wl)


	memcpy(cmd->bssid, bss_conf->bssid, ETH_ALEN);
	memcpy(cmd->bssid, bss_conf->bssid, ETH_ALEN);


	cmd->aging_period = cpu_to_le16(WL1271_AP_DEF_INACTIV_SEC);
	cmd->aging_period = cpu_to_le16(wl->conf.tx.ap_aging_period);
	cmd->bss_index = WL1271_AP_BSS_INDEX;
	cmd->bss_index = WL1271_AP_BSS_INDEX;
	cmd->global_hlid = WL1271_AP_GLOBAL_HLID;
	cmd->global_hlid = WL1271_AP_GLOBAL_HLID;
	cmd->broadcast_hlid = WL1271_AP_BROADCAST_HLID;
	cmd->broadcast_hlid = WL1271_AP_BROADCAST_HLID;
+9 −1
Original line number Original line Diff line number Diff line
@@ -713,8 +713,16 @@ struct conf_tx_settings {
	/*
	/*
	 * AP-mode - allow this number of TX retries to a station before an
	 * AP-mode - allow this number of TX retries to a station before an
	 * event is triggered from FW.
	 * event is triggered from FW.
	 * In AP-mode the hlids of unreachable stations are given in the
	 * "sta_tx_retry_exceeded" member in the event mailbox.
	 */
	 */
	u16 ap_max_tx_retries;
	u8 max_tx_retries;

	/*
	 * AP-mode - after this number of seconds a connected station is
	 * considered inactive.
	 */
	u16 ap_aging_period;


	/*
	/*
	 * Configuration for TID parameters.
	 * Configuration for TID parameters.
Loading