Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278041
b: refs/heads/master
c: 8c8b65e
h: refs/heads/master
i:
  278039: 051909e
v: v3
  • Loading branch information
Vasanthakumar Thiagarajan authored and Kalle Valo committed Nov 11, 2011
1 parent d392f19 commit 2ae7c29
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 21 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: f5938f249a08a4e6c9046fa095be00db664158cc
refs/heads/master: 8c8b65e3e3b81d28d185f0a8b6543e42b50a812d
27 changes: 16 additions & 11 deletions trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
vif->ssid_len == sme->ssid_len &&
!memcmp(vif->ssid, sme->ssid, vif->ssid_len)) {
ar->reconnect_flag = true;
status = ath6kl_wmi_reconnect_cmd(ar->wmi, ar->req_bssid,
status = ath6kl_wmi_reconnect_cmd(ar->wmi, vif->req_bssid,
ar->ch_hint);

up(&ar->sem);
Expand All @@ -384,9 +384,9 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
if (sme->channel)
ar->ch_hint = sme->channel->center_freq;

memset(ar->req_bssid, 0, sizeof(ar->req_bssid));
memset(vif->req_bssid, 0, sizeof(vif->req_bssid));
if (sme->bssid && !is_broadcast_ether_addr(sme->bssid))
memcpy(ar->req_bssid, sme->bssid, sizeof(ar->req_bssid));
memcpy(vif->req_bssid, sme->bssid, sizeof(vif->req_bssid));

ath6kl_set_wpa_version(ar, sme->crypto.wpa_versions);

Expand Down Expand Up @@ -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,
ar->req_bssid, ar->ch_hint,
vif->req_bssid, ar->ch_hint,
ar->connect_ctrl_flags);

up(&ar->sem);
Expand Down Expand Up @@ -644,7 +644,7 @@ static int ath6kl_cfg80211_disconnect(struct wiphy *wiphy,
vif->ssid_len = 0;

if (!test_bit(SKIP_SCAN, &ar->flag))
memset(ar->req_bssid, 0, sizeof(ar->req_bssid));
memset(vif->req_bssid, 0, sizeof(vif->req_bssid));

up(&ar->sem);

Expand Down Expand Up @@ -1071,10 +1071,13 @@ static int ath6kl_cfg80211_set_default_key(struct wiphy *wiphy,
void ath6kl_cfg80211_tkip_micerr_event(struct ath6kl *ar, u8 keyid,
bool ismcast)
{
/* TODO: Findout vif */
struct ath6kl_vif *vif = ar->vif;

ath6kl_dbg(ATH6KL_DBG_WLAN_CFG,
"%s: keyid %d, ismcast %d\n", __func__, keyid, ismcast);

cfg80211_michael_mic_failure(ar->net_dev, ar->bssid,
cfg80211_michael_mic_failure(ar->net_dev, vif->bssid,
(ismcast ? NL80211_KEYTYPE_GROUP :
NL80211_KEYTYPE_PAIRWISE), keyid, NULL,
GFP_KERNEL);
Expand Down Expand Up @@ -1261,9 +1264,10 @@ static int ath6kl_cfg80211_join_ibss(struct wiphy *wiphy,
return -EOPNOTSUPP;
}

memset(ar->req_bssid, 0, sizeof(ar->req_bssid));
memset(vif->req_bssid, 0, sizeof(vif->req_bssid));
if (ibss_param->bssid && !is_broadcast_ether_addr(ibss_param->bssid))
memcpy(ar->req_bssid, ibss_param->bssid, sizeof(ar->req_bssid));
memcpy(vif->req_bssid, ibss_param->bssid,
sizeof(vif->req_bssid));

ath6kl_set_wpa_version(ar, 0);

Expand Down Expand Up @@ -1296,7 +1300,7 @@ static int ath6kl_cfg80211_join_ibss(struct wiphy *wiphy,
vif->prwise_crypto_len,
vif->grp_crypto, vif->grp_crypto_len,
vif->ssid_len, vif->ssid,
ar->req_bssid, ar->ch_hint,
vif->req_bssid, ar->ch_hint,
ar->connect_ctrl_flags);
set_bit(CONNECT_PEND, &vif->flags);

Expand Down Expand Up @@ -1399,7 +1403,7 @@ static int ath6kl_get_station(struct wiphy *wiphy, struct net_device *dev,
int ret;
u8 mcs;

if (memcmp(mac, ar->bssid, ETH_ALEN) != 0)
if (memcmp(mac, vif->bssid, ETH_ALEN) != 0)
return -ENOENT;

if (down_interruptible(&ar->sem))
Expand Down Expand Up @@ -1509,7 +1513,8 @@ static int ath6kl_flush_pmksa(struct wiphy *wiphy, struct net_device *netdev)
struct ath6kl_vif *vif = netdev_priv(netdev);

if (test_bit(CONNECTED, &vif->flags))
return ath6kl_wmi_setpmkid_cmd(ar->wmi, ar->bssid, NULL, false);
return ath6kl_wmi_setpmkid_cmd(ar->wmi, vif->bssid,
NULL, false);
return 0;
}

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

/* Flag info */
Expand Down Expand Up @@ -438,8 +440,6 @@ struct ath6kl {
spinlock_t lock;
struct semaphore sem;
struct ath6kl_wep_key wep_key_list[WMI_MAX_KEY_INDEX + 1];
u8 bssid[ETH_ALEN];
u8 req_bssid[ETH_ALEN];
u16 ch_hint;
u16 bss_ch;
u16 listen_intvl_b;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/ath/ath6kl/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ void ath6kl_init_profile_info(struct ath6kl *ar)
vif->grp_crypto = NONE_CRYPT;
vif->grp_crypto_len = 0;
memset(ar->wep_key_list, 0, sizeof(ar->wep_key_list));
memset(ar->req_bssid, 0, sizeof(ar->req_bssid));
memset(ar->bssid, 0, sizeof(ar->bssid));
memset(vif->req_bssid, 0, sizeof(vif->req_bssid));
memset(vif->bssid, 0, sizeof(vif->bssid));
ar->bss_ch = 0;
vif->nw_type = vif->next_mode = INFRA_NETWORK;
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/net/wireless/ath/ath6kl/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ void ath6kl_stop_endpoint(struct net_device *dev, bool keep_profile,
if (discon_issued)
ath6kl_disconnect_event(ar, DISCONNECT_CMD,
(vif->nw_type & AP_NETWORK) ?
bcast_mac : ar->bssid,
bcast_mac : vif->bssid,
0, NULL, 0);

ar->user_key_ctrl = 0;
Expand Down Expand Up @@ -943,7 +943,7 @@ void ath6kl_deep_sleep_enable(struct ath6kl *ar)

switch (ar->sme_state) {
case SME_CONNECTING:
cfg80211_connect_result(ar->net_dev, ar->bssid, NULL, 0,
cfg80211_connect_result(ar->net_dev, vif->bssid, NULL, 0,
NULL, 0,
WLAN_STATUS_UNSPECIFIED_FAILURE,
GFP_KERNEL);
Expand Down Expand Up @@ -1057,7 +1057,7 @@ void ath6kl_connect_event(struct ath6kl *ar, u16 channel, u8 *bssid,
assoc_req_len, assoc_resp_len,
assoc_info);

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

if ((vif->nw_type == INFRA_NETWORK))
Expand Down Expand Up @@ -1433,7 +1433,7 @@ void ath6kl_disconnect_event(struct ath6kl *ar, u8 reason, u8 *bssid,
ar->user_key_ctrl = 0;

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

ath6kl_tx_data_cleanup(ar);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/ath/ath6kl/wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len)
return -EINVAL;

if (bih->frame_type == BEACON_FTYPE && test_bit(CONNECTED, &vif->flags)
&& memcmp(bih->bssid, ar->bssid, ETH_ALEN) == 0) {
&& memcmp(bih->bssid, vif->bssid, ETH_ALEN) == 0) {
const u8 *tim;
tim = cfg80211_find_ie(WLAN_EID_TIM, buf + 8 + 2 + 2,
len - 8 - 2 - 2);
Expand Down

0 comments on commit 2ae7c29

Please sign in to comment.