Lines Matching +full:te +full:- +full:source

20 /*-
21 * Based on BSD-licensed source modules in the Linux iwlwifi driver,
34 * Copyright(c) 2007 - 2013 Intel Corporation. All rights reserved.
55 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
60 * Copyright(c) 2005 - 2013 Intel Corporation. All rights reserved.
63 * Redistribution and use in source and binary forms, with or without
67 * * Redistributions of source code must retain the above copyright
90 /*-
91 * Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
165 sc->sc_time_event_uid = 0; in iwm_te_clear_data()
166 sc->sc_time_event_duration = 0; in iwm_te_clear_data()
167 sc->sc_time_event_end_ticks = 0; in iwm_te_clear_data()
168 sc->sc_flags &= ~IWM_FLAG_TE_ACTIVE; in iwm_te_clear_data()
183 "Handle time event notif - UID = 0x%x action %d\n", in iwm_te_handle_notif()
184 le32toh(notif->unique_id), in iwm_te_handle_notif()
185 le32toh(notif->action)); in iwm_te_handle_notif()
187 if (!le32toh(notif->status)) { in iwm_te_handle_notif()
191 if (notif->action & htole32(IWM_TE_V2_NOTIF_HOST_EVENT_START)) in iwm_te_handle_notif()
200 if (le32toh(notif->action) & IWM_TE_V2_NOTIF_HOST_EVENT_END) { in iwm_te_handle_notif()
202 "TE ended - current time %d, estimated end %d\n", in iwm_te_handle_notif()
203 ticks, sc->sc_time_event_end_ticks); in iwm_te_handle_notif()
206 } else if (le32toh(notif->action) & IWM_TE_V2_NOTIF_HOST_EVENT_START) { in iwm_te_handle_notif()
207 sc->sc_time_event_end_ticks = in iwm_te_handle_notif()
208 ticks + TU_TO_HZ(sc->sc_time_event_duration); in iwm_te_handle_notif()
210 device_printf(sc->sc_dev, "Got TE with unknown action\n"); in iwm_te_handle_notif()
220 struct iwm_time_event_notif *notif = (void *)pkt->data; in iwm_rx_time_event_notif()
223 "Time event notification - UID = 0x%x action %d\n", in iwm_rx_time_event_notif()
224 le32toh(notif->unique_id), in iwm_rx_time_event_notif()
225 le32toh(notif->action)); in iwm_rx_time_event_notif()
237 if (pkt->hdr.code != IWM_TIME_EVENT_NOTIFICATION || in iwm_te_notif()
244 resp = (void *)pkt->data; in iwm_te_notif()
246 /* te_data->uid is already set in the TIME_EVENT_CMD response */ in iwm_te_notif()
247 if (le32toh(resp->unique_id) != sc->sc_time_event_uid) in iwm_te_notif()
251 "TIME_EVENT_NOTIFICATION response - UID = 0x%x\n", in iwm_te_notif()
252 sc->sc_time_event_uid); in iwm_te_notif()
253 if (!resp->status) { in iwm_te_notif()
268 if (pkt->hdr.code != IWM_TIME_EVENT_CMD || in iwm_time_event_response()
275 resp = (void *)pkt->data; in iwm_time_event_response()
278 if (le32toh(resp->id) != IWM_TE_BSS_STA_AGGRESSIVE_ASSOC) { in iwm_time_event_response()
281 le32toh(resp->id)); in iwm_time_event_response()
285 sc->sc_time_event_uid = le32toh(resp->unique_id); in iwm_time_event_response()
287 "TIME_EVENT_CMD response - UID = 0x%x\n", sc->sc_time_event_uid); in iwm_time_event_response()
303 "Add new TE, duration %d TU\n", le32toh(te_cmd->duration)); in iwm_time_event_send_add()
305 sc->sc_time_event_duration = le32toh(te_cmd->duration); in iwm_time_event_send_add()
316 iwm_init_notification_wait(sc->sc_notif_wait, &wait_time_event, in iwm_time_event_send_add()
327 iwm_remove_notification(sc->sc_notif_wait, &wait_time_event); in iwm_time_event_send_add()
333 ret = iwm_wait_notification(sc->sc_notif_wait, &wait_time_event, 1); in iwm_time_event_send_add()
354 if (sc->sc_flags & IWM_FLAG_TE_ACTIVE) in iwm_protect_session()
359 htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)); in iwm_protect_session()
378 sc->sc_flags |= IWM_FLAG_TE_ACTIVE; in iwm_protect_session()
386 iwm_init_notification_wait(sc->sc_notif_wait, &wait_te_notif, in iwm_protect_session()
390 /* If TE was sent OK - wait for the notification that started */ in iwm_protect_session()
393 "%s: Failed to add TE to protect session\n", __func__); in iwm_protect_session()
394 iwm_remove_notification(sc->sc_notif_wait, &wait_te_notif); in iwm_protect_session()
396 sc->sc_flags |= IWM_FLAG_TE_ACTIVE; in iwm_protect_session()
398 if (iwm_wait_notification(sc->sc_notif_wait, &wait_te_notif, in iwm_protect_session()
401 "%s: Failed to protect session until TE\n", in iwm_protect_session()
414 if ((sc->sc_flags & IWM_FLAG_TE_ACTIVE) == 0) in iwm_stop_session_protection()
417 time_cmd.id = htole32(sc->sc_time_event_uid); in iwm_stop_session_protection()
420 htole32(IWM_FW_CMD_ID_AND_COLOR(ivp->id, ivp->color)); in iwm_stop_session_protection()
423 "%s: Removing TE 0x%x\n", __func__, le32toh(time_cmd.id)); in iwm_stop_session_protection()