From owner-freebsd-wireless@freebsd.org Mon Feb 22 01:43:52 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 94B73AB02EE for ; Mon, 22 Feb 2016 01:43:52 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (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 61FDF1818; Mon, 22 Feb 2016 01:43:52 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x231.google.com with SMTP id l127so162166091iof.3; Sun, 21 Feb 2016 17:43:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QeBrboImkJ9CZq47XkH7B7lup2gEAW8YdgYcr71Gv7E=; b=UvZHUaQMdZqWnp6NsnD9sdKXaMIu/kQNJSy08JjRCCnpC1Ee1CdoFRkgpXBXVBQcYb guKiTo4wcCLUrakUAa/70eE2y1Fhw9a8mOtaN42X4W0q/PjYDocXYyv6fjXVCX2DRcea fnqjj7w7JUA6SfNh76T9S/EerMZNYIqON3r+jRScZ56SdZly6xBdY4VbLo1gkmfq6OwY siUx+84lWdTWOX/B6i9gsucPfKP4u/5Q13CuUYEH4nXDJXpUpp0OsEr/kkMwvHnDSdO/ Gml40ddwYS8AhYlo/dWORJDQuMry4Hd6GMAH9/+DWR/G9/SkwJ3FlRP3e97OoaZQ+ApG TSUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=QeBrboImkJ9CZq47XkH7B7lup2gEAW8YdgYcr71Gv7E=; b=AbxuPt8A2Nhs8PdvTwd6Gcyn+koVPKf2GeLDAO0v/byVYX8aMj9L3BYFXVreYI6jjZ ddBIhgsTcf/wvPBYvLfjjp1dSOadO4kQsx9oxHZMJP2V1mRGyVFpBcw6TKpnWadI/sce QZZsF8rUo/rZ8UDHCWmPMABwIRF3xb9CmhrCwQ6/zPIDV0hiiSRuOxCyU++/uE+HzsBL UzSbVCEGLrQYUYMKdCns/6cFjas//EzSTXnjRVXP1S5KpkPymnI3+cGJJG7i5vJKSRJI UFCuHCOCeiSh8Ysxv7gUpCauBJh5ri3byb2MdxzsYzJPYaP27GDJc6MV6ft5bscKRi21 lAHA== X-Gm-Message-State: AG10YOT9ZnFMZvcPJgq15Qp8GSXDSsMDzcMk+QptHGlJisM/KUxni5/2ggWF0VLZUf3vst02Ad58dG45beu0tg== MIME-Version: 1.0 X-Received: by 10.107.132.142 with SMTP id o14mr24988570ioi.75.1456105431758; Sun, 21 Feb 2016 17:43:51 -0800 (PST) Received: by 10.36.14.19 with HTTP; Sun, 21 Feb 2016 17:43:51 -0800 (PST) In-Reply-To: References: Date: Sun, 21 Feb 2016 17:43:51 -0800 Message-ID: Subject: Re: net80211 inactivity processing From: Adrian Chadd To: Andriy Voskoboinyk Cc: "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 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 01:43:52 -0000 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 = &ic->ic_sta; > struct ieee80211vap *vap; > struct ieee80211_node *ni; > int gen = 0; > > IEEE80211_NODE_ITERATE_LOCK(nt); > gen = ++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 <= vap->iv_inact_probe) && > ni->ni_rates.rs_nrates != 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"