From patchwork Tue Apr 22 20:45:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 4035281 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 1A06FBFF02 for ; Tue, 22 Apr 2014 20:46:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 238C220219 for ; Tue, 22 Apr 2014 20:46:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D3DC92021F for ; Tue, 22 Apr 2014 20:46:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758262AbaDVUp4 (ORCPT ); Tue, 22 Apr 2014 16:45:56 -0400 Received: from cantor2.suse.de ([195.135.220.15]:48156 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758237AbaDVUpy (ORCPT ); Tue, 22 Apr 2014 16:45:54 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BA0F2AD19; Tue, 22 Apr 2014 20:45:52 +0000 (UTC) Date: Tue, 22 Apr 2014 22:45:52 +0200 From: "Luis R. Rodriguez" To: Michael Leun Cc: "Luis R. Rodriguez" , johannes@sipsolutions.net, linux-wireless@vger.kernel.org, arik@wizery.com, linux@eikelenboom.it Subject: Re: [PATCH 0/2] cfg80211: two reg fixes Message-ID: <20140422204552.GR27882@wotan.suse.de> References: <1398137975-14275-1-git-send-email-mcgrof@do-not-panic.com> <20140422180003.6438dbb7@xenia.leun.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140422180003.6438dbb7@xenia.leun.net> User-Agent: Mutt/1.5.17 (2007-11-01) 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=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 On Tue, Apr 22, 2014 at 06:00:03PM +0200, Michael Leun wrote: > On Mon, 21 Apr 2014 20:39:33 -0700 > "Luis R. Rodriguez" wrote: > > > > > that'd be appreciated as an alternative. I'm also very curious to hear > > no one else would have run into the same regression as you have. > > I only see this on an Acer PTZ1825 with an ath9k wireless card, but > that machine was not sold with that wlan card, so other people with the > same model won't neccesarily see the same issue. OK I see the issue and its clear now how this could have gone through, the wiphy comes from the country IE and it could have gone disappearing during suspend / hotplug, so we do need to check for it again. --- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/wireless/reg.c b/net/wireless/reg.c index f054137..4f375b6 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1602,7 +1602,8 @@ __reg_process_hint_country_ie(struct wiphy *wiphy, return REG_REQ_IGNORE; return REG_REQ_ALREADY_SET; } else { - if (wiphy->regulatory_flags & REGULATORY_COUNTRY_IE_IGNORE) + if (wiphy && + wiphy->regulatory_flags & REGULATORY_COUNTRY_IE_IGNORE) return REG_REQ_IGNORE; }