From owner-p4-projects@FreeBSD.ORG Tue Dec 14 03:09:04 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F02B916A4D0; Tue, 14 Dec 2004 03:09:03 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BEB5716A4CE for ; Tue, 14 Dec 2004 03:09:03 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACA4643D45 for ; Tue, 14 Dec 2004 03:09:03 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBE393il001462 for ; Tue, 14 Dec 2004 03:09:03 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBE393ah001459 for perforce@freebsd.org; Tue, 14 Dec 2004 03:09:03 GMT (envelope-from sam@freebsd.org) Date: Tue, 14 Dec 2004 03:09:03 GMT Message-Id: <200412140309.iBE393ah001459@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 Subject: PERFORCE change 67015 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2004 03:09:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=67015 Change 67015 by sam@sam_ebb on 2004/12/14 03:09:02 correct wme negotiation in station mode: o change ieee80211_parse_wmeparams to return <0 for an error, 0 for no change in the current parameters, and >0 for when parameters have been updated and need to be pushed to the driver o mark the node for QoS use if the wme params ie has no error (was only doing this if the negotiated parmateres required a push to the driver) Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_input.c#30 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_input.c#30 (text+ko) ==== @@ -1587,7 +1587,7 @@ IEEE80211_DISCARD_IE(ic, IEEE80211_MSG_ELEMID | IEEE80211_MSG_WME, wh, "WME", "too short, len %u", len); - return 0; + return -1; } qosinfo = frm[__offsetof(struct ieee80211_wme_param, param_qosInfo)]; qosinfo &= WME_QOSINFO_COUNT; @@ -1866,7 +1866,7 @@ /* XXX statistic */ } if (wme != NULL && - ieee80211_parse_wmeparams(ic, wme, wh)) + ieee80211_parse_wmeparams(ic, wme, wh) > 0) ieee80211_wme_updateparams(ic); /* NB: don't need the rest of this */ return; @@ -2354,7 +2354,8 @@ ni->ni_capinfo = capinfo; ni->ni_associd = associd; - if (wme != NULL && ieee80211_parse_wmeparams(ic, wme, wh)) { + if (wme != NULL && + ieee80211_parse_wmeparams(ic, wme, wh) >= 0) { ni->ni_flags |= IEEE80211_NODE_QOS; ieee80211_wme_updateparams(ic); } else