From owner-freebsd-wireless@freebsd.org Tue Sep 1 21:08:59 2020 Return-Path: Delivered-To: freebsd-wireless@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 305CE378651 for ; Tue, 1 Sep 2020 21:08:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4Bh06z0Z8vz4G59 for ; Tue, 1 Sep 2020 21:08:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 1387C37845F; Tue, 1 Sep 2020 21:08:59 +0000 (UTC) Delivered-To: wireless@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1351D3787BD for ; Tue, 1 Sep 2020 21:08:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bh06y6nbWz4GJh for ; Tue, 1 Sep 2020 21:08:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CD3C61F8A1 for ; Tue, 1 Sep 2020 21:08:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 081L8wGc083107 for ; Tue, 1 Sep 2020 21:08:58 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 081L8wjL083106 for wireless@FreeBSD.org; Tue, 1 Sep 2020 21:08:58 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: wireless@FreeBSD.org Subject: [Bug 248955] [PATCH] net80211: fix ieee80211_media_change() return value Date: Tue, 01 Sep 2020 21:08:58 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: bz@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: wireless@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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.33 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: Tue, 01 Sep 2020 21:08:59 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D248955 Bjoern A. Zeeb changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open Assignee|bz@FreeBSD.org |wireless@FreeBSD.org --- Comment #1 from Bjoern A. Zeeb --- I am not sure this is the correct fix. A lot of drivers also pass it to ieee80211_vap_attach() which then tickles = down to ifmedia_init() where it is set to ifm->ifm_change =3D change_callback;=20 ifmedia_ioctl() then checks for a !=3D 0 error. Seems to be a good copy&paste error either way as one or the other case will break. It seems in r178354 the first factoring out of things happened, when it cou= ld still return ENETRESET which was then after successive changes removed in https://svnweb.freebsd.org/base/head/sys/net80211/ieee80211.c?r1=3D193339&r= 2=3D193340& which is the code as it is today. As a conclusion I'd say the drivers have= not been updated to reflect these changes after r178354; see https://svnweb.freebsd.org/base/head/sys/dev/ath/if_ath.c?r1=3D178353&r2=3D= 178354& for why this still was. Would you follow the conclusion that these days the drivers could savely ch= eck for !=3D 0 and we should rather fix (the ones I found): ./dev/ath/if_ath.c ./dev/bwi/if_bwi.c ./dev/iwm/if_iwm.c ./dev/iwn/if_iwn.c ./dev/malo/if_malo.c ./dev/mwl/if_mwl.c ./dev/otus/if_otus.c ./dev/usb/wlan/if_run.c ./dev/wtap/if_wtap.c Cc:ing re-assigning back to the list so that other driver maintainers will = also see. --=20 You are receiving this mail because: You are the assignee for the bug.=