From patchwork Sat Jul 25 15:25:51 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helmut Schaa X-Patchwork-Id: 37338 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 n6PFPl5H014814 for ; Sat, 25 Jul 2009 15:25:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751634AbZGYPZq (ORCPT ); Sat, 25 Jul 2009 11:25:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751556AbZGYPZq (ORCPT ); Sat, 25 Jul 2009 11:25:46 -0400 Received: from fg-out-1718.google.com ([72.14.220.155]:43224 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751364AbZGYPZp (ORCPT ); Sat, 25 Jul 2009 11:25:45 -0400 Received: by fg-out-1718.google.com with SMTP id e12so255432fga.17 for ; Sat, 25 Jul 2009 08:25:44 -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:mime-version:content-type:content-transfer-encoding :content-disposition:message-id; bh=FiqXuncJEHg2HGqQOuADFbI2FtuqJtLPn6+XHBl4pz0=; b=gdsOTpzZ+7Og4o8+VRBBjIrSAxcJeAHQWGSFimZs+jCtnRuPDxAIjIjdehQuJLN4l8 ykh8Lepy9O7AXBPjeJTBrH1CzyVgb1reqwoU/H1BOZArmnRLS20uauoY5FUx+vgP7AWK AV5X9eQDbImKTssTxWjgfLpTCZZO/sm8IeHZE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:subject:date:user-agent:cc:mime-version:content-type :content-transfer-encoding:content-disposition:message-id; b=ErWvGYEwqICBQbYVzeFZ2vXdl9ZG0IF0wSISw0VUDS13QV0Ea3/dXZcsIykig1L3ic xP9YLRDGmr6Ecv9Qahh3dRl71N3zYG+1mAV2f03EdGha1ogyO3TMp2WEJx95uYg0E2TW IsW9K3UMlUqnCkdVMn+W5eavkxiSSOQNhUg2Q= Received: by 10.86.28.2 with SMTP id b2mr736678fgb.40.1248535543860; Sat, 25 Jul 2009 08:25:43 -0700 (PDT) Received: from noname (p5495F93F.dip.t-dialin.net [84.149.249.63]) by mx.google.com with ESMTPS id e20sm6030577fga.10.2009.07.25.08.25.43 (version=SSLv3 cipher=RC4-MD5); Sat, 25 Jul 2009 08:25:43 -0700 (PDT) From: Helmut Schaa To: John Linville Subject: [PATCH] mac80211: fix an oops in ieee80211_scan_state_set_channel Date: Sat, 25 Jul 2009 17:25:51 +0200 User-Agent: KMail/1.9.10 Cc: Johannes Berg , Pavel Roskin , linux-wireless@vger.kernel.org, Larry Finger MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200907251725.52084.helmut.schaa@googlemail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Fix an oops in ieee80211_scan_state_set_channel which was triggered if the last scanned channel was skipped (for example due to regulatory restrictions) by returning to the decision state after each skipped channel. Signed-off-by: Helmut Schaa --- -- 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