Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Aug 2005 16:14:51 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 81451 for review
Message-ID:  <200508041614.j74GEpDi096056@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=81451

Change 81451 by sam@sam_ebb on 2005/08/04 16:14:36

	report negotiated settings for ff and dturbo when associated

Affected files ...

.. //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#45 edit

Differences ...

==== //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#45 (text+ko) ====

@@ -578,6 +578,20 @@
 }
 
 /*
+ * Return the current ``state'' of an Atheros capbility.
+ * If associated in station mode report the negotiated
+ * setting. Otherwise report the current setting.
+ */
+static int
+getathcap(struct ieee80211com *ic, int cap)
+{
+	if (ic->ic_opmode == IEEE80211_M_STA && ic->ic_state == IEEE80211_S_RUN)
+		return IEEE80211_ATH_CAP(ic, ic->ic_bss, cap) != 0;
+	else
+		return (ic->ic_flags & cap) != 0;
+}
+
+/*
  * When building the kernel with -O2 on the i386 architecture, gcc
  * seems to want to inline this function into ieee80211_ioctl()
  * (which is the only routine that calls it). When this happens,
@@ -808,10 +822,10 @@
 		ireq->i_val = (ic->ic_flags & IEEE80211_F_PUREG) != 0;
 		break;
 	case IEEE80211_IOC_FF:
-		ireq->i_val = (ic->ic_flags & IEEE80211_F_FF) != 0;
+		ireq->i_val = getathcap(ic, IEEE80211_F_FF);
 		break;
 	case IEEE80211_IOC_TURBOP:
-		ireq->i_val = (ic->ic_flags & IEEE80211_F_TURBOP) != 0;
+		ireq->i_val = getathcap(ic, IEEE80211_F_TURBOP);
 		break;
 	case IEEE80211_IOC_BGSCAN:
 		ireq->i_val = (ic->ic_flags & IEEE80211_F_BGSCAN) != 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508041614.j74GEpDi096056>