Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57649
b: refs/heads/master
c: 4ace113
h: refs/heads/master
i:
  57647: 9463959
v: v3
  • Loading branch information
Dan Williams authored and John W. Linville committed Jun 11, 2007
1 parent a057ecb commit e3404b3
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 41 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7732ca45c68f893689a8c0d8c6e2eb2bfefbc087
refs/heads/master: 4ace1138767869547944798ba9f1fd6d1e048acb
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/libertas/assoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static int assoc_helper_essid(wlan_private *priv,
ret = wlan_associate(priv, &adapter->scantable[i]);
if (ret == 0) {
memcpy(&assoc_req->bssid,
&adapter->scantable[i].macaddress,
&adapter->scantable[i].bssid,
ETH_ALEN);
}
} else {
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/wireless/libertas/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ static ssize_t libertas_getscantable(struct file *file, char __user *userbuf,
pos += snprintf(buf+pos, len-pos,
"%02u| %03d | %03ld | %02x:%02x:%02x:%02x:%02x:%02x |",
numscansdone, pbssinfo->channel, pbssinfo->rssi,
pbssinfo->macaddress[0], pbssinfo->macaddress[1],
pbssinfo->macaddress[2], pbssinfo->macaddress[3],
pbssinfo->macaddress[4], pbssinfo->macaddress[5]);
pbssinfo->bssid[0], pbssinfo->bssid[1],
pbssinfo->bssid[2], pbssinfo->bssid[3],
pbssinfo->bssid[4], pbssinfo->bssid[5]);
pos += snprintf(buf+pos, len-pos, " %04x-", cap);
pos += snprintf(buf+pos, len-pos, "%c%c%c |",
pbssinfo->cap.ibss ? 'A' : 'I',
Expand Down
14 changes: 6 additions & 8 deletions trunk/drivers/net/wireless/libertas/join.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ int wlan_associate(wlan_private * priv, struct bss_descriptor * pbssdesc)

ret = libertas_prepare_and_send_command(priv, cmd_802_11_authenticate,
0, cmd_option_waitforrsp,
0, pbssdesc->macaddress);
0, pbssdesc->bssid);

if (ret)
goto done;
Expand Down Expand Up @@ -353,7 +353,7 @@ int libertas_cmd_80211_associate(wlan_private * priv,
adapter->pattemptedbssdesc = pbssdesc;

memcpy(passo->peerstaaddr,
pbssdesc->macaddress, sizeof(passo->peerstaaddr));
pbssdesc->bssid, sizeof(passo->peerstaaddr));
pos += sizeof(passo->peerstaaddr);

/* set the listen interval */
Expand Down Expand Up @@ -632,7 +632,7 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
padhocjoin->bssdescriptor.beaconperiod = pbssdesc->beaconperiod;

memcpy(&padhocjoin->bssdescriptor.BSSID,
&pbssdesc->macaddress, ETH_ALEN);
&pbssdesc->bssid, ETH_ALEN);

memcpy(&padhocjoin->bssdescriptor.SSID,
&pbssdesc->ssid.ssid, pbssdesc->ssid.ssidlength);
Expand Down Expand Up @@ -787,7 +787,7 @@ int libertas_ret_80211_associate(wlan_private * priv,

/* Set the new BSSID (AP's MAC address) to current BSSID */
memcpy(adapter->curbssparams.bssid,
pbssdesc->macaddress, ETH_ALEN);
pbssdesc->bssid, ETH_ALEN);

