|
@@ -1541,22 +1541,16 @@ static void util_gen_new_bssid(uint8_t *bssid, uint8_t max_bssid,
|
|
|
uint8_t mbssid_index,
|
|
|
uint8_t *new_bssid_addr)
|
|
|
{
|
|
|
- uint64_t bssid_tmp = 0, new_bssid = 0;
|
|
|
- uint64_t lsb_n;
|
|
|
+ uint8_t lsb_n;
|
|
|
int i;
|
|
|
|
|
|
for (i = 0; i < QDF_MAC_ADDR_SIZE; i++)
|
|
|
- bssid_tmp = bssid_tmp << 8 | bssid[i];
|
|
|
+ new_bssid_addr[i] = bssid[i];
|
|
|
|
|
|
- lsb_n = bssid_tmp & ((1 << max_bssid) - 1);
|
|
|
- new_bssid = bssid_tmp;
|
|
|
- new_bssid &= ~((1 << max_bssid) - 1);
|
|
|
- new_bssid |= qdf_do_div((lsb_n + mbssid_index), (1 << max_bssid));
|
|
|
+ lsb_n = new_bssid_addr[5] & ((1 << max_bssid) - 1);
|
|
|
|
|
|
- for (i = QDF_MAC_ADDR_SIZE - 1; i >= 0; i--) {
|
|
|
- new_bssid_addr[i] = new_bssid & 0xff;
|
|
|
- new_bssid = new_bssid >> 8;
|
|
|
- }
|
|
|
+ new_bssid_addr[5] &= ~((1 << max_bssid) - 1);
|
|
|
+ new_bssid_addr[5] |= (lsb_n + mbssid_index) % (1 << max_bssid);
|
|
|
}
|
|
|
|
|
|
static uint32_t util_gen_new_ie(uint8_t *ie, uint32_t ielen,
|