software/drivers/sd8887/src/wlan/mlan/mlan_cfp.c
/**
 *  @brief Covert Rate Bitmap to Rate index
 *
 *  @param pmadapter    Pointer to mlan_adapter structure
 *  @param rate_bitmap  Pointer to rate bitmap
 *  @param size         Size of the bitmap array
 *
 *  @return             Rate index
 */
@brief Covert Rate Bitmap to Rate index
@param pmadapter    Pointer to mlan_adapter structure
@param rate_bitmap  Pointer to rate bitmap
@param size         Size of the bitmap array

@return             Rate index
@brief Covert Rate Bitmap to Rate index @param pmadapter Pointer to mlan_adapter structure @param rate_bitmap Pointer to rate bitmap @param size Size of the bitmap array @return Rate index
int
wlan_get_rate_index(pmlan_adapter pmadapter, t_u16 *rate_bitmap, int size)
{
	int i;
	ENTER();
	for (i = 0; i < size * 8; i++) {
		if (rate_bitmap[i / 16] & (1 << (i % 16))) {
			LEAVE();
			return i;
		}
	}
	LEAVE();
	return -1;
}
int wlan_get_rate_index ( pmlan_adapter pmadapter , t_u16 * rate_bitmap , int size ) { int i ; ENTER ( ) ; for ( i = 0 ; i < size * 8 ; i ++ ) { if ( rate_bitmap [ i / 16 ] & ( 1 << ( i % 16 ) ) ) { LEAVE ( ) ; return i ; } } LEAVE ( ) ; return -1 ; }
@brief Covert Rate Bitmap to Rate index
  @param pmadapter    Pointer to mlan_adapter structure
  @param rate_bitmap  Pointer to rate bitmap
  @param size         Size of the bitmap array
@brief Covert Rate Bitmap to Rate index @param pmadapter Pointer to mlan_adapter structure @param rate_bitmap Pointer to rate bitmap @param size Size of the bitmap array