From patchwork Sat Jul 25 13:06:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helmut Schaa X-Patchwork-Id: 37323 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6PD6WDl028432 for ; Sat, 25 Jul 2009 13:06:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752726AbZGYNG3 (ORCPT ); Sat, 25 Jul 2009 09:06:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752666AbZGYNG3 (ORCPT ); Sat, 25 Jul 2009 09:06:29 -0400 Received: from fg-out-1718.google.com ([72.14.220.159]:59060 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752665AbZGYNG2 (ORCPT ); Sat, 25 Jul 2009 09:06:28 -0400 Received: by fg-out-1718.google.com with SMTP id e12so244068fga.17 for ; Sat, 25 Jul 2009 06:06:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:message-id; bh=eFcvNh40LdnOMMq4rwxgnKHDijxSbdr8SzAzVAk8m1o=; b=AgPxLZOMiNjnx4vhmDmLzfx3+JdBIEhT428TkDBB7d6TjIA6davO2FLTZXCvhgLxQ7 AiAUPncJYp0zm6qLrY0aTo+JmG6v7XPHmyEL097xma3KEH2G2bp2zXdA8r3RBLnIEUuo saEI/qIIJyY0sz8BPFa6hE26VbrgzP9ouCJZQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:message-id; b=wSJbs6hv1fk+CGax6d8rA3kE0fonNhuJWSxb7K12WCvv+VqNrdP7cSBlyY7yhinPij ucJbKOpylkjZvpWIIRJBEJj0MwVIFloRnGEz6gDlPOPxl6XkIHA6hpy3PJh+7L49d+5d /4CW6sWgDOJc7QyLTHT24a2gHaIJq7/tT49w8= Received: by 10.86.66.20 with SMTP id o20mr666790fga.15.1248527187576; Sat, 25 Jul 2009 06:06:27 -0700 (PDT) Received: from noname (p5495F93F.dip.t-dialin.net [84.149.249.63]) by mx.google.com with ESMTPS id e20sm5622429fga.5.2009.07.25.06.06.26 (version=SSLv3 cipher=RC4-MD5); Sat, 25 Jul 2009 06:06:26 -0700 (PDT) From: Helmut Schaa To: Pavel Roskin Subject: Re: [PATCH] mac80211: fix oops in ieee80211_scan_state_set_channel() Date: Sat, 25 Jul 2009 15:06:34 +0200 User-Agent: KMail/1.9.10 Cc: Johannes Berg , linux-wireless@vger.kernel.org, John Linville , Larry Finger References: <20090725051801.2965.76768.stgit@ct.roinet.com> In-Reply-To: <20090725051801.2965.76768.stgit@ct.roinet.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200907251506.34943.helmut.schaa@googlemail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Am Samstag, 25. Juli 2009 schrieb Pavel Roskin: > Move check for the final value of local->scan_channel_idx from > ieee80211_scan_state_decision() to ieee80211_scan_state_set_channel(). > > Stop the state machine in ieee80211_scan_work() by checking > local->scanning. Don't return a value from > ieee80211_scan_state_decision(). Hmm, I'd prefer to keep the decision state as entry and exit point to the scan state machine. The patch below should also fix this issue by returning back to the decision state after every skipped channel. In the long run I would like to move the channel selection also to the decision state in order to implement various improvements (like scanning multiple channels in a row or reordering the channel list). I was in the meantime able to reproduce the oops by setting an other regulatory domain. Pavel, Larry, does this patch help you as well? Thanks, Helmut --- -- 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/mac80211/scan.c b/net/mac80211/scan.c index b376775..147772a 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -605,8 +605,11 @@ static void ieee80211_scan_state_set_channel(struct ieee80211_local *local, /* advance state machine to next channel/band */ local->scan_channel_idx++; - if (skip) + if (skip) { + /* if we skip this channel return to the decision state */ + local->next_scan_state = SCAN_DECISION; return; + } /* * Probe delay is used to update the NAV, cf. 11.1.3.2.2