qcacmn: Get NSS info from SS bitmap
Get NSS info from a the MIMO SS bitmap within msdu_start info Change-Id: I794b093783b5f1ffc7faf335da84cbc07375d520 CRs-Fixed: 2215660
这个提交包含在:
@@ -1532,10 +1532,23 @@ hal_rx_msdu_start_nss_get(uint8_t *buf)
|
||||
return nss;
|
||||
}
|
||||
#else
|
||||
#define HAL_RX_MSDU_START_MIMO_SS_BITMAP(_rx_msdu_start) \
|
||||
(_HAL_MS((*_OFFSET_TO_WORD_PTR((_rx_msdu_start),\
|
||||
RX_MSDU_START_5_MIMO_SS_BITMAP_OFFSET)), \
|
||||
RX_MSDU_START_5_MIMO_SS_BITMAP_MASK, \
|
||||
RX_MSDU_START_5_MIMO_SS_BITMAP_LSB))
|
||||
|
||||
static inline uint32_t
|
||||
hal_rx_msdu_start_nss_get(uint8_t *buf)
|
||||
{
|
||||
return 0;
|
||||
struct rx_pkt_tlvs *pkt_tlvs = (struct rx_pkt_tlvs *)buf;
|
||||
struct rx_msdu_start *msdu_start =
|
||||
&pkt_tlvs->msdu_start_tlv.rx_msdu_start;
|
||||
uint8_t mimo_ss_bitmap;
|
||||
|
||||
mimo_ss_bitmap = HAL_RX_MSDU_START_MIMO_SS_BITMAP(msdu_start);
|
||||
|
||||
return qdf_get_hweight8(mimo_ss_bitmap);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -576,6 +576,22 @@ int qdf_get_cpu(void)
|
||||
return __qdf_get_cpu();
|
||||
}
|
||||
|
||||
/**
|
||||
* qdf_get_hweight8() - count num of 1's in bitmap
|
||||
* @value: input bitmap
|
||||
*
|
||||
* Count num of 1's set in the bitmap
|
||||
*
|
||||
* Return: num of 1's
|
||||
*/
|
||||
static inline
|
||||
unsigned int qdf_get_hweight8(unsigned int w)
|
||||
{
|
||||
unsigned int res = w - ((w >> 1) & 0x55);
|
||||
res = (res & 0x33) + ((res >> 2) & 0x33);
|
||||
return (res + (res >> 4)) & 0x0F;
|
||||
}
|
||||
|
||||
/**
|
||||
* qdf_device_init_wakeup() - allow a device to wake up the aps system
|
||||
* @qdf_dev: the qdf device context
|
||||
|
在新工单中引用
屏蔽一个用户