PERFORCE change 81451 for review

Sam Leffler sam at FreeBSD.org
Thu Aug 4 16:14:53 GMT 2005


http://perforce.freebsd.org/chv.cgi?CH=81451

Change 81451 by sam at 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;


More information about the p4-projects mailing list