Return-path: Received: from wolverine01.qualcomm.com ([199.106.114.254]:13794 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757111Ab2IUJgn (ORCPT ); Fri, 21 Sep 2012 05:36:43 -0400 From: Pandiyarajan Pitchaimuthu To: CC: , Subject: [PATCH] ath6kl: Max clients reached notification Date: Fri, 21 Sep 2012 15:06:14 +0530 Message-ID: <1348220174-5324-1-git-send-email-c_ppitch@qca.qualcomm.com> (sfid-20120921_113647_471996_9298D1B8) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org List-ID: When a station requests connection to an AP, that has already been connected to the maximum number of stations it can support, an event is sent to user space via NL80211_CMD_CONN_FAILED command and reason attribute NL80211_ATTR_CONN_FAILED_REASON with NL80211_CONN_FAIL_MAX_CLIENTS as reason. Signed-off-by: Pandiyarajan Pitchaimuthu --- drivers/net/wireless/ath/ath6kl/main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c index 9533558..cc2749a 100644 --- a/drivers/net/wireless/ath/ath6kl/main.c +++ b/drivers/net/wireless/ath/ath6kl/main.c @@ -1004,6 +1004,13 @@ void ath6kl_disconnect_event(struct ath6kl_vif *vif, u8 reason, u8 *bssid, ar->last_ch = le16_to_cpu(vif->profile.ch); } + if (prot_reason_status == WMI_AP_REASON_MAX_STA) { + /* send max client reached notification to user space */ + cfg80211_conn_failed(vif->ndev, bssid, + NL80211_CONN_FAIL_MAX_CLIENTS, + GFP_KERNEL); + } + if (!ath6kl_remove_sta(ar, bssid, prot_reason_status)) return; -- 1.7.9.5