From owner-freebsd-current@freebsd.org Wed Sep 9 22:41:46 2020 Return-Path: Delivered-To: freebsd-current@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 11DA63DF969; Wed, 9 Sep 2020 22:41:46 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from dec.sakura.ne.jp (dec.sakura.ne.jp [210.188.226.8]) (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 4BmxpJ5W27z427x; Wed, 9 Sep 2020 22:41:43 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from kalamity.joker.local (180-198-4-200.nagoya1.commufa.jp [180.198.4.200]) (authenticated bits=0) by dec.sakura.ne.jp (8.15.2/8.15.2/[SAKURA-WEB]/20080708) with ESMTPA id 089MfZGG027306; Thu, 10 Sep 2020 07:41:35 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) Date: Thu, 10 Sep 2020 07:41:35 +0900 From: Tomoaki AOKI To: svn-src-head@freebsd.org Cc: freebsd-current@freebsd.org, bz@FreeBSD.org Subject: Re: svn commit: r365419 - in head/sys/dev: ath bwi iwm iwn mwl otus usb/wlan wtap Message-Id: <20200910074135.45d5b208b083c93efbce9259@dec.sakura.ne.jp> Reply-To: junchoon@dec.sakura.ne.jp Organization: Junchoon corps X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BmxpJ5W27z427x X-Spamd-Bar: ++++ X-Spamd-Result: default: False [4.12 / 15.00]; HAS_REPLYTO(0.00)[junchoon@dec.sakura.ne.jp]; RCVD_VIA_SMTP_AUTH(0.00)[]; MV_CASE(0.50)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; TO_DN_NONE(0.00)[]; HAS_ORG_HEADER(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:9370, ipnet:210.188.224.0/19, country:JP]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[180.198.4.200:received]; FAKE_REPLY(1.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.41)[0.411]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.86)[0.863]; DMARC_NA(0.00)[sakura.ne.jp]; NEURAL_SPAM_LONG(0.44)[0.444]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-current,svn-src-head] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Sep 2020 22:41:46 -0000 This breaks at least iwm. (Other drivers not tested.) Messages below are repeatedly shown and no carrier detected. Manually reverting this commit fixes the issue. iwm0: failed to send antennas before calibration: 35 iwm_run_init_ucode: failed 35 iwm_init_hw failed 35 iwm0: could not initiate scan and lesser times messages below. iwm0: iwm_send_phy_db_data: Cannot send HCMD of Phy DB cfg section, 35 iwm_init_hw failed 35 iwm0: could not initiate scan > Author: bz > Date: Mon Sep 7 15:35:40 2020 > New Revision: 365419 > URL: https://svnweb.freebsd.org/changeset/base/365419 > > Log: > WiFi: fix ieee80211_media_change() callers > > In r178354 with the introduction of multi-bss ("vap") support factoring > out started and with r193340 ieee80211_media_change() no longer returned > ENETRESET but only 0 or error. > As ieee80211(9) tells the ieee80211_media_change() function should not > be called directly but is registered with ieee80211_vap_attach() instead. > Some drivers have not been fully converted. After fixing the return > checking some of these functions were simply wrappers between > ieee80211_vap_attach() and ieee80211_media_change(), so remove the extra > function, where possible as well. > > PR: 248955 > Submitted by: Tong Zhang (ztong0001 gmail.com) (original) > MFC after: 3 days > Sponsored by: The FreeBSD Foundation > > Modified: > head/sys/dev/ath/if_ath.c > head/sys/dev/bwi/if_bwi.c > head/sys/dev/iwm/if_iwm.c > head/sys/dev/iwn/if_iwn.c > head/sys/dev/mwl/if_mwl.c > head/sys/dev/otus/if_otus.c > head/sys/dev/usb/wlan/if_run.c > head/sys/dev/wtap/if_wtap.c > > Modified: head/sys/dev/ath/if_ath.c > ============================================================================== > --- head/sys/dev/ath/if_ath.c Mon Sep 7 14:40:33 2020 (r365418) > +++ head/sys/dev/ath/if_ath.c Mon Sep 7 15:35:40 2020 (r365419) > @@ -160,7 +160,6 @@ static int ath_init(struct ath_softc *); > static void ath_stop(struct ath_softc *); > static int ath_reset_vap(struct ieee80211vap *, u_long); > static int ath_transmit(struct ieee80211com *, struct mbuf *); > -static int ath_media_change(struct ifnet *); > static void ath_watchdog(void *); > static void ath_parent(struct ieee80211com *); > static void ath_fatal_proc(void *, int); (snip) > Modified: head/sys/dev/iwm/if_iwm.c > ============================================================================== > --- head/sys/dev/iwm/if_iwm.c Mon Sep 7 14:40:33 2020 (r365418) > +++ head/sys/dev/iwm/if_iwm.c Mon Sep 7 15:35:40 2020 (r365419) > @@ -4426,8 +4426,8 @@ iwm_media_change(struct ifnet *ifp) > int error; > > error = ieee80211_media_change(ifp); > - if (error != ENETRESET) > - return error; > + if (error != 0) > + return (error); > > IWM_LOCK(sc); > if (ic->ic_nrunning > 0) { > @@ -4435,7 +4435,7 @@ iwm_media_change(struct ifnet *ifp) > iwm_init(sc); > } > IWM_UNLOCK(sc); > - return error; > + return (0); > } > > static void (snip) -- Tomoaki AOKI