u32 n_channels;
s32 i;
s32 offset;
- __le16 chanspec;
+ u16 chanspec;
u16 channel;
struct ieee80211_channel *req_channel;
char *ptr;
- struct brcmf_ssid ssid;
+ struct brcmf_ssid_le ssid_le;
memcpy(params_le->bssid, ether_bcast, ETH_ALEN);
params_le->bss_type = DOT11_BSSTYPE_ANY;
chanspec |= WL_CHANSPEC_CTL_SB_UPPER;
}
- params_le->channel_list[i] =
- (channel & WL_CHANSPEC_CHAN_MASK) |
- chanspec;
+ chanspec |= (channel & WL_CHANSPEC_CHAN_MASK);
WL_SCAN("Chan : %d, Channel spec: %x\n",
- channel, params_le->channel_list[i]);
- params_le->channel_list[i] =
- cpu_to_le16(params_le->channel_list[i]);
+ channel, chanspec);
+ params_le->channel_list[i] = cpu_to_le16(chanspec);
}
} else {
WL_SCAN("Scanning all channels\n");
offset = roundup(offset, sizeof(u32));
ptr = (char *)params_le + offset;
for (i = 0; i < n_ssids; i++) {
- memset(&ssid, 0, sizeof(ssid));
- ssid.SSID_len = cpu_to_le32(request->ssids[i].ssid_len);
- memcpy(ssid.SSID, request->ssids[i].ssid,
- request->ssids[i].ssid_len);
- if (!ssid.SSID_len)
+ memset(&ssid_le, 0, sizeof(ssid_le));
+ ssid_le.SSID_len =
+ cpu_to_le32(request->ssids[i].ssid_len);
+ memcpy(ssid_le.SSID, request->ssids[i].ssid,
+ request->ssids[i].ssid_len);
+ if (!ssid_le.SSID_len)
WL_SCAN("%d: Broadcast scan\n", i);
else
WL_SCAN("%d: scan for %s size =%d\n", i,
- ssid.SSID, ssid.SSID_len);
- memcpy(ptr, &ssid, sizeof(ssid));
- ptr += sizeof(ssid);
+ ssid_le.SSID, ssid_le.SSID_len);
+ memcpy(ptr, &ssid_le, sizeof(ssid_le));
+ ptr += sizeof(ssid_le);
}
} else {
WL_SCAN("Broadcast scan %p\n", request->ssids);
!memcmp(bss_info_le->SSID, bss->SSID, bss_info_le->SSID_len)) {
if ((bss->flags & WLC_BSS_RSSI_ON_CHANNEL) ==
(bss_info_le->flags & WLC_BSS_RSSI_ON_CHANNEL)) {
+ s16 bss_rssi = le16_to_cpu(bss->RSSI);
+ s16 bss_info_rssi = le16_to_cpu(bss_info_le->RSSI);
+
/* preserve max RSSI if the measurements are
* both on-channel or both off-channel
*/
- if (bss_info_le->RSSI > bss->RSSI)
+ if (bss_info_rssi > bss_rssi)
bss->RSSI = bss_info_le->RSSI;
} else if ((bss->flags & WLC_BSS_RSSI_ON_CHANNEL) &&
(bss_info_le->flags & WLC_BSS_RSSI_ON_CHANNEL) == 0) {