Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236063
b: refs/heads/master
c: 98b6d23
h: refs/heads/master
i:
  236061: ac50523
  236059: 351dc2c
  236055: cadd552
  236047: ed1f735
  236031: 632ccd8
v: v3
  • Loading branch information
Vipin Mehta authored and Greg Kroah-Hartman committed Feb 18, 2011
1 parent f745172 commit 97db9c3
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 9 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: 9ea979d3b9e12e0f7f76153275e24c1d6cb389ab
refs/heads/master: 98b6d2381a2812eba27a4cec3e8242262b0e5f01
1 change: 1 addition & 0 deletions trunk/drivers/staging/ath6kl/os/linux/ar6000_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,7 @@ ar6000_avail_ev(void *context, void *hif_handle)
SET_NETDEV_DEV(dev, wiphy_dev(wdev->wiphy));
wdev->netdev = dev;
ar->arNetworkType = INFRA_NETWORK;
ar->smeState = SME_DISCONNECTED;
#endif /* ATH6K_CONFIG_CFG80211 */

init_netdev(dev, ifname);
Expand Down
28 changes: 20 additions & 8 deletions trunk/drivers/staging/ath6kl/os/linux/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
int status;

AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__));
ar->smeState = SME_CONNECTING;

if(ar->arWmiReady == false) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready yet\n", __func__));
Expand Down Expand Up @@ -562,6 +563,7 @@ ar6k_cfg80211_connect_event(AR_SOFTC_T *ar, u16 channel,

if (false == ar->arConnected) {
/* inform connect result to cfg80211 */
ar->smeState = SME_DISCONNECTED;
cfg80211_connect_result(ar->arNetDev, bssid,
assocReqIe, assocReqLen,
assocRespIe, assocRespLen,
Expand Down Expand Up @@ -644,18 +646,28 @@ ar6k_cfg80211_disconnect_event(AR_SOFTC_T *ar, u8 reason,
}
}

if(false == ar->arConnected) {
if(true == ar->arConnectPending) {
if(NO_NETWORK_AVAIL == reason) {
/* connect cmd failed */
cfg80211_connect_result(ar->arNetDev, bssid,
NULL, 0,
NULL, 0,
WLAN_STATUS_UNSPECIFIED_FAILURE,
GFP_KERNEL);
wmi_disconnect_cmd(ar->arWmi);
} else if (reason == DISCONNECT_CMD) {
/* connection loss due to disconnect cmd or low rssi */
ar->arConnectPending = false;
if (ar->smeState == SME_CONNECTING) {
cfg80211_connect_result(ar->arNetDev, bssid,
NULL, 0,
NULL, 0,
WLAN_STATUS_UNSPECIFIED_FAILURE,
GFP_KERNEL);
} else {
cfg80211_disconnected(ar->arNetDev, reason, NULL, 0, GFP_KERNEL);
}
ar->smeState = SME_DISCONNECTED;
}
} else {
/* connection loss due to disconnect cmd or low rssi */
cfg80211_disconnected(ar->arNetDev, reason, NULL, 0, GFP_KERNEL);
if (reason != DISCONNECT_CMD) {
wmi_disconnect_cmd(ar->arWmi);
}
}
}

Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,12 @@ struct ar_key {
u8 seq_len;
u32 cipher;
};

enum {
SME_DISCONNECTED,
SME_CONNECTING,
SME_CONNECTED
};
#endif /* ATH6K_CONFIG_CFG80211 */


Expand Down Expand Up @@ -595,6 +601,7 @@ typedef struct ar6_softc {
struct wireless_dev *wdev;
struct cfg80211_scan_request *scan_request;
struct ar_key keys[WMI_MAX_KEY_INDEX + 1];
u32 smeState;
#endif /* ATH6K_CONFIG_CFG80211 */
u16 arWlanPowerState;
bool arWlanOff;
Expand Down

0 comments on commit 97db9c3

Please sign in to comment.