--- old/net80211/ieee80211_wireless.c	2005-11-09 10:23:36.000000000 -0300
+++ new/net80211/ieee80211_wireless.c	2005-11-08 15:36:21.000000000 -0300
@@ -2792,6 +2792,18 @@
 			ieee80211_node_unauthorize(ni);
 		ieee80211_free_node(ni);
 		break;
+        case IEEE80211_MLME_CLEAR_STATS:
+                if (vap->iv_opmode != IEEE80211_M_HOSTAP)
+                        return -EINVAL;
+                ni = ieee80211_find_node(&ic->ic_sta, mlme->im_macaddr);
+                if (ni == NULL) {
+                        return -ENOENT;
+                }
+                /* clear statistics */
+                memset(&ni->ni_stats, 0, sizeof(struct ieee80211_nodestats));
+                ieee80211_free_node(ni);
+                break;
+
 	default:
 		return -EINVAL;
 	}
--- old/net80211/ieee80211_ioctl.h	2005-11-09 10:23:36.000000000 -0300
+++ new/net80211/ieee80211_ioctl.h	2005-11-08 19:34:48.000000000 -0300
@@ -41,6 +41,10 @@
 #include <net80211/ieee80211.h>
 #include <net80211/ieee80211_crypto.h>
 
+#ifndef __KERNEL__
+#include <net/if.h>
+#endif
+
 /*
  * Per/node (station) statistics available when operating as an AP.
  */
@@ -238,6 +242,7 @@
 #define	IEEE80211_MLME_DEAUTH		3	/* deauthenticate station */
 #define	IEEE80211_MLME_AUTHORIZE	4	/* authorize station */
 #define	IEEE80211_MLME_UNAUTHORIZE	5	/* unauthorize station */
+#define IEEE80211_MLME_CLEAR_STATS	6	/* clear station statistic */
 	u_int16_t	im_reason;	/* 802.11 reason code */
 	u_int8_t	im_macaddr[IEEE80211_ADDR_LEN];
 };

