mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-08 15:48:23 +00:00
wl12xx: replace wl->bssid with vif->bss_conf.bssid
Use the per-interface vif->bss_conf instead of the global wl->bssid. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
This commit is contained in:
parent
d2d66c56cf
commit
cdf0949558
4 changed files with 11 additions and 20 deletions
|
@ -557,6 +557,7 @@ out:
|
||||||
|
|
||||||
int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif)
|
int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif)
|
||||||
{
|
{
|
||||||
|
struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
|
||||||
struct wl12xx_cmd_role_start *cmd;
|
struct wl12xx_cmd_role_start *cmd;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -577,7 +578,7 @@ int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif)
|
||||||
cmd->sta.ssid_type = WL12XX_SSID_TYPE_ANY;
|
cmd->sta.ssid_type = WL12XX_SSID_TYPE_ANY;
|
||||||
cmd->sta.ssid_len = wl->ssid_len;
|
cmd->sta.ssid_len = wl->ssid_len;
|
||||||
memcpy(cmd->sta.ssid, wl->ssid, wl->ssid_len);
|
memcpy(cmd->sta.ssid, wl->ssid, wl->ssid_len);
|
||||||
memcpy(cmd->sta.bssid, wl->bssid, ETH_ALEN);
|
memcpy(cmd->sta.bssid, vif->bss_conf.bssid, ETH_ALEN);
|
||||||
cmd->sta.local_rates = cpu_to_le32(wlvif->rate_set);
|
cmd->sta.local_rates = cpu_to_le32(wlvif->rate_set);
|
||||||
|
|
||||||
if (wl->sta_hlid == WL12XX_INVALID_LINK_ID) {
|
if (wl->sta_hlid == WL12XX_INVALID_LINK_ID) {
|
||||||
|
@ -769,6 +770,7 @@ out:
|
||||||
|
|
||||||
int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif)
|
int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif)
|
||||||
{
|
{
|
||||||
|
struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
|
||||||
struct wl12xx_cmd_role_start *cmd;
|
struct wl12xx_cmd_role_start *cmd;
|
||||||
struct ieee80211_bss_conf *bss_conf = &wl->vif->bss_conf;
|
struct ieee80211_bss_conf *bss_conf = &wl->vif->bss_conf;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -791,7 +793,7 @@ int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif)
|
||||||
cmd->ibss.ssid_type = WL12XX_SSID_TYPE_ANY;
|
cmd->ibss.ssid_type = WL12XX_SSID_TYPE_ANY;
|
||||||
cmd->ibss.ssid_len = wl->ssid_len;
|
cmd->ibss.ssid_len = wl->ssid_len;
|
||||||
memcpy(cmd->ibss.ssid, wl->ssid, wl->ssid_len);
|
memcpy(cmd->ibss.ssid, wl->ssid, wl->ssid_len);
|
||||||
memcpy(cmd->ibss.bssid, wl->bssid, ETH_ALEN);
|
memcpy(cmd->ibss.bssid, vif->bss_conf.bssid, ETH_ALEN);
|
||||||
cmd->sta.local_rates = cpu_to_le32(wlvif->rate_set);
|
cmd->sta.local_rates = cpu_to_le32(wlvif->rate_set);
|
||||||
|
|
||||||
if (wl->sta_hlid == WL12XX_INVALID_LINK_ID) {
|
if (wl->sta_hlid == WL12XX_INVALID_LINK_ID) {
|
||||||
|
@ -807,7 +809,8 @@ int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif)
|
||||||
wl->role_id, cmd->sta.hlid, cmd->sta.session,
|
wl->role_id, cmd->sta.hlid, cmd->sta.session,
|
||||||
wlvif->basic_rate_set, wlvif->rate_set);
|
wlvif->basic_rate_set, wlvif->rate_set);
|
||||||
|
|
||||||
wl1271_debug(DEBUG_CMD, "wl->bssid = %pM", wl->bssid);
|
wl1271_debug(DEBUG_CMD, "vif->bss_conf.bssid = %pM",
|
||||||
|
vif->bss_conf.bssid);
|
||||||
|
|
||||||
ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0);
|
ret = wl1271_cmd_send(wl, CMD_ROLE_START, cmd, sizeof(*cmd), 0);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
@ -1213,9 +1216,9 @@ int wl1271_build_qos_null_data(struct wl1271 *wl, struct ieee80211_vif *vif)
|
||||||
|
|
||||||
memset(&template, 0, sizeof(template));
|
memset(&template, 0, sizeof(template));
|
||||||
|
|
||||||
memcpy(template.addr1, wl->bssid, ETH_ALEN);
|
memcpy(template.addr1, vif->bss_conf.bssid, ETH_ALEN);
|
||||||
memcpy(template.addr2, vif->addr, ETH_ALEN);
|
memcpy(template.addr2, vif->addr, ETH_ALEN);
|
||||||
memcpy(template.addr3, wl->bssid, ETH_ALEN);
|
memcpy(template.addr3, vif->bss_conf.bssid, ETH_ALEN);
|
||||||
|
|
||||||
template.frame_control = cpu_to_le16(IEEE80211_FTYPE_DATA |
|
template.frame_control = cpu_to_le16(IEEE80211_FTYPE_DATA |
|
||||||
IEEE80211_STYPE_QOS_NULLFUNC |
|
IEEE80211_STYPE_QOS_NULLFUNC |
|
||||||
|
|
|
@ -184,7 +184,7 @@ static void wl1271_stop_ba_event(struct wl1271 *wl)
|
||||||
if (!wl->ba_rx_bitmap)
|
if (!wl->ba_rx_bitmap)
|
||||||
return;
|
return;
|
||||||
ieee80211_stop_rx_ba_session(wl->vif, wl->ba_rx_bitmap,
|
ieee80211_stop_rx_ba_session(wl->vif, wl->ba_rx_bitmap,
|
||||||
wl->bssid);
|
wl->vif->bss_conf.bssid);
|
||||||
} else {
|
} else {
|
||||||
int i;
|
int i;
|
||||||
struct wl1271_link *lnk;
|
struct wl1271_link *lnk;
|
||||||
|
|
|
@ -2098,7 +2098,6 @@ deinit:
|
||||||
wl1271_tx_reset(wl, reset_tx_queues);
|
wl1271_tx_reset(wl, reset_tx_queues);
|
||||||
wl1271_power_off(wl);
|
wl1271_power_off(wl);
|
||||||
|
|
||||||
memset(wl->bssid, 0, ETH_ALEN);
|
|
||||||
memset(wl->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
|
memset(wl->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
|
||||||
wl->ssid_len = 0;
|
wl->ssid_len = 0;
|
||||||
wl->bss_type = MAX_BSS_TYPE;
|
wl->bss_type = MAX_BSS_TYPE;
|
||||||
|
@ -2249,8 +2248,6 @@ static int wl1271_unjoin(struct wl1271 *wl)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
memset(wl->bssid, 0, ETH_ALEN);
|
|
||||||
|
|
||||||
/* reset TX security counters on a clean disconnect */
|
/* reset TX security counters on a clean disconnect */
|
||||||
wl->tx_security_last_seq_lsb = 0;
|
wl->tx_security_last_seq_lsb = 0;
|
||||||
wl->tx_security_seq = 0;
|
wl->tx_security_seq = 0;
|
||||||
|
@ -3449,15 +3446,8 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
|
||||||
wl->rssi_thold = bss_conf->cqm_rssi_thold;
|
wl->rssi_thold = bss_conf->cqm_rssi_thold;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((changed & BSS_CHANGED_BSSID) &&
|
if (changed & BSS_CHANGED_BSSID)
|
||||||
/*
|
if (!is_zero_ether_addr(bss_conf->bssid)) {
|
||||||
* Now we know the correct bssid, so we send a new join command
|
|
||||||
* and enable the BSSID filter
|
|
||||||
*/
|
|
||||||
memcmp(wl->bssid, bss_conf->bssid, ETH_ALEN)) {
|
|
||||||
memcpy(wl->bssid, bss_conf->bssid, ETH_ALEN);
|
|
||||||
|
|
||||||
if (!is_zero_ether_addr(wl->bssid)) {
|
|
||||||
ret = wl12xx_cmd_build_null_data(wl, wlvif);
|
ret = wl12xx_cmd_build_null_data(wl, wlvif);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -3469,7 +3459,6 @@ static void wl1271_bss_info_changed_sta(struct wl1271 *wl,
|
||||||
/* Need to update the BSSID (for filtering etc) */
|
/* Need to update the BSSID (for filtering etc) */
|
||||||
do_join = true;
|
do_join = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (changed & (BSS_CHANGED_ASSOC | BSS_CHANGED_HT)) {
|
if (changed & (BSS_CHANGED_ASSOC | BSS_CHANGED_HT)) {
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
|
|
|
@ -399,7 +399,6 @@ struct wl1271 {
|
||||||
|
|
||||||
s8 hw_pg_ver;
|
s8 hw_pg_ver;
|
||||||
|
|
||||||
u8 bssid[ETH_ALEN];
|
|
||||||
u8 mac_addr[ETH_ALEN];
|
u8 mac_addr[ETH_ALEN];
|
||||||
u8 bss_type;
|
u8 bss_type;
|
||||||
u8 set_bss_type;
|
u8 set_bss_type;
|
||||||
|
|
Loading…
Add table
Reference in a new issue