From nobody Sun Mar 27 20:14:05 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 909771A53B0A; Sun, 27 Mar 2022 20:14:07 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KRRqf3CVhz4nsH; Sun, 27 Mar 2022 20:14:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648412047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PLt1EsL86/MiCYvjUU+GZZzEqywzi4UyK3O4R1fbtg4=; b=Av6UZ2Xn8AVwMYOZOJxSc1uFhnW0budyXFk3XeMI8bOIYM5ehz5F7RQ+A8FWX37gc8Hy90 LB3AFWhBFi2h7g1OFXiBscc6CMHuKl3BoN8Py2AUfFbgD1KD1lvOrOAELt4/C49N7yQpN7 PqAKIn8ayHu1rWExO2hJ+IvtD5b+udq0MZmY8LJGKM5HZLr5kjuvJso7PJZVwi6ZA9ekxk R69EwmEkdvlAB42cnwXcSmKkpS8gJ4aEwwibl20rWyT130e/+HZLCKggYm2RpiDaud636p JcaesHalMBqOKqQ/4bOZvVXg3PeglyK0DkEtk/PbYFyu3KMCu4D8VWvUeI+OpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 CD4B21BCA3; Sun, 27 Mar 2022 20:14:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22RKE5R9037245; Sun, 27 Mar 2022 20:14:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22RKE5WX037244; Sun, 27 Mar 2022 20:14:05 GMT (envelope-from git) Date: Sun, 27 Mar 2022 20:14:05 GMT Message-Id: <202203272014.22RKE5WX037244@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 24c2117bafdb - stable/13 - LinuxKPI: 802.11: implement ieee80211_beacon_loss() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 24c2117bafdba3c6998ddd407d643e142c5deda5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648412047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PLt1EsL86/MiCYvjUU+GZZzEqywzi4UyK3O4R1fbtg4=; b=OybCyh1Byj2O292stGqOpFpJ8eT2FAO4lIiU0mKArd9emE5PxHlqxMPSaTPxpWRPYMdXUe sCZT9wcVjNoSgzjdWHPllhCBuO6S272E/6xsh2HRlRyYcpifs8CrLmuVarwShDL8kAmKgh uBB6LiySVleHb+XhWb5K92J3hR4R06EQlYMsCl1e1EfBjSBSxznTn+/U5+0NfbNW6vAWSh dO/hUuWjqt2y9FqIVzXr/jcmzn/luMB1NzIYz7yFmUTFqRo47k4UjakcxU9rNDijHpTram AFF8Wr+SVR85Y0jhpVk3D8zpZzqFXAgW5NqMnhfGzkMdFauDW2kHtfBGTvtmdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648412047; a=rsa-sha256; cv=none; b=FXxZEFiAcoCciNXH6M+hW+A/5Hq8jRsjM9x1afWwDgavOos2pDFzTqv2o7DoqjygQgd58h p/9Wrgfry8S5qapOB4raOjp+zGYAH9jnEA5ld4Gv6Ol4E2yDHLFqIns+BSUA8etg0MvGgz WprVCgfpfc/nbkuntE/8Igo8q3nqBucm7zfRp1HKlbE6lRbxnYWtiKx/5shMwvFPKfV5w5 7G+AXg3TtTmyyaCsJ/S7YF1XZcnNwKzcHmV71elihIEt+E4Vkvovkw3Czy1NhVyUuSMDP9 lM+v2BRA1YN/c2xwtekAzsThp53w/mbiAeAKnw5sHt67iVcnjBdez9alOAlyRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=24c2117bafdba3c6998ddd407d643e142c5deda5 commit 24c2117bafdba3c6998ddd407d643e142c5deda5 Author: Bjoern A. Zeeb AuthorDate: 2022-03-22 15:02:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-03-27 18:08:58 +0000 LinuxKPI: 802.11: implement ieee80211_beacon_loss() Implement ieee80211_beacon_loss() similar to ieee80211_connection_loss() with different state handling. While here leave a comment in connection_loss() about the state change argument. Sponsored by: The FreeBSD Foundation (cherry picked from commit bb81db90f7e00f56df9ea14132a54ee983e7177f) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 3 ++- sys/compat/linuxkpi/common/src/linux_80211.c | 28 ++++++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 11e8b031a97e..14404d4723f8 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -904,6 +904,7 @@ void linuxkpi_ieee80211_txq_get_depth(struct ieee80211_txq *, uint64_t *, uint64_t *); struct wireless_dev *linuxkpi_ieee80211_vif_to_wdev(struct ieee80211_vif *); void linuxkpi_ieee80211_connection_loss(struct ieee80211_vif *); +void linuxkpi_ieee80211_beacon_loss(struct ieee80211_vif *); /* -------------------------------------------------------------------------- */ @@ -1403,7 +1404,7 @@ ieee80211_beacon_get_template(struct ieee80211_hw *hw, static __inline void ieee80211_beacon_loss(struct ieee80211_vif *vif) { - TODO(); + linuxkpi_ieee80211_beacon_loss(vif); } static __inline void diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 2fe8b4ebddd0..ceb9c626c507 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3708,13 +3708,39 @@ linuxkpi_ieee80211_connection_loss(struct ieee80211_vif *vif) * Let the statemachine handle all neccessary changes. */ nstate = IEEE80211_S_INIT; - arg = 0; + arg = 0; /* Not a valid reason. */ if (debug_80211 & D80211_TRACE) ic_printf(vap->iv_ic, "%s: vif %p\n", __func__, vif); ieee80211_new_state(vap, nstate, arg); } +void +linuxkpi_ieee80211_beacon_loss(struct ieee80211_vif *vif) +{ + struct lkpi_vif *lvif; + struct ieee80211vap *vap; + enum ieee80211_state nstate; + int arg; + + lvif = VIF_TO_LVIF(vif); + vap = LVIF_TO_VAP(lvif); + + /* + * Go to scan; otherwise we need to elaborately check state and + * handle accordingly, e.g., if in RUN we could call iv_bmiss. + * Let the statemachine handle all neccessary changes. + */ + nstate = IEEE80211_S_SCAN; + arg = 0; + + /* We should be in RUN. Can we assert that? */ + if (debug_80211 & D80211_TRACE || vap->iv_state != IEEE80211_S_RUN) + ic_printf(vap->iv_ic, "%s: vif %p vap %p state %s\n", __func__, + vif, vap, ieee80211_state_name[vap->iv_state]); + ieee80211_new_state(vap, nstate, arg); +} + MODULE_VERSION(linuxkpi_wlan, 1); MODULE_DEPEND(linuxkpi_wlan, linuxkpi, 1, 1, 1); MODULE_DEPEND(linuxkpi_wlan, wlan, 1, 1, 1);