From patchwork Tue Mar 12 13:44:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luciano Coelho X-Patchwork-Id: 2256461 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id EEBA54006E for ; Tue, 12 Mar 2013 13:45:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755022Ab3CLNpq (ORCPT ); Tue, 12 Mar 2013 09:45:46 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:45537 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932167Ab3CLNpn (ORCPT ); Tue, 12 Mar 2013 09:45:43 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r2CDjgLj003876; Tue, 12 Mar 2013 08:45:42 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r2CDjgHS017488; Tue, 12 Mar 2013 08:45:42 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by dfle73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.1.323.3; Tue, 12 Mar 2013 08:45:42 -0500 Received: from cumari.coelho.fi (h79-11.vpn.ti.com [172.24.79.11]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r2CDjTqF028272; Tue, 12 Mar 2013 08:45:41 -0500 From: Luciano Coelho To: CC: , Eyal Shapira Subject: [PATCH 08/13] wlcore: don't attempt to roam in case of p2p Date: Tue, 12 Mar 2013 15:44:19 +0200 Message-ID: <1363095864-24422-9-git-send-email-coelho@ti.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1363095864-24422-1-git-send-email-coelho@ti.com> References: <1363095864-24422-1-git-send-email-coelho@ti.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Eyal Shapira For STA we report beacon loss to higher levels so that wpa_s can attempt to roam without disconnecting. In case of P2P CLI we don't want to attempt roaming and instead disconnect immediately upon beacon loss. Signed-off-by: Eyal Shapira Signed-off-by: Luciano Coelho --- drivers/net/wireless/ti/wlcore/event.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ti/wlcore/event.c b/drivers/net/wireless/ti/wlcore/event.c index 70f289a..67f6168 100644 --- a/drivers/net/wireless/ti/wlcore/event.c +++ b/drivers/net/wireless/ti/wlcore/event.c @@ -237,6 +237,14 @@ void wlcore_event_beacon_loss(struct wl1271 *wl, unsigned long roles_bitmap) !test_bit(wlvif->role_id , &roles_bitmap)) continue; + vif = wl12xx_wlvif_to_vif(wlvif); + + /* don't attempt roaming in case of p2p */ + if (wlvif->p2p) { + ieee80211_connection_loss(vif); + continue; + } + /* * if the work is already queued, it should take place. * We don't want to delay the connection loss @@ -246,7 +254,6 @@ void wlcore_event_beacon_loss(struct wl1271 *wl, unsigned long roles_bitmap) &wlvif->connection_loss_work, msecs_to_jiffies(delay)); - vif = wl12xx_wlvif_to_vif(wlvif); ieee80211_cqm_rssi_notify( vif, NL80211_CQM_RSSI_BEACON_LOSS_EVENT,