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

Commit 203c903c authored by Arik Nemtsov's avatar Arik Nemtsov Committed by Luciano Coelho
Browse files

wl12xx: AP mode - add AP specific event



Add STA-remove completion event. Unmask it during boot if operating in
AP-mode.
Ignore unrelated events in AP-mode.

Signed-off-by: default avatarArik Nemtsov <arik@wizery.com>
Reviewed-by: default avatarLuciano Coelho <coelho@ti.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 79b223f4
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -431,6 +431,9 @@ static int wl1271_boot_run_firmware(struct wl1271 *wl)
		PSPOLL_DELIVERY_FAILURE_EVENT_ID |
		PSPOLL_DELIVERY_FAILURE_EVENT_ID |
		SOFT_GEMINI_SENSE_EVENT_ID;
		SOFT_GEMINI_SENSE_EVENT_ID;


	if (wl->bss_type == BSS_TYPE_AP_BSS)
		wl->event_mask |= STA_REMOVE_COMPLETE_EVENT_ID;

	ret = wl1271_event_unmask(wl);
	ret = wl1271_event_unmask(wl);
	if (ret < 0) {
	if (ret < 0) {
		wl1271_error("EVENT mask setting failed");
		wl1271_error("EVENT mask setting failed");
+4 −3
Original line number Original line Diff line number Diff line
@@ -186,6 +186,7 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox)
	int ret;
	int ret;
	u32 vector;
	u32 vector;
	bool beacon_loss = false;
	bool beacon_loss = false;
	bool is_ap = (wl->bss_type == BSS_TYPE_AP_BSS);


	wl1271_event_mbox_dump(mbox);
	wl1271_event_mbox_dump(mbox);


@@ -218,21 +219,21 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox)
	 * BSS_LOSE_EVENT, beacon loss has to be reported to the stack.
	 * BSS_LOSE_EVENT, beacon loss has to be reported to the stack.
	 *
	 *
	 */
	 */
	if (vector & BSS_LOSE_EVENT_ID) {
	if ((vector & BSS_LOSE_EVENT_ID) && !is_ap) {
		wl1271_info("Beacon loss detected.");
		wl1271_info("Beacon loss detected.");


		/* indicate to the stack, that beacons have been lost */
		/* indicate to the stack, that beacons have been lost */
		beacon_loss = true;
		beacon_loss = true;
	}
	}


	if (vector & PS_REPORT_EVENT_ID) {
	if ((vector & PS_REPORT_EVENT_ID) && !is_ap) {
		wl1271_debug(DEBUG_EVENT, "PS_REPORT_EVENT");
		wl1271_debug(DEBUG_EVENT, "PS_REPORT_EVENT");
		ret = wl1271_event_ps_report(wl, mbox, &beacon_loss);
		ret = wl1271_event_ps_report(wl, mbox, &beacon_loss);
		if (ret < 0)
		if (ret < 0)
			return ret;
			return ret;
	}
	}


	if (vector & PSPOLL_DELIVERY_FAILURE_EVENT_ID)
	if ((vector & PSPOLL_DELIVERY_FAILURE_EVENT_ID) && !is_ap)
		wl1271_event_pspoll_delivery_fail(wl);
		wl1271_event_pspoll_delivery_fail(wl);


	if (vector & RSSI_SNR_TRIGGER_0_EVENT_ID) {
	if (vector & RSSI_SNR_TRIGGER_0_EVENT_ID) {
+1 −0
Original line number Original line Diff line number Diff line
@@ -59,6 +59,7 @@ enum {
	BSS_LOSE_EVENT_ID			 = BIT(18),
	BSS_LOSE_EVENT_ID			 = BIT(18),
	REGAINED_BSS_EVENT_ID			 = BIT(19),
	REGAINED_BSS_EVENT_ID			 = BIT(19),
	ROAMING_TRIGGER_MAX_TX_RETRY_EVENT_ID	 = BIT(20),
	ROAMING_TRIGGER_MAX_TX_RETRY_EVENT_ID	 = BIT(20),
	STA_REMOVE_COMPLETE_EVENT_ID		 = BIT(21), /* AP */
	SOFT_GEMINI_SENSE_EVENT_ID		 = BIT(22),
	SOFT_GEMINI_SENSE_EVENT_ID		 = BIT(22),
	SOFT_GEMINI_PREDICTION_EVENT_ID		 = BIT(23),
	SOFT_GEMINI_PREDICTION_EVENT_ID		 = BIT(23),
	SOFT_GEMINI_AVALANCHE_EVENT_ID		 = BIT(24),
	SOFT_GEMINI_AVALANCHE_EVENT_ID		 = BIT(24),