software/drivers/sd8887/src/wlan/mlan/mlan_wmm.c
/**
 *  @brief  Allocate and add a RA list for all TIDs with the given RA
 *
 *  @param priv  Pointer to the mlan_private driver data struct
 *  @param ra	 Address of the receiver STA (AP in case of infra)
 *
 *  @return      N/A
 */
@brief  Allocate and add a RA list for all TIDs with the given RA
@param priv  Pointer to the mlan_private driver data struct
@param ra    Address of the receiver STA (AP in case of infra)

@return      N/A
@brief Allocate and add a RA list for all TIDs with the given RA @param priv Pointer to the mlan_private driver data struct @param ra Address of the receiver STA ( AP in case of infra ) @return N / A
void
wlan_ralist_add(mlan_private *priv, t_u8 *ra)
{
	int i;
	raListTbl *ra_list;
	pmlan_adapter pmadapter = priv->adapter;
	tdlsStatus_e status;
	ENTER();
	for (i = 0; i < MAX_NUM_TID; ++i) {
		ra_list = wlan_wmm_allocate_ralist_node(pmadapter, ra);
		PRINTM(MINFO, "Creating RA List %p for tid %d\n", ra_list, i);
		if (!ra_list)
			break;
		ra_list->max_amsdu = 0;
		ra_list->ba_status = BA_STREAM_NOT_SETUP;
		ra_list->amsdu_in_ampdu = MFALSE;
		if (queuing_ra_based(priv)) {
			ra_list->is_11n_enabled = wlan_is_11n_enabled(priv, ra);
			if (ra_list->is_11n_enabled)
				ra_list->max_amsdu =
					get_station_max_amsdu_size(priv, ra);
			ra_list->tx_pause = wlan_is_tx_pause(priv, ra);
		} else {
			ra_list->is_tdls_link = MFALSE;
			ra_list->tx_pause = MFALSE;
			status = wlan_get_tdls_link_status(priv, ra);
			if (MTRUE == wlan_is_tdls_link_setup(status)) {
				ra_list->is_11n_enabled =
					is_station_11n_enabled(priv, ra);
				if (ra_list->is_11n_enabled)
					ra_list->max_amsdu =
						get_station_max_amsdu_size(priv,
									   ra);
				ra_list->is_tdls_link = MTRUE;
			} else {
				ra_list->is_11n_enabled = IS_11N_ENABLED(priv);
				if (ra_list->is_11n_enabled)
					ra_list->max_amsdu = priv->max_amsdu;
			}
		}
		PRINTM_NETINTF(MINFO, priv);
		PRINTM(MINFO, "ralist %p: is_11n_enabled=%d max_amsdu=%d\n",
		       ra_list, ra_list->is_11n_enabled, ra_list->max_amsdu);
		if (ra_list->is_11n_enabled) {
			ra_list->packet_count = 0;
			ra_list->ba_packet_threshold =
				wlan_get_random_ba_threshold(pmadapter);
		}
		util_enqueue_list_tail(pmadapter->pmoal_handle,
				       &priv->wmm.tid_tbl_ptr[i].ra_list,
				       (pmlan_linked_list)ra_list, MNULL,
				       MNULL);
		if (!priv->wmm.tid_tbl_ptr[i].ra_list_curr)
			priv->wmm.tid_tbl_ptr[i].ra_list_curr = ra_list;
	}
	LEAVE();
}
void wlan_ralist_add ( mlan_private * priv , t_u8 * ra ) { int i ; raListTbl * ra_list ; pmlan_adapter pmadapter = priv -> adapter ; tdlsStatus_e status ; ENTER ( ) ; for ( i = 0 ; i < MAX_NUM_TID ; ++ i ) { ra_list = wlan_wmm_allocate_ralist_node ( pmadapter , ra ) ; PRINTM ( MINFO , " \n " , ra_list , i ) ; if ( ! ra_list ) break ; ra_list -> max_amsdu = 0 ; ra_list -> ba_status = BA_STREAM_NOT_SETUP ; ra_list -> amsdu_in_ampdu = MFALSE ; if ( queuing_ra_based ( priv ) ) { ra_list -> is_11n_enabled = wlan_is_11n_enabled ( priv , ra ) ; if ( ra_list -> is_11n_enabled ) ra_list -> max_amsdu = get_station_max_amsdu_size ( priv , ra ) ; ra_list -> tx_pause = wlan_is_tx_pause ( priv , ra ) ; } else { ra_list -> is_tdls_link = MFALSE ; ra_list -> tx_pause = MFALSE ; status = wlan_get_tdls_link_status ( priv , ra ) ; if ( MTRUE == wlan_is_tdls_link_setup ( status ) ) { ra_list -> is_11n_enabled = is_station_11n_enabled ( priv , ra ) ; if ( ra_list -> is_11n_enabled ) ra_list -> max_amsdu = get_station_max_amsdu_size ( priv , ra ) ; ra_list -> is_tdls_link = MTRUE ; } else { ra_list -> is_11n_enabled = IS_11N_ENABLED ( priv ) ; if ( ra_list -> is_11n_enabled ) ra_list -> max_amsdu = priv -> max_amsdu ; } } PRINTM_NETINTF ( MINFO , priv ) ; PRINTM ( MINFO , " \n " , ra_list , ra_list -> is_11n_enabled , ra_list -> max_amsdu ) ; if ( ra_list -> is_11n_enabled ) { ra_list -> packet_count = 0 ; ra_list -> ba_packet_threshold = wlan_get_random_ba_threshold ( pmadapter ) ; } util_enqueue_list_tail ( pmadapter -> pmoal_handle , & priv -> wmm . tid_tbl_ptr [ i ] . ra_list , ( pmlan_linked_list ) ra_list , MNULL , MNULL ) ; if ( ! priv -> wmm . tid_tbl_ptr [ i ] . ra_list_curr ) priv -> wmm . tid_tbl_ptr [ i ] . ra_list_curr = ra_list ; } LEAVE ( ) ; }
@brief  Allocate and add a RA list for all TIDs with the given RA
  @param priv  Pointer to the mlan_private driver data struct
  @param ra    Address of the receiver STA (AP in case of infra)
@brief Allocate and add a RA list for all TIDs with the given RA @param priv Pointer to the mlan_private driver data struct @param ra Address of the receiver STA ( AP in case of infra )