software/drivers/sd8887/src/wlan/mlan/mlan_wmm.c
/**
 *  @brief Initialize the WMM state information and the WMM data path queues.
 *
 *  @param pmadapter  Pointer to the mlan_adapter data structure
 *
 *  @return         N/A
 */
@brief Initialize the WMM state information and the WMM data path queues.
@param pmadapter  Pointer to the mlan_adapter data structure

@return         N/A
@brief Initialize the WMM state information and the WMM data path queues . @param pmadapter Pointer to the mlan_adapter data structure @return N / A
t_void
wlan_wmm_init(pmlan_adapter pmadapter)
{
	int i, j;
	pmlan_private priv;
	ENTER();
	for (j = 0; j < pmadapter->priv_num; ++j) {
		priv = pmadapter->priv[j];
		if (priv) {
			for (i = 0; i < MAX_NUM_TID; ++i) {
				priv->aggr_prio_tbl[i].amsdu =
					tos_to_tid_inv[i];
				priv->aggr_prio_tbl[i].ampdu_ap =
					priv->aggr_prio_tbl[i].ampdu_user =
					tos_to_tid_inv[i];
				priv->ibss_ampdu[i] =
					priv->aggr_prio_tbl[i].ampdu_user;
				priv->wmm.pkts_queued[i] = 0;
				priv->wmm.pkts_paused[i] = 0;
				priv->wmm.tid_tbl_ptr[i].ra_list_curr = MNULL;
			}
			priv->wmm.drv_pkt_delay_max = WMM_DRV_DELAY_MAX;
			priv->aggr_prio_tbl[6].amsdu = BA_STREAM_NOT_ALLOWED;
			priv->aggr_prio_tbl[7].amsdu = BA_STREAM_NOT_ALLOWED;
			priv->aggr_prio_tbl[6].ampdu_ap
				= priv->aggr_prio_tbl[6].ampdu_user =
				BA_STREAM_NOT_ALLOWED;
			priv->ibss_ampdu[6] = BA_STREAM_NOT_ALLOWED;
			priv->aggr_prio_tbl[7].ampdu_ap
				= priv->aggr_prio_tbl[7].ampdu_user =
				BA_STREAM_NOT_ALLOWED;
			priv->ibss_ampdu[7] = BA_STREAM_NOT_ALLOWED;
			priv->add_ba_param.timeout =
				MLAN_DEFAULT_BLOCK_ACK_TIMEOUT;
#ifdef STA_SUPPORT
			if (priv->bss_type == MLAN_BSS_TYPE_STA) {
				priv->add_ba_param.tx_win_size =
					MLAN_STA_AMPDU_DEF_TXWINSIZE;
				priv->add_ba_param.rx_win_size =
					MLAN_STA_AMPDU_DEF_RXWINSIZE;
			}
#endif
#ifdef WIFI_DIRECT_SUPPORT
			if (priv->bss_type == MLAN_BSS_TYPE_WIFIDIRECT) {
				priv->add_ba_param.tx_win_size =
					MLAN_WFD_AMPDU_DEF_TXRXWINSIZE;
				priv->add_ba_param.rx_win_size =
					MLAN_WFD_AMPDU_DEF_TXRXWINSIZE;
			}
#endif
			if (priv->bss_type == MLAN_BSS_TYPE_NAN) {
				priv->add_ba_param.tx_win_size =
					MLAN_NAN_AMPDU_DEF_TXRXWINSIZE;
				priv->add_ba_param.rx_win_size =
					MLAN_NAN_AMPDU_DEF_TXRXWINSIZE;
			}
#ifdef UAP_SUPPORT
			if (priv->bss_type == MLAN_BSS_TYPE_UAP) {
				priv->add_ba_param.tx_win_size =
					MLAN_UAP_AMPDU_DEF_TXWINSIZE;
				priv->add_ba_param.rx_win_size =
					MLAN_UAP_AMPDU_DEF_RXWINSIZE;
			}
#endif
			priv->user_rxwinsize = priv->add_ba_param.rx_win_size;
			priv->add_ba_param.tx_amsdu = MTRUE;
			priv->add_ba_param.rx_amsdu = MTRUE;
			memset(priv->adapter, priv->rx_seq, 0xff,
			       sizeof(priv->rx_seq));
			wlan_wmm_default_queue_priorities(priv);
		}
	}
	LEAVE();
}
t_void wlan_wmm_init ( pmlan_adapter pmadapter ) { int i , j ; pmlan_private priv ; ENTER ( ) ; for ( j = 0 ; j < pmadapter -> priv_num ; ++ j ) { priv = pmadapter -> priv [ j ] ; if ( priv ) { for ( i = 0 ; i < MAX_NUM_TID ; ++ i ) { priv -> aggr_prio_tbl [ i ] . amsdu = tos_to_tid_inv [ i ] ; priv -> aggr_prio_tbl [ i ] . ampdu_ap = priv -> aggr_prio_tbl [ i ] . ampdu_user = tos_to_tid_inv [ i ] ; priv -> ibss_ampdu [ i ] = priv -> aggr_prio_tbl [ i ] . ampdu_user ; priv -> wmm . pkts_queued [ i ] = 0 ; priv -> wmm . pkts_paused [ i ] = 0 ; priv -> wmm . tid_tbl_ptr [ i ] . ra_list_curr = MNULL ; } priv -> wmm . drv_pkt_delay_max = WMM_DRV_DELAY_MAX ; priv -> aggr_prio_tbl [ 6 ] . amsdu = BA_STREAM_NOT_ALLOWED ; priv -> aggr_prio_tbl [ 7 ] . amsdu = BA_STREAM_NOT_ALLOWED ; priv -> aggr_prio_tbl [ 6 ] . ampdu_ap = priv -> aggr_prio_tbl [ 6 ] . ampdu_user = BA_STREAM_NOT_ALLOWED ; priv -> ibss_ampdu [ 6 ] = BA_STREAM_NOT_ALLOWED ; priv -> aggr_prio_tbl [ 7 ] . ampdu_ap = priv -> aggr_prio_tbl [ 7 ] . ampdu_user = BA_STREAM_NOT_ALLOWED ; priv -> ibss_ampdu [ 7 ] = BA_STREAM_NOT_ALLOWED ; priv -> add_ba_param . timeout = MLAN_DEFAULT_BLOCK_ACK_TIMEOUT ; #ifdef STA_SUPPORT if ( priv -> bss_type == MLAN_BSS_TYPE_STA ) { priv -> add_ba_param . tx_win_size = MLAN_STA_AMPDU_DEF_TXWINSIZE ; priv -> add_ba_param . rx_win_size = MLAN_STA_AMPDU_DEF_RXWINSIZE ; } #endif #ifdef WIFI_DIRECT_SUPPORT if ( priv -> bss_type == MLAN_BSS_TYPE_WIFIDIRECT ) { priv -> add_ba_param . tx_win_size = MLAN_WFD_AMPDU_DEF_TXRXWINSIZE ; priv -> add_ba_param . rx_win_size = MLAN_WFD_AMPDU_DEF_TXRXWINSIZE ; } #endif if ( priv -> bss_type == MLAN_BSS_TYPE_NAN ) { priv -> add_ba_param . tx_win_size = MLAN_NAN_AMPDU_DEF_TXRXWINSIZE ; priv -> add_ba_param . rx_win_size = MLAN_NAN_AMPDU_DEF_TXRXWINSIZE ; } #ifdef UAP_SUPPORT if ( priv -> bss_type == MLAN_BSS_TYPE_UAP ) { priv -> add_ba_param . tx_win_size = MLAN_UAP_AMPDU_DEF_TXWINSIZE ; priv -> add_ba_param . rx_win_size = MLAN_UAP_AMPDU_DEF_RXWINSIZE ; } #endif priv -> user_rxwinsize = priv -> add_ba_param . rx_win_size ; priv -> add_ba_param . tx_amsdu = MTRUE ; priv -> add_ba_param . rx_amsdu = MTRUE ; memset ( priv -> adapter , priv -> rx_seq , 0xff , sizeof ( priv -> rx_seq ) ) ; wlan_wmm_default_queue_priorities ( priv ) ; } } LEAVE ( ) ; }
@brief Initialize the WMM state information and the WMM data path queues.
@brief Initialize the WMM state information and the WMM data path queues .