From owner-freebsd-wireless@freebsd.org Wed Aug 19 23:38:58 2015 Return-Path: Delivered-To: freebsd-wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05F799BDCF3 for ; Wed, 19 Aug 2015 23:38:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB55D1C2F for ; Wed, 19 Aug 2015 23:38:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t7JNcvWQ054530 for ; Wed, 19 Aug 2015 23:38:57 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-wireless@FreeBSD.org Subject: [Bug 202502] [net80211] [patch]: check and reset (if necessary) currently selected channel before device initialization Date: Wed, 19 Aug 2015 23:38:57 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: wireless X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: s3erios@gmail.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-wireless@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Aug 2015 23:38:58 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202502 Bug ID: 202502 Summary: [net80211] [patch]: check and reset (if necessary) currently selected channel before device initialization Product: Base System Version: 11.0-CURRENT Hardware: Any OS: Any Status: New Keywords: patch Severity: Affects Only Me Priority: --- Component: wireless Assignee: freebsd-wireless@FreeBSD.org Reporter: s3erios@gmail.com Keywords: patch Created attachment 160122 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=160122&action=edit Fix the issue and remove workaround from the wpi driver In case, when interface is recreated (create -> destroy -> create), some values (like ic->ic_curchan) are left unchanged and may be incompatible with new mode. As an example: 1) ifconfig wlan0 create wlandev wlanmode ahdemo channel 2) ifconfig wlan0 destroy 3) ifconfig wlan0 create wlandev wlanmode ibss ssid ssid 4) ifconfig wlan0 up may result in incorrect ic->ic_curchan value passed into driver and may lead to crash (for example, wpi firmware throws an error here). This patch adds a check into ieee80211_start_locked() and resets ic->ic_curchan to &ic->ic_channels[0] when the channel is incompatible with current mode. -- You are receiving this mail because: You are the assignee for the bug.