From patchwork Wed Aug 1 23:54:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Stewart X-Patchwork-Id: 1266071 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 B9A1E3FC71 for ; Thu, 2 Aug 2012 00:27:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751457Ab2HBA1Z (ORCPT ); Wed, 1 Aug 2012 20:27:25 -0400 Received: from mail-ob0-f202.google.com ([209.85.214.202]:63377 "EHLO mail-ob0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750983Ab2HBA1Z (ORCPT ); Wed, 1 Aug 2012 20:27:25 -0400 Received: by obbwc20 with SMTP id wc20so5564419obb.1 for ; Wed, 01 Aug 2012 17:27:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:date:subject:to:message-id:x-gm-message-state; bh=BJ9gUlzHLQ8pSv9k/1iTxQFJKthN2MVyOSTCuknlXWU=; b=eiXHOFKDX+grGPlEUgeEY8v5rnXji7GMt7eAXjZdLZL/dGDn1u7BeaTJCf664Jrwj1 EUypMzypLa+OORQSaugGai9RKUFB3LmNlS+2EoeI2yq8u0vgWYUbOBla2tjPon63E7Zq XnCo0tdfUbp8Bmmdeg0/SlARBEotcVyqB711OgUNOnKndBY3CIOUv5PJXsZqfFlPkXOv 4OijzU/WwqZFJ96mhd+P7ifrAo5BvC3JadD8QS3/yx0CeYpPm4Zj/gxE8WQIJG7fNdAi uwS7SdSHCm19iakFzPyqVQguXKLNcrQ1bxFh1pVxNC6FArg641x5pXHfjySnPCAfzgyQ S66A== Received: by 10.50.158.230 with SMTP id wx6mr25890igb.0.1343867244454; Wed, 01 Aug 2012 17:27:24 -0700 (PDT) Received: by 10.50.158.230 with SMTP id wx6mr25885igb.0.1343867244391; Wed, 01 Aug 2012 17:27:24 -0700 (PDT) Received: from wpzn4.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id s10si4490277igs.0.2012.08.01.17.27.24 (version=TLSv1/SSLv3 cipher=AES128-SHA); Wed, 01 Aug 2012 17:27:24 -0700 (PDT) Received: from glenhelen.mtv.corp.google.com (glenhelen.mtv.corp.google.com [172.22.72.223]) by wpzn4.hot.corp.google.com (Postfix) with ESMTP id 065B51E0043 for ; Wed, 1 Aug 2012 17:27:24 -0700 (PDT) Received: by glenhelen.mtv.corp.google.com (Postfix, from userid 110058) id 7762E2056A; Wed, 1 Aug 2012 17:27:23 -0700 (PDT) From: Paul Stewart Date: Wed, 1 Aug 2012 16:54:42 -0700 Subject: [PATCH] cfg80211: Clear "beacon_found" on regulatory restore To: linux-wireless@vger.kernel.org Message-Id: <20120802002723.7762E2056A@glenhelen.mtv.corp.google.com> X-Gm-Message-State: ALoCoQkxwrmiaOG7dVcemtBaWoXw/omNLy1r4GCNMeWz5Hr9g8HMO1yYGZWuusUm2k/hG0FDQAuLB9LzMmDDs+nQkqabmsPLvnzGvtN1jQA+VEApCSLGS9kSDDuno8Yfwr5/zXANNYkE6M8w9RP+7Ob1/QPr1SdeO+T5mgE5p98gajWKl9of5WFwdl3sl1OtbYg0qXknNFKKTm3mKEL3PPBmsOSh/RZtcxjoK+kkC1l1e3yB/O5sI50= Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Restore the default state to the "beacon_found" flag when the channel flags are restored. Otherwise, we can end up with a channel that we can no longer transmit on even when we can see beacons on that channel. Signed-off-by: Paul Stewart --- net/wireless/reg.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 2303ee7..cc6b4c4 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1885,6 +1885,7 @@ static void restore_custom_reg_settings(struct wiphy *wiphy) chan->flags = chan->orig_flags; chan->max_antenna_gain = chan->orig_mag; chan->max_power = chan->orig_mpwr; + chan->beacon_found = false; } } }