From owner-p4-projects@FreeBSD.ORG Sun Jan 27 20:35:06 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1B23416A420; Sun, 27 Jan 2008 20:35:06 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCA9416A41A for ; Sun, 27 Jan 2008 20:35:05 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id ADB6713C447 for ; Sun, 27 Jan 2008 20:35:05 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0RKZ5T1038408 for ; Sun, 27 Jan 2008 20:35:05 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0RKZ5iA038405 for perforce@freebsd.org; Sun, 27 Jan 2008 20:35:05 GMT (envelope-from sam@freebsd.org) Date: Sun, 27 Jan 2008 20:35:05 GMT Message-Id: <200801272035.m0RKZ5iA038405@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 134237 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jan 2008 20:35:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=134237 Change 134237 by sam@sam_ebb on 2008/01/27 20:34:54 change get IEEE80211_IOC_AMPDU_DENSITY and IEEE80211_IOC_AMPDU_LIMIT to return the negotiated value when in RUN state so ifconfig displays the current setting for sta vaps MFP4 after: 1 week Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#24 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#24 (text+ko) ==== @@ -718,6 +718,7 @@ ieee80211_ioctl_get80211(struct ieee80211vap *vap, u_long cmd, struct ieee80211req *ireq) { +#define MS(_v, _f) (((_v) & _f) >> _f##_S) struct ieee80211com *ic = vap->iv_ic; u_int kid, len; uint8_t tmpkey[IEEE80211_KEYBUF_SIZE]; @@ -953,11 +954,18 @@ case IEEE80211_IOC_AMPDU_LIMIT: if (vap->iv_opmode == IEEE80211_M_HOSTAP) ireq->i_val = vap->iv_ampdu_rxmax; + else if (vap->iv_state == IEEE80211_S_RUN) + ireq->i_val = MS(vap->iv_bss->ni_htparam, + IEEE80211_HTCAP_MAXRXAMPDU); else ireq->i_val = vap->iv_ampdu_limit; break; case IEEE80211_IOC_AMPDU_DENSITY: - ireq->i_val = vap->iv_ampdu_density; + if (vap->iv_state == IEEE80211_S_RUN) + ireq->i_val = MS(vap->iv_bss->ni_htparam, + IEEE80211_HTCAP_MPDUDENSITY); + else + ireq->i_val = vap->iv_ampdu_density; break; case IEEE80211_IOC_AMSDU: ireq->i_val = 0; @@ -1027,6 +1035,7 @@ break; } return error; +#undef MS } static int