diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2009-10-22 09:30:50 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 16:48:37 -0400 |
commit | c14951fec6c292dca60e3cf8ab0edfdf11e6c0e2 (patch) | |
tree | f5e9abc6e44968b0cda3810a18905d5625d503a1 /drivers/net/wireless/libertas/assoc.c | |
parent | 5e047692245c7b8d338ddeece156721d594ca985 (diff) |
libertas: get current channel out of priv->curbssparams
... as priv->curbssparams won't exist once libertas+cfg80211 lands.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/assoc.c')
-rw-r--r-- | drivers/net/wireless/libertas/assoc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c index 2ccfeca32cde..b8bdba67ad17 100644 --- a/drivers/net/wireless/libertas/assoc.c +++ b/drivers/net/wireless/libertas/assoc.c | |||
@@ -376,7 +376,7 @@ static int lbs_associate(struct lbs_private *priv, | |||
376 | (u16)(pos - (u8 *) &cmd.iebuf)); | 376 | (u16)(pos - (u8 *) &cmd.iebuf)); |
377 | 377 | ||
378 | /* update curbssparams */ | 378 | /* update curbssparams */ |
379 | priv->curbssparams.channel = bss->phy.ds.channel; | 379 | priv->channel = bss->phy.ds.channel; |
380 | 380 | ||
381 | ret = lbs_cmd_with_response(priv, command, &cmd); | 381 | ret = lbs_cmd_with_response(priv, command, &cmd); |
382 | if (ret == 0) { | 382 | if (ret == 0) { |
@@ -489,7 +489,7 @@ static int lbs_adhoc_post(struct lbs_private *priv, | |||
489 | lbs_deb_join("ADHOC_RESP: Joined/started '%s', BSSID %pM, channel %d\n", | 489 | lbs_deb_join("ADHOC_RESP: Joined/started '%s', BSSID %pM, channel %d\n", |
490 | print_ssid(ssid, bss->ssid, bss->ssid_len), | 490 | print_ssid(ssid, bss->ssid, bss->ssid_len), |
491 | priv->curbssparams.bssid, | 491 | priv->curbssparams.bssid, |
492 | priv->curbssparams.channel); | 492 | priv->channel); |
493 | 493 | ||
494 | done: | 494 | done: |
495 | lbs_deb_leave_args(LBS_DEB_JOIN, "ret %d", ret); | 495 | lbs_deb_leave_args(LBS_DEB_JOIN, "ret %d", ret); |
@@ -562,7 +562,7 @@ static int lbs_adhoc_join(struct lbs_private *priv, | |||
562 | lbs_deb_join("AdhocJoin: band = %c\n", assoc_req->band); | 562 | lbs_deb_join("AdhocJoin: band = %c\n", assoc_req->band); |
563 | 563 | ||
564 | priv->adhoccreate = 0; | 564 | priv->adhoccreate = 0; |
565 | priv->curbssparams.channel = bss->channel; | 565 | priv->channel = bss->channel; |
566 | 566 | ||
567 | /* Build the join command */ | 567 | /* Build the join command */ |
568 | memset(&cmd, 0, sizeof(cmd)); | 568 | memset(&cmd, 0, sizeof(cmd)); |
@@ -1196,7 +1196,7 @@ static int assoc_helper_channel(struct lbs_private *priv, | |||
1196 | goto done; | 1196 | goto done; |
1197 | } | 1197 | } |
1198 | 1198 | ||
1199 | if (assoc_req->channel == priv->curbssparams.channel) | 1199 | if (assoc_req->channel == priv->channel) |
1200 | goto done; | 1200 | goto done; |
1201 | 1201 | ||
1202 | if (priv->mesh_dev) { | 1202 | if (priv->mesh_dev) { |
@@ -1208,7 +1208,7 @@ static int assoc_helper_channel(struct lbs_private *priv, | |||
1208 | } | 1208 | } |
1209 | 1209 | ||
1210 | lbs_deb_assoc("ASSOC: channel: %d -> %d\n", | 1210 | lbs_deb_assoc("ASSOC: channel: %d -> %d\n", |
1211 | priv->curbssparams.channel, assoc_req->channel); | 1211 | priv->channel, assoc_req->channel); |
1212 | 1212 | ||
1213 | ret = lbs_set_channel(priv, assoc_req->channel); | 1213 | ret = lbs_set_channel(priv, assoc_req->channel); |
1214 | if (ret < 0) | 1214 | if (ret < 0) |
@@ -1223,7 +1223,7 @@ static int assoc_helper_channel(struct lbs_private *priv, | |||
1223 | goto done; | 1223 | goto done; |
1224 | } | 1224 | } |
1225 | 1225 | ||
1226 | if (assoc_req->channel != priv->curbssparams.channel) { | 1226 | if (assoc_req->channel != priv->channel) { |
1227 | lbs_deb_assoc("ASSOC: channel: failed to update channel to %d\n", | 1227 | lbs_deb_assoc("ASSOC: channel: failed to update channel to %d\n", |
1228 | assoc_req->channel); | 1228 | assoc_req->channel); |
1229 | goto restore_mesh; | 1229 | goto restore_mesh; |
@@ -1244,7 +1244,7 @@ static int assoc_helper_channel(struct lbs_private *priv, | |||
1244 | restore_mesh: | 1244 | restore_mesh: |
1245 | if (priv->mesh_dev) | 1245 | if (priv->mesh_dev) |
1246 | lbs_mesh_config(priv, CMD_ACT_MESH_CONFIG_START, | 1246 | lbs_mesh_config(priv, CMD_ACT_MESH_CONFIG_START, |
1247 | priv->curbssparams.channel); | 1247 | priv->channel); |
1248 | 1248 | ||
1249 | done: | 1249 | done: |
1250 | lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret); | 1250 | lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret); |
@@ -1466,7 +1466,7 @@ static int should_stop_adhoc(struct lbs_private *priv, | |||
1466 | } | 1466 | } |
1467 | 1467 | ||
1468 | if (test_bit(ASSOC_FLAG_CHANNEL, &assoc_req->flags)) { | 1468 | if (test_bit(ASSOC_FLAG_CHANNEL, &assoc_req->flags)) { |
1469 | if (assoc_req->channel != priv->curbssparams.channel) | 1469 | if (assoc_req->channel != priv->channel) |
1470 | return 1; | 1470 | return 1; |
1471 | } | 1471 | } |
1472 | 1472 | ||
@@ -1771,7 +1771,7 @@ struct assoc_request *lbs_get_association_request(struct lbs_private *priv) | |||
1771 | } | 1771 | } |
1772 | 1772 | ||
1773 | if (!test_bit(ASSOC_FLAG_CHANNEL, &assoc_req->flags)) | 1773 | if (!test_bit(ASSOC_FLAG_CHANNEL, &assoc_req->flags)) |
1774 | assoc_req->channel = priv->curbssparams.channel; | 1774 | assoc_req->channel = priv->channel; |
1775 | 1775 | ||
1776 | if (!test_bit(ASSOC_FLAG_BAND, &assoc_req->flags)) | 1776 | if (!test_bit(ASSOC_FLAG_BAND, &assoc_req->flags)) |
1777 | assoc_req->band = priv->curbssparams.band; | 1777 | assoc_req->band = priv->curbssparams.band; |