use C99 style struct initializer instead of GCC specific one (from NetBSD).
authordamien <damien@openbsd.org>
Mon, 1 Sep 2008 20:00:19 +0000 (20:00 +0000)
committerdamien <damien@openbsd.org>
Mon, 1 Sep 2008 20:00:19 +0000 (20:00 +0000)
some whitespace cleanup too.

sys/net80211/ieee80211_rssadapt.c

index 1bb268b..f9b347c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ieee80211_rssadapt.c,v 1.6 2007/06/16 13:17:05 damien Exp $   */
+/*     $OpenBSD: ieee80211_rssadapt.c,v 1.7 2008/09/01 20:00:19 damien Exp $   */
 /*     $NetBSD: ieee80211_rssadapt.c,v 1.7 2004/05/25 04:33:59 dyoung Exp $    */
 
 /*-
@@ -73,13 +73,13 @@ int ieee80211_rssadapt_debug = 0;
 #define        RSSADAPT_PRINTF(X)
 #endif
 
-static struct ieee80211_rssadapt_expavgctl master_expavgctl = {
-       rc_decay_denom : 16,
-       rc_decay_old : 15,
-       rc_thresh_denom : 8,
-       rc_thresh_old : 4,
-       rc_avgrssi_denom : 8,
-       rc_avgrssi_old : 4
+static const struct ieee80211_rssadapt_expavgctl master_expavgctl = {
+       .rc_decay_denom         = 16,
+       .rc_decay_old           = 15,
+       .rc_thresh_denom        = 8,
+       .rc_thresh_old          = 4,
+       .rc_avgrssi_denom       = 8,
+       .rc_avgrssi_old         = 4
 };
 
 int
@@ -245,8 +245,8 @@ ieee80211_rssadapt_raise_rate(struct ieee80211com *ic,
                rate = (rs->rs_rates[id->id_rateidx + 1] & IEEE80211_RATE_VAL);
 
                RSSADAPT_PRINTF(("%s: threshold[%d, %d.%d] decay %d ",
-                   ic->ic_if.if_xname,
-                   IEEE80211_RSSADAPT_BKT0 << (IEEE80211_RSSADAPT_BKTPOWER* i),
+                   ic->ic_if.if_xname, IEEE80211_RSSADAPT_BKT0 <<
+                       (IEEE80211_RSSADAPT_BKTPOWER * i),
                    rate / 2, rate * 5 % 10, (*thrs)[id->id_rateidx + 1]));
                oldthr = (*thrs)[id->id_rateidx + 1];
                if ((*thrs)[id->id_rateidx] == 0)