From patchwork Mon Feb 10 11:47:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eliad Peller X-Patchwork-Id: 3618251 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 59085BF418 for ; Mon, 10 Feb 2014 11:47:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 933592018E for ; Mon, 10 Feb 2014 11:47:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B9B8420138 for ; Mon, 10 Feb 2014 11:47:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752573AbaBJLrv (ORCPT ); Mon, 10 Feb 2014 06:47:51 -0500 Received: from mail-wg0-f54.google.com ([74.125.82.54]:62360 "EHLO mail-wg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752399AbaBJLrt (ORCPT ); Mon, 10 Feb 2014 06:47:49 -0500 Received: by mail-wg0-f54.google.com with SMTP id x13so4168386wgg.9 for ; Mon, 10 Feb 2014 03:47:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BoeR8p6YnscNRtIr1SZYT8TvE9G7AK0hYk6YQdczQc8=; b=OTeQ0LexS3bYiVHLcUUynaCXnkXTY6JW+7gQKvNR4J7pLjzXM5Rxo7CTJWnXIRn3F6 yU08spi4v5MEjEMO+az0Ujez7nQay8RcvUmtIqztTAdcfr3UBDUypddX8JGb55OzTTr6 HtVFUDiwmHcXAjuzp8gAUXb6L6l1jBkzBIvirGvhcvE1pSN1mn0eIpe/eYavoLdn9bbC E/sII9+wyLCyfXRJCOso1L5ZIXM0ZkwuDOApqNymehEwV+3ZsoDbord7Qcmw9aPrN7Ch aL0j9ozPu4V949ZYvozTQr7BxKITX7aknN5acYkZfkd731cZS0eZ3tRM8FsCcbduMy3i KD6w== X-Gm-Message-State: ALoCoQk3JNmrFtfdUGhqCtGhb0jv8zxlB/fElNnQTctjoLTfsAQA1v8z3HYkvpKdS0j+1qKzQsFj X-Received: by 10.194.81.196 with SMTP id c4mr1257278wjy.57.1392032867675; Mon, 10 Feb 2014 03:47:47 -0800 (PST) Received: from muse.amr.corp.intel.com (93-173-177-113.bb.netvision.net.il. [93.173.177.113]) by mx.google.com with ESMTPSA id ju6sm34687484wjc.1.2014.02.10.03.47.46 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Feb 2014 03:47:47 -0800 (PST) From: Eliad Peller To: "John W. Linville" Cc: Subject: [PATCH 04/18] wlcore: AP: don't start mac80211 PS on non-peer HLIDs Date: Mon, 10 Feb 2014 13:47:20 +0200 Message-Id: <1392032854-28126-5-git-send-email-eliad@wizery.com> X-Mailer: git-send-email 1.8.5.2.229.g4448466.dirty In-Reply-To: <1392032854-28126-1-git-send-email-eliad@wizery.com> References: <1392032854-28126-1-git-send-email-eliad@wizery.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Arik Nemtsov It seems the wl18xx FW sometimes sends spurious changes on the PSM state of the broadcast HLID. This causes us to search for a station on a non-peer link and fail, causing warnings in our log. Prevent the driver from considering PSM changes for any non-peer HLIDs. Signed-off-by: Arik Nemtsov Signed-off-by: Eliad Peller --- drivers/net/wireless/ti/wlcore/ps.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ti/wlcore/ps.c b/drivers/net/wireless/ti/wlcore/ps.c index 26bfc36..b52516e 100644 --- a/drivers/net/wireless/ti/wlcore/ps.c +++ b/drivers/net/wireless/ti/wlcore/ps.c @@ -280,7 +280,11 @@ void wl12xx_ps_link_start(struct wl1271 *wl, struct wl12xx_vif *wlvif, struct ieee80211_sta *sta; struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); - if (test_bit(hlid, &wl->ap_ps_map)) + if (WARN_ON_ONCE(wlvif->bss_type != BSS_TYPE_AP_BSS)) + return; + + if (!test_bit(hlid, wlvif->ap.sta_hlid_map) || + test_bit(hlid, &wl->ap_ps_map)) return; wl1271_debug(DEBUG_PSM, "start mac80211 PSM on hlid %d pkts %d "