software/drivers/sd8887/src/wlan/mlan/mlan_wmm.c
/**
 *  @brief Remove TDLS ralist and move packets to AP's ralist
 *
 *  @param priv		  A pointer to mlan_private
 *  @param mac        TDLS peer mac address
 *
 *  @return           N/A
 */
@brief Remove TDLS ralist and move packets to AP's ralist
@param priv           A pointer to mlan_private
@param mac        TDLS peer mac address

@return           N/A
@brief Remove TDLS ralist and move packets to AP ' s ralist @param priv A pointer to mlan_private @param mac TDLS peer mac address @return N / A
static t_void
wlan_wmm_delete_tdls_ralist(pmlan_private priv, t_u8 *mac)
{
	raListTbl *ra_list;
	raListTbl *ra_list_ap = MNULL;
	int i;
	pmlan_adapter pmadapter = priv->adapter;
	pmlan_buffer pmbuf;
	ENTER();
	for (i = 0; i < MAX_NUM_TID; ++i) {
		ra_list = wlan_wmm_get_ralist_node(priv, i, mac);
		if (ra_list) {
			PRINTM(MDATA, "delete TDLS ralist %p\n", ra_list);
			ra_list_ap =
				(raListTbl *)util_peek_list(pmadapter->
							    pmoal_handle,
							    &priv->wmm.
							    tid_tbl_ptr[i].
							    ra_list, MNULL,
							    MNULL);
			if (!ra_list_ap) {
				LEAVE();
				return;
			}
			while ((pmbuf =
				(pmlan_buffer)util_peek_list(pmadapter->
							     pmoal_handle,
							     &ra_list->buf_head,
							     MNULL, MNULL))) {
				util_unlink_list(pmadapter->pmoal_handle,
						 &ra_list->buf_head,
						 (pmlan_linked_list)pmbuf,
						 MNULL, MNULL);
				util_enqueue_list_tail(pmadapter->pmoal_handle,
						       &ra_list_ap->buf_head,
						       (pmlan_linked_list)pmbuf,
						       MNULL, MNULL);
				ra_list_ap->total_pkts++;
				ra_list_ap->packet_count++;
			}
			util_free_list_head((t_void *)pmadapter->pmoal_handle,
					    &ra_list->buf_head,
					    pmadapter->callbacks.
					    moal_free_lock);
			util_unlink_list(pmadapter->pmoal_handle,
					 &priv->wmm.tid_tbl_ptr[i].ra_list,
					 (pmlan_linked_list)ra_list, MNULL,
					 MNULL);
			pmadapter->callbacks.moal_mfree(pmadapter->pmoal_handle,
							(t_u8 *)ra_list);
			if (priv->wmm.tid_tbl_ptr[i].ra_list_curr == ra_list)
				priv->wmm.tid_tbl_ptr[i].ra_list_curr =
					ra_list_ap;
		}
	}
	LEAVE();
}
static t_void wlan_wmm_delete_tdls_ralist ( pmlan_private priv , t_u8 * mac ) { raListTbl * ra_list ; raListTbl * ra_list_ap = MNULL ; int i ; pmlan_adapter pmadapter = priv -> adapter ; pmlan_buffer pmbuf ; ENTER ( ) ; for ( i = 0 ; i < MAX_NUM_TID ; ++ i ) { ra_list = wlan_wmm_get_ralist_node ( priv , i , mac ) ; if ( ra_list ) { PRINTM ( MDATA , " \n " , ra_list ) ; ra_list_ap = ( raListTbl * ) util_peek_list ( pmadapter -> pmoal_handle , & priv -> wmm . tid_tbl_ptr [ i ] . ra_list , MNULL , MNULL ) ; if ( ! ra_list_ap ) { LEAVE ( ) ; return ; } while ( ( pmbuf = ( pmlan_buffer ) util_peek_list ( pmadapter -> pmoal_handle , & ra_list -> buf_head , MNULL , MNULL ) ) ) { util_unlink_list ( pmadapter -> pmoal_handle , & ra_list -> buf_head , ( pmlan_linked_list ) pmbuf , MNULL , MNULL ) ; util_enqueue_list_tail ( pmadapter -> pmoal_handle , & ra_list_ap -> buf_head , ( pmlan_linked_list ) pmbuf , MNULL , MNULL ) ; ra_list_ap -> total_pkts ++ ; ra_list_ap -> packet_count ++ ; } util_free_list_head ( ( t_void * ) pmadapter -> pmoal_handle , & ra_list -> buf_head , pmadapter -> callbacks . moal_free_lock ) ; util_unlink_list ( pmadapter -> pmoal_handle , & priv -> wmm . tid_tbl_ptr [ i ] . ra_list , ( pmlan_linked_list ) ra_list , MNULL , MNULL ) ; pmadapter -> callbacks . moal_mfree ( pmadapter -> pmoal_handle , ( t_u8 * ) ra_list ) ; if ( priv -> wmm . tid_tbl_ptr [ i ] . ra_list_curr == ra_list ) priv -> wmm . tid_tbl_ptr [ i ] . ra_list_curr = ra_list_ap ; } } LEAVE ( ) ; }
@brief Remove TDLS ralist and move packets to AP's ralist
  @param priv           A pointer to mlan_private
  @param mac        TDLS peer mac address
@brief Remove TDLS ralist and move packets to AP ' s ralist @param priv A pointer to mlan_private @param mac TDLS peer mac address