aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/cmd.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-10-05 05:55:42 -0400
committerLuciano Coelho <coelho@ti.com>2011-10-07 01:32:34 -0400
commit30d0c8fd5b87d1c5486705d6420545a21533e115 (patch)
tree73e911f10dd19e16789b58ab8a496a9ec3fff6ad /drivers/net/wireless/wl12xx/cmd.c
parent87fbcb0f8c5c8fd57a4e3e7e638977c04ce1e0ca (diff)
wl12xx: move rate_set into wlvif
move rate_set into the per-interface data, rather than being global. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/cmd.c')
-rw-r--r--drivers/net/wireless/wl12xx/cmd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c
index c99fc61113d1..6a2f758eb1d3 100644
--- a/drivers/net/wireless/wl12xx/cmd.c
+++ b/drivers/net/wireless/wl12xx/cmd.c
@@ -578,7 +578,7 @@ int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif)
578 cmd->sta.ssid_len = wl->ssid_len; 578 cmd->sta.ssid_len = wl->ssid_len;
579 memcpy(cmd->sta.ssid, wl->ssid, wl->ssid_len); 579 memcpy(cmd->sta.ssid, wl->ssid, wl->ssid_len);
580 memcpy(cmd->sta.bssid, wl->bssid, ETH_ALEN); 580 memcpy(cmd->sta.bssid, wl->bssid, ETH_ALEN);
581 cmd->sta.local_rates = cpu_to_le32(wl->rate_set); 581 cmd->sta.local_rates = cpu_to_le32(wlvif->rate_set);
582 582
583 if (wl->sta_hlid == WL12XX_INVALID_LINK_ID) { 583 if (wl->sta_hlid == WL12XX_INVALID_LINK_ID) {
584 ret = wl12xx_allocate_link(wl, &wl->sta_hlid); 584 ret = wl12xx_allocate_link(wl, &wl->sta_hlid);
@@ -587,12 +587,12 @@ int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif)
587 } 587 }
588 cmd->sta.hlid = wl->sta_hlid; 588 cmd->sta.hlid = wl->sta_hlid;
589 cmd->sta.session = wl12xx_get_new_session_id(wl); 589 cmd->sta.session = wl12xx_get_new_session_id(wl);
590 cmd->sta.remote_rates = cpu_to_le32(wl->rate_set); 590 cmd->sta.remote_rates = cpu_to_le32(wlvif->rate_set);
591 591
592 wl1271_debug(DEBUG_CMD, "role start: roleid=%d, hlid=%d, session=%d " 592 wl1271_debug(DEBUG_CMD, "role start: roleid=%d, hlid=%d, session=%d "
593 "basic_rate_set: 0x%x, remote_rates: 0x%x", 593 "basic_rate_set: 0x%x, remote_rates: 0x%x",
594 wl->role_id, cmd->sta.hlid, cmd->sta.session, 594 wl->role_id, cmd->sta.hlid, cmd->sta.session,
595 wlvif->basic_rate_set, wl->rate_set); 595 wlvif->basic_rate_set, wlvif->rate_set);
596 596
597 ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0); 597 ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0);
598 if (ret < 0) { 598 if (ret < 0) {
@@ -792,7 +792,7 @@ int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif)
792 cmd->ibss.ssid_len = wl->ssid_len; 792 cmd->ibss.ssid_len = wl->ssid_len;
793 memcpy(cmd->ibss.ssid, wl->ssid, wl->ssid_len); 793 memcpy(cmd->ibss.ssid, wl->ssid, wl->ssid_len);
794 memcpy(cmd->ibss.bssid, wl->bssid, ETH_ALEN); 794 memcpy(cmd->ibss.bssid, wl->bssid, ETH_ALEN);
795 cmd->sta.local_rates = cpu_to_le32(wl->rate_set); 795 cmd->sta.local_rates = cpu_to_le32(wlvif->rate_set);
796 796
797 if (wl->sta_hlid == WL12XX_INVALID_LINK_ID) { 797 if (wl->sta_hlid == WL12XX_INVALID_LINK_ID) {
798 ret = wl12xx_allocate_link(wl, &wl->sta_hlid); 798 ret = wl12xx_allocate_link(wl, &wl->sta_hlid);
@@ -800,12 +800,12 @@ int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif)
800 goto out_free; 800 goto out_free;
801 } 801 }
802 cmd->ibss.hlid = wl->sta_hlid; 802 cmd->ibss.hlid = wl->sta_hlid;
803 cmd->ibss.remote_rates = cpu_to_le32(wl->rate_set); 803 cmd->ibss.remote_rates = cpu_to_le32(wlvif->rate_set);
804 804
805 wl1271_debug(DEBUG_CMD, "role start: roleid=%d, hlid=%d, session=%d " 805 wl1271_debug(DEBUG_CMD, "role start: roleid=%d, hlid=%d, session=%d "
806 "basic_rate_set: 0x%x, remote_rates: 0x%x", 806 "basic_rate_set: 0x%x, remote_rates: 0x%x",
807 wl->role_id, cmd->sta.hlid, cmd->sta.session, 807 wl->role_id, cmd->sta.hlid, cmd->sta.session,
808 wlvif->basic_rate_set, wl->rate_set); 808 wlvif->basic_rate_set, wlvif->rate_set);
809 809
810 wl1271_debug(DEBUG_CMD, "wl->bssid = %pM", wl->bssid); 810 wl1271_debug(DEBUG_CMD, "wl->bssid = %pM", wl->bssid);
811 811