/* Make a copy of current BSSID descriptor */
memcpy(&adapter->curbssparams.bssdescriptor,
Expand Down Expand Up @@ -880,8 +880,7 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv,

if (command == cmd_ret_802_11_ad_hoc_start) {
/* Update the created network descriptor with the new BSSID */
memcpy(pbssdesc->macaddress,
padhocresult->BSSID, ETH_ALEN);
memcpy(pbssdesc->bssid, padhocresult->BSSID, ETH_ALEN);
} else {

/* Make a copy of current BSSID descriptor, only needed for join since
Expand All @@ -892,8 +891,7 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
}

/* Set the BSSID from the joined/started descriptor */
memcpy(&adapter->curbssparams.bssid,
pbssdesc->macaddress, ETH_ALEN);
memcpy(&adapter->curbssparams.bssid, pbssdesc->bssid, ETH_ALEN);

/* Set the new SSID to current SSID */
memcpy(&adapter->curbssparams.ssid,
Expand Down
51 changes: 24 additions & 27 deletions trunk/drivers/net/wireless/libertas/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ static void wlan_scan_process_results(wlan_private * priv)
if (!libertas_SSID_cmp(&adapter->scantable[i].ssid,
&adapter->curbssparams.ssid) &&
!memcmp(adapter->curbssparams.bssid,
adapter->scantable[i].macaddress,
adapter->scantable[i].bssid,
ETH_ALEN)) {
foundcurrent = 1;
}
Expand All @@ -247,12 +247,12 @@ static void wlan_scan_process_results(wlan_private * priv)
lbs_deb_scan("Scan:(%02d) %02x:%02x:%02x:%02x:%02x:%02x, "
"RSSI[%03d], SSID[%s]\n",
i,
adapter->scantable[i].macaddress[0],
adapter->scantable[i].macaddress[1],
adapter->scantable[i].macaddress[2],
adapter->scantable[i].macaddress[3],
adapter->scantable[i].macaddress[4],
adapter->scantable[i].macaddress[5],
adapter->scantable[i].bssid[0],
adapter->scantable[i].bssid[1],
adapter->scantable[i].bssid[2],
adapter->scantable[i].bssid[3],
adapter->scantable[i].bssid[4],
adapter->scantable[i].bssid[5],
(s32) adapter->scantable[i].rssi,
adapter->scantable[i].ssid.ssid);
}
Expand Down Expand Up @@ -963,11 +963,11 @@ static int InterpretBSSDescriptionWithIE(struct bss_descriptor * pBSSEntry,

bytesleftforcurrentbeacon = beaconsize;

memcpy(pBSSEntry->macaddress, pcurrentptr, ETH_ALEN);
memcpy(pBSSEntry->bssid, pcurrentptr, ETH_ALEN);
lbs_deb_scan("InterpretIE: AP MAC Addr-%x:%x:%x:%x:%x:%x\n",
pBSSEntry->macaddress[0], pBSSEntry->macaddress[1],
pBSSEntry->macaddress[2], pBSSEntry->macaddress[3],
pBSSEntry->macaddress[4], pBSSEntry->macaddress[5]);
pBSSEntry->bssid[0], pBSSEntry->bssid[1],
pBSSEntry->bssid[2], pBSSEntry->bssid[3],
pBSSEntry->bssid[4], pBSSEntry->bssid[5]);

pcurrentptr += ETH_ALEN;
bytesleftforcurrentbeacon -= ETH_ALEN;
Expand Down Expand Up @@ -1246,7 +1246,7 @@ int libertas_find_BSSID_in_list(wlan_adapter * adapter, u8 * bssid, u8 mode)
* AP with multiple SSIDs assigned to the same BSSID
*/
for (i = 0; ret < 0 && i < adapter->numinscantable; i++) {
if (!memcmp(adapter->scantable[i].macaddress, bssid, ETH_ALEN)) {
if (!memcmp(adapter->scantable[i].bssid, bssid, ETH_ALEN)) {
switch (mode) {
case IW_MODE_INFRA:
case IW_MODE_ADHOC:
Expand Down Expand Up @@ -1285,8 +1285,7 @@ int libertas_find_SSID_in_list(wlan_adapter * adapter,
for (i = 0; i < adapter->numinscantable; i++) {
if (!libertas_SSID_cmp(&adapter->scantable[i].ssid, ssid) &&
(!bssid ||
!memcmp(adapter->scantable[i].
macaddress, bssid, ETH_ALEN))) {
!memcmp(adapter->scantable[i].bssid, bssid, ETH_ALEN))) {
switch (mode) {
case IW_MODE_INFRA:
case IW_MODE_ADHOC:
Expand Down Expand Up @@ -1609,7 +1608,7 @@ int libertas_get_scan(struct net_device *dev, struct iw_request_info *info,
iwe.cmd = SIOCGIWAP;
iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
memcpy(iwe.u.ap_addr.sa_data,
&adapter->scantable[i].macaddress, ETH_ALEN);
&adapter->scantable[i].bssid, ETH_ALEN);

iwe.len = IW_EV_ADDR_LEN;
current_ev =
Expand Down Expand Up @@ -1945,24 +1944,22 @@ int libertas_ret_80211_scan(wlan_private * priv, struct cmd_ds_command *resp)
0)
&& CHECK_SSID_IS_VALID(&newbssentry.ssid)) {

lbs_deb_scan(
lbs_deb_scan(
"SCAN_RESP: BSSID = %02x:%02x:%02x:%02x:%02x:%02x\n",
newbssentry.macaddress[0],
newbssentry.macaddress[1],
newbssentry.macaddress[2],
newbssentry.macaddress[3],
newbssentry.macaddress[4],
newbssentry.macaddress[5]);
newbssentry.bssid[0],
newbssentry.bssid[1],
newbssentry.bssid[2],
newbssentry.bssid[3],
newbssentry.bssid[4],
newbssentry.bssid[5]);

/*
* Search the scan table for the same bssid
*/
for (bssIdx = 0; bssIdx < numintable; bssIdx++) {
if (memcmp(newbssentry.macaddress,
adapter->scantable[bssIdx].
macaddress,
sizeof(newbssentry.macaddress)) ==
0) {
if (memcmp(newbssentry.bssid,
adapter->scantable[bssIdx].bssid,
sizeof(newbssentry.bssid)) == 0) {
/*
* If the SSID matches as well, it is a duplicate of
* this entry. Keep the bssIdx set to this
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/libertas/scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ struct wlan_ioctl_user_scan_cfg {
* @brief Structure used to store information for each beacon/probe response
*/
struct bss_descriptor {
u8 macaddress[ETH_ALEN];
u8 bssid[ETH_ALEN];

struct WLAN_802_11_SSID ssid;

Expand Down

0 comments on commit e3404b3

Please sign in to comment.