diff options
author | Dan Williams <dcbw@redhat.com> | 2007-05-25 13:16:38 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-06-11 14:28:40 -0400 |
commit | 4ace1138767869547944798ba9f1fd6d1e048acb (patch) | |
tree | aa701b2c1c518e929be679d60223be1bb4e3b365 /drivers/net/wireless/libertas/scan.c | |
parent | 7732ca45c68f893689a8c0d8c6e2eb2bfefbc087 (diff) |
[PATCH] libertas: replace 'macaddress' with 'bssid'
Start to normalize bss_descriptor with ieee80211_network so we can
eventually replace bss_descriptor more easily.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/scan.c')
-rw-r--r-- | drivers/net/wireless/libertas/scan.c | 51 |
1 files changed, 24 insertions, 27 deletions
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index 479c0090b947..e009f9bd0ec7 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c | |||
@@ -229,7 +229,7 @@ static void wlan_scan_process_results(wlan_private * priv) | |||
229 | if (!libertas_SSID_cmp(&adapter->scantable[i].ssid, | 229 | if (!libertas_SSID_cmp(&adapter->scantable[i].ssid, |
230 | &adapter->curbssparams.ssid) && | 230 | &adapter->curbssparams.ssid) && |
231 | !memcmp(adapter->curbssparams.bssid, | 231 | !memcmp(adapter->curbssparams.bssid, |
232 | adapter->scantable[i].macaddress, | 232 | adapter->scantable[i].bssid, |
233 | ETH_ALEN)) { | 233 | ETH_ALEN)) { |
234 | foundcurrent = 1; | 234 | foundcurrent = 1; |
235 | } | 235 | } |
@@ -247,12 +247,12 @@ static void wlan_scan_process_results(wlan_private * priv) | |||
247 | lbs_deb_scan("Scan:(%02d) %02x:%02x:%02x:%02x:%02x:%02x, " | 247 | lbs_deb_scan("Scan:(%02d) %02x:%02x:%02x:%02x:%02x:%02x, " |
248 | "RSSI[%03d], SSID[%s]\n", | 248 | "RSSI[%03d], SSID[%s]\n", |
249 | i, | 249 | i, |
250 | adapter->scantable[i].macaddress[0], | 250 | adapter->scantable[i].bssid[0], |
251 | adapter->scantable[i].macaddress[1], | 251 | adapter->scantable[i].bssid[1], |
252 | adapter->scantable[i].macaddress[2], | 252 | adapter->scantable[i].bssid[2], |
253 | adapter->scantable[i].macaddress[3], | 253 | adapter->scantable[i].bssid[3], |
254 | adapter->scantable[i].macaddress[4], | 254 | adapter->scantable[i].bssid[4], |
255 | adapter->scantable[i].macaddress[5], | 255 | adapter->scantable[i].bssid[5], |
256 | (s32) adapter->scantable[i].rssi, | 256 | (s32) adapter->scantable[i].rssi, |
257 | adapter->scantable[i].ssid.ssid); | 257 | adapter->scantable[i].ssid.ssid); |
258 | } | 258 | } |
@@ -963,11 +963,11 @@ static int InterpretBSSDescriptionWithIE(struct bss_descriptor * pBSSEntry, | |||
963 | 963 | ||
964 | bytesleftforcurrentbeacon = beaconsize; | 964 | bytesleftforcurrentbeacon = beaconsize; |
965 | 965 | ||
966 | memcpy(pBSSEntry->macaddress, pcurrentptr, ETH_ALEN); | 966 | memcpy(pBSSEntry->bssid, pcurrentptr, ETH_ALEN); |
967 | lbs_deb_scan("InterpretIE: AP MAC Addr-%x:%x:%x:%x:%x:%x\n", | 967 | lbs_deb_scan("InterpretIE: AP MAC Addr-%x:%x:%x:%x:%x:%x\n", |
968 | pBSSEntry->macaddress[0], pBSSEntry->macaddress[1], | 968 | pBSSEntry->bssid[0], pBSSEntry->bssid[1], |
969 | pBSSEntry->macaddress[2], pBSSEntry->macaddress[3], | 969 | pBSSEntry->bssid[2], pBSSEntry->bssid[3], |
970 | pBSSEntry->macaddress[4], pBSSEntry->macaddress[5]); | 970 | pBSSEntry->bssid[4], pBSSEntry->bssid[5]); |
971 | 971 | ||
972 | pcurrentptr += ETH_ALEN; | 972 | pcurrentptr += ETH_ALEN; |
973 | bytesleftforcurrentbeacon -= ETH_ALEN; | 973 | bytesleftforcurrentbeacon -= ETH_ALEN; |
@@ -1246,7 +1246,7 @@ int libertas_find_BSSID_in_list(wlan_adapter * adapter, u8 * bssid, u8 mode) | |||
1246 | * AP with multiple SSIDs assigned to the same BSSID | 1246 | * AP with multiple SSIDs assigned to the same BSSID |
1247 | */ | 1247 | */ |
1248 | for (i = 0; ret < 0 && i < adapter->numinscantable; i++) { | 1248 | for (i = 0; ret < 0 && i < adapter->numinscantable; i++) { |
1249 | if (!memcmp(adapter->scantable[i].macaddress, bssid, ETH_ALEN)) { | 1249 | if (!memcmp(adapter->scantable[i].bssid, bssid, ETH_ALEN)) { |
1250 | switch (mode) { | 1250 | switch (mode) { |
1251 | case IW_MODE_INFRA: | 1251 | case IW_MODE_INFRA: |
1252 | case IW_MODE_ADHOC: | 1252 | case IW_MODE_ADHOC: |
@@ -1285,8 +1285,7 @@ int libertas_find_SSID_in_list(wlan_adapter * adapter, | |||
1285 | for (i = 0; i < adapter->numinscantable; i++) { | 1285 | for (i = 0; i < adapter->numinscantable; i++) { |
1286 | if (!libertas_SSID_cmp(&adapter->scantable[i].ssid, ssid) && | 1286 | if (!libertas_SSID_cmp(&adapter->scantable[i].ssid, ssid) && |
1287 | (!bssid || | 1287 | (!bssid || |
1288 | !memcmp(adapter->scantable[i]. | 1288 | !memcmp(adapter->scantable[i].bssid, bssid, ETH_ALEN))) { |
1289 | macaddress, bssid, ETH_ALEN))) { | ||
1290 | switch (mode) { | 1289 | switch (mode) { |
1291 | case IW_MODE_INFRA: | 1290 | case IW_MODE_INFRA: |
1292 | case IW_MODE_ADHOC: | 1291 | case IW_MODE_ADHOC: |
@@ -1609,7 +1608,7 @@ int libertas_get_scan(struct net_device *dev, struct iw_request_info *info, | |||
1609 | iwe.cmd = SIOCGIWAP; | 1608 | iwe.cmd = SIOCGIWAP; |
1610 | iwe.u.ap_addr.sa_family = ARPHRD_ETHER; | 1609 | iwe.u.ap_addr.sa_family = ARPHRD_ETHER; |
1611 | memcpy(iwe.u.ap_addr.sa_data, | 1610 | memcpy(iwe.u.ap_addr.sa_data, |
1612 | &adapter->scantable[i].macaddress, ETH_ALEN); | 1611 | &adapter->scantable[i].bssid, ETH_ALEN); |
1613 | 1612 | ||
1614 | iwe.len = IW_EV_ADDR_LEN; | 1613 | iwe.len = IW_EV_ADDR_LEN; |
1615 | current_ev = | 1614 | current_ev = |
@@ -1945,24 +1944,22 @@ int libertas_ret_80211_scan(wlan_private * priv, struct cmd_ds_command *resp) | |||
1945 | 0) | 1944 | 0) |
1946 | && CHECK_SSID_IS_VALID(&newbssentry.ssid)) { | 1945 | && CHECK_SSID_IS_VALID(&newbssentry.ssid)) { |
1947 | 1946 | ||
1948 | lbs_deb_scan( | 1947 | lbs_deb_scan( |
1949 | "SCAN_RESP: BSSID = %02x:%02x:%02x:%02x:%02x:%02x\n", | 1948 | "SCAN_RESP: BSSID = %02x:%02x:%02x:%02x:%02x:%02x\n", |
1950 | newbssentry.macaddress[0], | 1949 | newbssentry.bssid[0], |
1951 | newbssentry.macaddress[1], | 1950 | newbssentry.bssid[1], |
1952 | newbssentry.macaddress[2], | 1951 | newbssentry.bssid[2], |
1953 | newbssentry.macaddress[3], | 1952 | newbssentry.bssid[3], |
1954 | newbssentry.macaddress[4], | 1953 | newbssentry.bssid[4], |
1955 | newbssentry.macaddress[5]); | 1954 | newbssentry.bssid[5]); |
1956 | 1955 | ||
1957 | /* | 1956 | /* |
1958 | * Search the scan table for the same bssid | 1957 | * Search the scan table for the same bssid |
1959 | */ | 1958 | */ |
1960 | for (bssIdx = 0; bssIdx < numintable; bssIdx++) { | 1959 | for (bssIdx = 0; bssIdx < numintable; bssIdx++) { |
1961 | if (memcmp(newbssentry.macaddress, | 1960 | if (memcmp(newbssentry.bssid, |
1962 | adapter->scantable[bssIdx]. | 1961 | adapter->scantable[bssIdx].bssid, |
1963 | macaddress, | 1962 | sizeof(newbssentry.bssid)) == 0) { |
1964 | sizeof(newbssentry.macaddress)) == | ||
1965 | 0) { | ||
1966 | /* | 1963 | /* |
1967 | * If the SSID matches as well, it is a duplicate of | 1964 | * If the SSID matches as well, it is a duplicate of |
1968 | * this entry. Keep the bssIdx set to this | 1965 | * this entry. Keep the bssIdx set to this |