Skip to content

Commit

Permalink
ath6kl: Move channel information to vif structure
Browse files Browse the repository at this point in the history
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
  • Loading branch information
Vasanthakumar Thiagarajan authored and Kalle Valo committed Nov 11, 2011
1 parent 8c8b65e commit f74bac5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
!memcmp(vif->ssid, sme->ssid, vif->ssid_len)) {
ar->reconnect_flag = true;
status = ath6kl_wmi_reconnect_cmd(ar->wmi, vif->req_bssid,
ar->ch_hint);
vif->ch_hint);

up(&ar->sem);
if (status) {
Expand All @@ -382,7 +382,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
memcpy(vif->ssid, sme->ssid, sme->ssid_len);

if (sme->channel)
ar->ch_hint = sme->channel->center_freq;
vif->ch_hint = sme->channel->center_freq;

memset(vif->req_bssid, 0, sizeof(vif->req_bssid));
if (sme->bssid && !is_broadcast_ether_addr(sme->bssid))
Expand Down Expand Up @@ -452,7 +452,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
__func__,
vif->auth_mode, vif->dot11_auth_mode, vif->prwise_crypto,
vif->prwise_crypto_len, vif->grp_crypto,
vif->grp_crypto_len, ar->ch_hint);
vif->grp_crypto_len, vif->ch_hint);

ar->reconnect_flag = 0;
status = ath6kl_wmi_connect_cmd(ar->wmi, vif->nw_type,
Expand All @@ -461,7 +461,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
vif->prwise_crypto_len,
vif->grp_crypto, vif->grp_crypto_len,
vif->ssid_len, vif->ssid,
vif->req_bssid, ar->ch_hint,
vif->req_bssid, vif->ch_hint,
ar->connect_ctrl_flags);

up(&ar->sem);
Expand Down Expand Up @@ -1252,7 +1252,7 @@ static int ath6kl_cfg80211_join_ibss(struct wiphy *wiphy,
memcpy(vif->ssid, ibss_param->ssid, vif->ssid_len);

if (ibss_param->channel)
ar->ch_hint = ibss_param->channel->center_freq;
vif->ch_hint = ibss_param->channel->center_freq;

if (ibss_param->channel_fixed) {
/*
Expand Down Expand Up @@ -1292,15 +1292,15 @@ static int ath6kl_cfg80211_join_ibss(struct wiphy *wiphy,
__func__,
vif->auth_mode, vif->dot11_auth_mode, vif->prwise_crypto,
vif->prwise_crypto_len, vif->grp_crypto,
vif->grp_crypto_len, ar->ch_hint);
vif->grp_crypto_len, vif->ch_hint);

status = ath6kl_wmi_connect_cmd(ar->wmi, vif->nw_type,
vif->dot11_auth_mode, vif->auth_mode,
vif->prwise_crypto,
vif->prwise_crypto_len,
vif->grp_crypto, vif->grp_crypto_len,
vif->ssid_len, vif->ssid,
vif->req_bssid, ar->ch_hint,
vif->req_bssid, vif->ch_hint,
ar->connect_ctrl_flags);
set_bit(CONNECT_PEND, &vif->flags);

Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath/ath6kl/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@ struct ath6kl_vif {
u8 nw_type;
u8 bssid[ETH_ALEN];
u8 req_bssid[ETH_ALEN];
u16 ch_hint;
u16 bss_ch;
};

/* Flag info */
Expand Down Expand Up @@ -440,8 +442,6 @@ struct ath6kl {
spinlock_t lock;
struct semaphore sem;
struct ath6kl_wep_key wep_key_list[WMI_MAX_KEY_INDEX + 1];
u16 ch_hint;
u16 bss_ch;
u16 listen_intvl_b;
u16 listen_intvl_t;
u8 lrssi_roam_threshold;
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath/ath6kl/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void ath6kl_init_profile_info(struct ath6kl *ar)
memset(ar->wep_key_list, 0, sizeof(ar->wep_key_list));
memset(vif->req_bssid, 0, sizeof(vif->req_bssid));
memset(vif->bssid, 0, sizeof(vif->bssid));
ar->bss_ch = 0;
vif->bss_ch = 0;
vif->nw_type = vif->next_mode = INFRA_NETWORK;
}

Expand Down Expand Up @@ -253,7 +253,7 @@ void ath6kl_init_control_info(struct ath6kl *ar)
ath6kl_init_profile_info(ar);
vif->def_txkey_index = 0;
memset(ar->wep_key_list, 0, sizeof(ar->wep_key_list));
ar->ch_hint = 0;
vif->ch_hint = 0;
}

/*
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath/ath6kl/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ void ath6kl_connect_event(struct ath6kl *ar, u16 channel, u8 *bssid,
assoc_info);

memcpy(vif->bssid, bssid, sizeof(vif->bssid));
ar->bss_ch = channel;
vif->bss_ch = channel;

if ((vif->nw_type == INFRA_NETWORK))
ath6kl_wmi_listeninterval_cmd(ar->wmi, ar->listen_intvl_t,
Expand Down Expand Up @@ -1434,7 +1434,7 @@ void ath6kl_disconnect_event(struct ath6kl *ar, u8 reason, u8 *bssid,

netif_stop_queue(ar->net_dev);
memset(vif->bssid, 0, sizeof(vif->bssid));
ar->bss_ch = 0;
vif->bss_ch = 0;

ath6kl_tx_data_cleanup(ar);
}
Expand Down

0 comments on commit f74bac5

Please sign in to comment.