From patchwork Tue Dec 2 07:53:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Grumbach X-Patchwork-Id: 5417441 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 5562CBEEA8 for ; Tue, 2 Dec 2014 07:58:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7E25220117 for ; Tue, 2 Dec 2014 07:58:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7E080200EC for ; Tue, 2 Dec 2014 07:58:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933025AbaLBH6j (ORCPT ); Tue, 2 Dec 2014 02:58:39 -0500 Received: from mga09.intel.com ([134.134.136.24]:8921 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933271AbaLBH6C (ORCPT ); Tue, 2 Dec 2014 02:58:02 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 01 Dec 2014 23:55:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,499,1413270000"; d="scan'208";a="617113911" Received: from unknown (HELO egrumbacLAB.jer.intel.com) ([10.12.217.187]) by orsmga001.jf.intel.com with ESMTP; 01 Dec 2014 23:57:59 -0800 From: Emmanuel Grumbach To: johannes@sipsolutions.net Cc: mcgrof@suse.com, linux-wireless@vger.kernel.org, Emmanuel Grumbach , Subject: [PATCH] cfg80211: don't WARN about two consecutive Country IE hint Date: Tue, 2 Dec 2014 09:53:25 +0200 Message-Id: <1417506805-20361-1-git-send-email-emmanuel.grumbach@intel.com> X-Mailer: git-send-email 1.9.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 This can happen and there is no point in added more detection code lower in the stack. Catching these in one single point (cfg80211) is enough. Stop WARNING about this case. This fixes: https://bugzilla.kernel.org/show_bug.cgi?id=89001 Cc: Fixes: 2f1c6c572d7b ("cfg80211: process non country IE conflicting first") Signed-off-by: Emmanuel Grumbach Acked-by: Luis R. Rodriguez --- net/wireless/reg.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 8fe21c0..3e69554 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -2047,11 +2047,8 @@ __reg_process_hint_country_ie(struct wiphy *wiphy, return REG_REQ_IGNORE; return REG_REQ_ALREADY_SET; } - /* - * Two consecutive Country IE hints on the same wiphy. - * This should be picked up early by the driver/stack - */ - if (WARN_ON(regdom_changes(country_ie_request->alpha2))) + + if (regdom_changes(country_ie_request->alpha2)) return REG_REQ_OK; return REG_REQ_ALREADY_SET; }