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

Commit 13f2dc52 authored by Juuso Oikarinen's avatar Juuso Oikarinen Committed by John W. Linville
Browse files

wl1271: Fix event acknowledging functionality



In reference source, events are acknowledged separately - fix the driver to
do the same.

Signed-off-by: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent a6fe2313
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ void wl1271_event_mbox_config(struct wl1271 *wl)
		     wl->mbox_ptr[0], wl->mbox_ptr[1]);
}

int wl1271_event_handle(struct wl1271 *wl, u8 mbox_num, bool do_ack)
int wl1271_event_handle(struct wl1271 *wl, u8 mbox_num)
{
	struct event_mailbox mbox;
	int ret;
@@ -204,9 +204,7 @@ int wl1271_event_handle(struct wl1271 *wl, u8 mbox_num, bool do_ack)
		return ret;

	/* then we let the firmware know it can go on...*/
	if (do_ack)
		wl1271_spi_write32(wl, ACX_REG_INTERRUPT_TRIG,
				   INTR_TRIG_EVENT_ACK);
	wl1271_spi_write32(wl, ACX_REG_INTERRUPT_TRIG, INTR_TRIG_EVENT_ACK);

	return 0;
}
+1 −1
Original line number Diff line number Diff line
@@ -112,6 +112,6 @@ struct event_mailbox {

int wl1271_event_unmask(struct wl1271 *wl);
void wl1271_event_mbox_config(struct wl1271 *wl);
int wl1271_event_handle(struct wl1271 *wl, u8 mbox, bool do_ack);
int wl1271_event_handle(struct wl1271 *wl, u8 mbox);

#endif
+2 −3
Original line number Diff line number Diff line
@@ -450,14 +450,13 @@ static void wl1271_irq_work(struct work_struct *work)
	intr &= WL1271_INTR_MASK;

	if (intr & WL1271_ACX_INTR_EVENT_A) {
		bool do_ack = (intr & WL1271_ACX_INTR_EVENT_B) ? false : true;
		wl1271_debug(DEBUG_IRQ, "WL1271_ACX_INTR_EVENT_A");
		wl1271_event_handle(wl, 0, do_ack);
		wl1271_event_handle(wl, 0);
	}

	if (intr & WL1271_ACX_INTR_EVENT_B) {
		wl1271_debug(DEBUG_IRQ, "WL1271_ACX_INTR_EVENT_B");
		wl1271_event_handle(wl, 1, true);
		wl1271_event_handle(wl, 1);
	}

	if (intr & WL1271_ACX_INTR_INIT_COMPLETE)