From owner-freebsd-wireless@freebsd.org Mon Feb 22 19:37:10 2016 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 26641AB0D73 for ; Mon, 22 Feb 2016 19:37:10 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com [209.85.217.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF79E1212 for ; Mon, 22 Feb 2016 19:37:09 +0000 (UTC) (envelope-from andriyvos@gmail.com) Received: by mail-lb0-f170.google.com with SMTP id bc4so88301837lbc.2 for ; Mon, 22 Feb 2016 11:37:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:to:subject:references:date :mime-version:content-transfer-encoding:from:message-id:in-reply-to :user-agent; bh=x87DiN4tKwXdFzwqoD5FrDWm+HK/ASPANAmCmyUKPfM=; b=aI9nI4o71X1jzhAGIoFj47dZGPjY5swEgrdNMsGP/YxaPVF8Eglri0IWs+eu1IZ4Yk 4h+HAPIrD6QL2m9rNGZBEDC1nFveuRPDntlFHREDPZquYRT+yOOgNI7PEidz772iT5eT rIumG3LLKs/78ttTvoQjuMu7is+/9/DQthCwiOsBftRHRdkb9ZNgvWb32MlHrQuhr8ZI Aca1R/XctJA4U/FutJhGzUT1fxjyrAt4pJAulKxaxK0VsKqe/RYzGnxgSEm9f6bRkAJQ Vd/efMODehlz4A3Q2N6y9n9LRlEqSRB2pq1+8EejLVZidbtSN2mMYB9iCXPWotSP6fZk X4+g== X-Gm-Message-State: AG10YOQJ/Z5N9Rdfhn2txs+XzTFe3LK8qSzPhbrCfc8aAT2U4ajcttMls+91Y2ZfI+x0vQ== X-Received: by 10.112.159.200 with SMTP id xe8mr3892886lbb.75.1456162786127; Mon, 22 Feb 2016 09:39:46 -0800 (PST) Received: from localhost (host-176-37-109-22.la.net.ua. [176.37.109.22]) by smtp.gmail.com with ESMTPSA id 73sm3548984lfu.9.2016.02.22.09.39.44 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 22 Feb 2016 09:39:45 -0800 (PST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Adrian Chadd" , "freebsd-wireless@freebsd.org" Subject: Re: net80211 inactivity processing References: Date: Mon, 22 Feb 2016 19:39:46 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable From: "Andriy Voskoboinyk" Message-ID: In-Reply-To: User-Agent: Opera Mail/12.16 (FreeBSD) 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: Mon, 22 Feb 2016 19:37:10 -0000 Mon, 22 Feb 2016 03:43:51 +0200 =D0=B1=D1=83=D0=BB=D0=BE =D0=BD=D0=B0=D0= =BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE Adrian Chadd = : Because control frames are disabled by default? (the timer is refreshed every time when a frame goes into input path (ni->ni_inact =3D = ni->ni_inact_reload)). This may be added to TX callback (already implemented in https://reviews.freebsd.org/D5147); however, I have no idea what to do w= ith > drivers that lie about frame completion/failure > Hi, > > I think it is a hold-over from how node reclaimation used to work. > Sending null data frames to probe if a station is still there is a > common thing to do. So yeah, maybe we should go figure out why the > inactivity timer isn't kicked if the NULL data frame succeeds (ie, the= > driver explicitly gives us ACK feedback, rather than drivers that lie > about frame completion/failure.) > > > > -adrian > > > On 21 February 2016 at 16:34, Andriy Voskoboinyk = > wrote: >> Hi, >> >> What is the purpose of the following code? (especially in HOSTAP mode= ) >> (ieee80211_node.c): >> >> static void >> ieee80211_timeout_stations(struct ieee80211com *ic) >> { >> struct ieee80211_node_table *nt =3D &ic->ic_sta; >> struct ieee80211vap *vap; >> struct ieee80211_node *ni; >> int gen =3D 0; >> >> IEEE80211_NODE_ITERATE_LOCK(nt); >> gen =3D ++nt->nt_scangen; >> restart: >> IEEE80211_NODE_LOCK(nt); >> TAILQ_FOREACH(ni, &nt->nt_node, ni_list) { >> ... >> if ((vap->iv_flags_ext & IEEE80211_FEXT_INACT= ) = >> && >> (0 < ni->ni_inact && >> ni->ni_inact <=3D vap->iv_inact_probe) &= & >> ni->ni_rates.rs_nrates !=3D 0) { >> IEEE80211_NOTE(vap, >> IEEE80211_MSG_INACT | >> IEEE80211_MSG_NODE, >> ni, "%s", >> "probe station due to inactivity"= ); >> /* >> * Grab a reference before unlocking = the >> table >> * so the node cannot be reclaimed = >> before we >> * send the frame. = >> ieee80211_send_nulldata >> * understands we've done this and = >> reclaims >> the >> * ref for us as needed. >> */ >> ieee80211_ref_node(ni); >> IEEE80211_NODE_UNLOCK(nt); >> ieee80211_send_nulldata(ni); = = >> <<< >> here >> /* XXX stat? */ >> goto restart; >> } >> ... >> } >> IEEE80211_NODE_UNLOCK(nt); >> >> IEEE80211_NODE_ITERATE_UNLOCK(nt); >> } >> >> As for me, ieee80211_send_nulldata() will not refresh ni->ni_inact, >> nor will trigger any data transmission from the STA (so, it does = >> nothing?). >> _______________________________________________ >> freebsd-wireless@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-wireless >> To unsubscribe, send any mail to = >> "freebsd-wireless-unsubscribe@freebsd.org"