software/drivers/sd8887/src/wlan/mlan/mlan_sta_event.c
/**
 *  @brief This function send the tdls teardown request event.
 *
 *  @param priv    A pointer to mlan_private
 *
 *  @return        N/A
 */
@brief This function send the tdls teardown request event.
@param priv    A pointer to mlan_private

@return        N/A
@brief This function send the tdls teardown request event . @param priv A pointer to mlan_private @return N / A
void
wlan_send_tdls_tear_down_request(pmlan_private priv)
{
	t_u8 event_buf[100];
	mlan_event *ptdls_event = (mlan_event *)event_buf;
	tdls_tear_down_event *tdls_evt =
		(tdls_tear_down_event *)ptdls_event->event_buf;
	sta_node *sta_ptr = MNULL;
	ENTER();
	sta_ptr = (sta_node *)util_peek_list(priv->adapter->pmoal_handle,
					     &priv->sta_list,
					     priv->adapter->callbacks.
					     moal_spin_lock,
					     priv->adapter->callbacks.
					     moal_spin_unlock);
	if (!sta_ptr) {
		LEAVE();
		return;
	}
	while (sta_ptr != (sta_node *)&priv->sta_list) {
		if (sta_ptr->external_tdls) {
			ptdls_event->bss_index = priv->bss_index;
			ptdls_event->event_id =
				MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ;
			ptdls_event->event_len = sizeof(tdls_tear_down_event);
			memcpy(priv->adapter, (t_u8 *)tdls_evt->peer_mac_addr,
			       sta_ptr->mac_addr, MLAN_MAC_ADDR_LENGTH);
			tdls_evt->reason_code =
				MLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED;
			wlan_recv_event(priv,
					MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ,
					ptdls_event);
		}
		sta_ptr = sta_ptr->pnext;
	}
	LEAVE();
	return;
}
void wlan_send_tdls_tear_down_request ( pmlan_private priv ) { t_u8 event_buf [ 100 ] ; mlan_event * ptdls_event = ( mlan_event * ) event_buf ; tdls_tear_down_event * tdls_evt = ( tdls_tear_down_event * ) ptdls_event -> event_buf ; sta_node * sta_ptr = MNULL ; ENTER ( ) ; sta_ptr = ( sta_node * ) util_peek_list ( priv -> adapter -> pmoal_handle , & priv -> sta_list , priv -> adapter -> callbacks . moal_spin_lock , priv -> adapter -> callbacks . moal_spin_unlock ) ; if ( ! sta_ptr ) { LEAVE ( ) ; return ; } while ( sta_ptr != ( sta_node * ) & priv -> sta_list ) { if ( sta_ptr -> external_tdls ) { ptdls_event -> bss_index = priv -> bss_index ; ptdls_event -> event_id = MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ ; ptdls_event -> event_len = sizeof ( tdls_tear_down_event ) ; memcpy ( priv -> adapter , ( t_u8 * ) tdls_evt -> peer_mac_addr , sta_ptr -> mac_addr , MLAN_MAC_ADDR_LENGTH ) ; tdls_evt -> reason_code = MLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED ; wlan_recv_event ( priv , MLAN_EVENT_ID_DRV_TDLS_TEARDOWN_REQ , ptdls_event ) ; } sta_ptr = sta_ptr -> pnext ; } LEAVE ( ) ; return ; }
@brief This function send the tdls teardown request event.
@brief This function send the tdls teardown request event .