From owner-p4-projects@FreeBSD.ORG Wed Sep 3 15:58:12 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D8EEA1067190; Wed, 3 Sep 2008 15:58:11 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8409E1067131 for ; Wed, 3 Sep 2008 15:58:11 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6EC9D8FC1B for ; Wed, 3 Sep 2008 15:58:11 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m83FwBi2054212 for ; Wed, 3 Sep 2008 15:58:11 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m83FwBk5054210 for perforce@freebsd.org; Wed, 3 Sep 2008 15:58:11 GMT (envelope-from sam@freebsd.org) Date: Wed, 3 Sep 2008 15:58:11 GMT Message-Id: <200809031558.m83FwBk5054210@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 Cc: Subject: PERFORCE change 149121 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2008 15:58:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=149121 Change 149121 by sam@sam_ebb on 2008/09/03 15:57:56 switch to c99 initializations; fixes complaints by picky compilers Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_phy.c#9 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_phy.c#9 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_phy.c,v 1.2 2008/05/12 00:32:51 sam Exp $"); +__FBSDID("$FreeBSD$"); /* * IEEE 802.11 PHY-related support. @@ -59,127 +59,122 @@ #define CCK IEEE80211_T_CCK #define TURBO IEEE80211_T_TURBO #define PBCC (IEEE80211_T_HT+1) /* XXX */ +#define B(r) (0x80 | r) +#define Mb(x) (x*1000) static struct ieee80211_rate_table ieee80211_11b_table = { - 4, /* number of rates, XXX no PBCC */ - { 0 }, - { -/* short ctrl */ -/* Preamble dot11Rate Rate */ -/* 1 Mb */ { CCK, 1000, 0x00, (0x80| 2), 0 }, -/* 2 Mb */ { CCK, 2000, 0x04, (0x80| 4), 1 }, -/* 5.5 Mb */ { CCK, 5500, 0x04, (0x80|11), 1 }, -/* 11 Mb */ { CCK, 11000, 0x04, (0x80|22), 1 }, -/* 22 Mb */ { PBCC, 22000, 0x04, 44, 3 } - }, + .rateCount = 4, /* XXX no PBCC */ + .info = { +/* short ctrl */ +/* Preamble dot11Rate Rate */ + [0] = { .phy = CCK, 1000, 0x00, B(2), 0 },/* 1 Mb */ + [1] = { .phy = CCK, 2000, 0x04, B(4), 1 },/* 2 Mb */ + [2] = { .phy = CCK, 5500, 0x04, B(11), 1 },/* 5.5 Mb */ + [3] = { .phy = CCK, 11000, 0x04, B(22), 1 },/* 11 Mb */ + [4] = { .phy = PBCC, 22000, 0x04, 44, 3 } /* 22 Mb */ + }, }; - static struct ieee80211_rate_table ieee80211_11g_table = { - 12, /* number of rates */ - { 0 }, - { -/* short ctrl */ -/* Preamble dot11Rate Rate */ -/* 1 Mb */ { CCK, 1000, 0x00, (0x80| 2), 0 }, -/* 2 Mb */ { CCK, 2000, 0x04, (0x80| 4), 1 }, -/* 5.5 Mb */ { CCK, 5500, 0x04, (0x80|11), 2 }, -/* 11 Mb */ { CCK, 11000, 0x04, (0x80|22), 3 }, -/* 6 Mb */ { OFDM, 6000, 0x00, 12, 4 }, -/* 9 Mb */ { OFDM, 9000, 0x00, 18, 4 }, -/* 12 Mb */ { OFDM, 12000, 0x00, 24, 6 }, -/* 18 Mb */ { OFDM, 18000, 0x00, 36, 6 }, -/* 24 Mb */ { OFDM, 24000, 0x00, 48, 8 }, -/* 36 Mb */ { OFDM, 36000, 0x00, 72, 8 }, -/* 48 Mb */ { OFDM, 48000, 0x00, 96, 8 }, -/* 54 Mb */ { OFDM, 54000, 0x00, 108, 8 } - }, + .rateCount = 12, + .info = { +/* short ctrl */ +/* Preamble dot11Rate Rate */ + [0] = { .phy = CCK, 1000, 0x00, B(2), 0 }, + [1] = { .phy = CCK, 2000, 0x04, B(4), 1 }, + [2] = { .phy = CCK, 5500, 0x04, B(11), 2 }, + [3] = { .phy = CCK, 11000, 0x04, B(22), 3 }, + [4] = { .phy = OFDM, 6000, 0x00, 12, 4 }, + [5] = { .phy = OFDM, 9000, 0x00, 18, 4 }, + [6] = { .phy = OFDM, 12000, 0x00, 24, 6 }, + [7] = { .phy = OFDM, 18000, 0x00, 36, 6 }, + [8] = { .phy = OFDM, 24000, 0x00, 48, 8 }, + [9] = { .phy = OFDM, 36000, 0x00, 72, 8 }, + [10] = { .phy = OFDM, 48000, 0x00, 96, 8 }, + [11] = { .phy = OFDM, 54000, 0x00, 108, 8 } + }, }; static struct ieee80211_rate_table ieee80211_11a_table = { - 8, /* number of rates */ - { 0 }, - { -/* short ctrl */ -/* Preamble dot11Rate Rate */ -/* 6 Mb */ { OFDM, 6000, 0x00, (0x80|12), 0 }, -/* 9 Mb */ { OFDM, 9000, 0x00, 18, 0 }, -/* 12 Mb */ { OFDM, 12000, 0x00, (0x80|24), 2 }, -/* 18 Mb */ { OFDM, 18000, 0x00, 36, 2 }, -/* 24 Mb */ { OFDM, 24000, 0x00, (0x80|48), 4 }, -/* 36 Mb */ { OFDM, 36000, 0x00, 72, 4 }, -/* 48 Mb */ { OFDM, 48000, 0x00, 96, 4 }, -/* 54 Mb */ { OFDM, 54000, 0x00, 108, 4 } - }, + .rateCount = 8, + .info = { +/* short ctrl */ +/* Preamble dot11Rate Rate */ + [0] = { .phy = OFDM, 6000, 0x00, B(12), 0 }, + [1] = { .phy = OFDM, 9000, 0x00, 18, 0 }, + [2] = { .phy = OFDM, 12000, 0x00, B(24), 2 }, + [3] = { .phy = OFDM, 18000, 0x00, 36, 2 }, + [4] = { .phy = OFDM, 24000, 0x00, B(48), 4 }, + [5] = { .phy = OFDM, 36000, 0x00, 72, 4 }, + [6] = { .phy = OFDM, 48000, 0x00, 96, 4 }, + [7] = { .phy = OFDM, 54000, 0x00, 108, 4 } + }, }; static struct ieee80211_rate_table ieee80211_half_table = { - 8, /* number of rates */ - { 0 }, - { -/* short ctrl */ -/* Preamble dot11Rate Rate */ -/* 6 Mb */ { OFDM, 3000, 0x00, (0x80| 6), 0 }, -/* 9 Mb */ { OFDM, 4500, 0x00, 9, 0 }, -/* 12 Mb */ { OFDM, 6000, 0x00, (0x80|12), 2 }, -/* 18 Mb */ { OFDM, 9000, 0x00, 18, 2 }, -/* 24 Mb */ { OFDM, 12000, 0x00, (0x80|24), 4 }, -/* 36 Mb */ { OFDM, 18000, 0x00, 36, 4 }, -/* 48 Mb */ { OFDM, 24000, 0x00, 48, 4 }, -/* 54 Mb */ { OFDM, 27000, 0x00, 54, 4 } - }, + .rateCount = 8, + .info = { +/* short ctrl */ +/* Preamble dot11Rate Rate */ + [0] = { .phy = OFDM, 3000, 0x00, B(6), 0 }, + [1] = { .phy = OFDM, 4500, 0x00, 9, 0 }, + [2] = { .phy = OFDM, 6000, 0x00, B(12), 2 }, + [3] = { .phy = OFDM, 9000, 0x00, 18, 2 }, + [4] = { .phy = OFDM, 12000, 0x00, B(24), 4 }, + [5] = { .phy = OFDM, 18000, 0x00, 36, 4 }, + [6] = { .phy = OFDM, 24000, 0x00, 48, 4 }, + [7] = { .phy = OFDM, 27000, 0x00, 54, 4 } + }, }; static struct ieee80211_rate_table ieee80211_quarter_table = { - 8, /* number of rates */ - { 0 }, - { -/* short ctrl */ -/* Preamble dot11Rate Rate */ -/* 6 Mb */ { OFDM, 1500, 0x00, (0x80| 3), 0 }, -/* 9 Mb */ { OFDM, 2250, 0x00, 4, 0 }, -/* 12 Mb */ { OFDM, 3000, 0x00, (0x80| 6), 2 }, -/* 18 Mb */ { OFDM, 4500, 0x00, 9, 2 }, -/* 24 Mb */ { OFDM, 6000, 0x00, (0x80|12), 4 }, -/* 36 Mb */ { OFDM, 9000, 0x00, 18, 4 }, -/* 48 Mb */ { OFDM, 12000, 0x00, 24, 4 }, -/* 54 Mb */ { OFDM, 13500, 0x00, 27, 4 } - }, + .rateCount = 8, + .info = { +/* short ctrl */ +/* Preamble dot11Rate Rate */ + [0] = { .phy = OFDM, 1500, 0x00, B(3), 0 }, + [1] = { .phy = OFDM, 2250, 0x00, 4, 0 }, + [2] = { .phy = OFDM, 3000, 0x00, B(9), 2 }, + [3] = { .phy = OFDM, 4500, 0x00, 9, 2 }, + [4] = { .phy = OFDM, 6000, 0x00, B(12), 4 }, + [5] = { .phy = OFDM, 9000, 0x00, 18, 4 }, + [6] = { .phy = OFDM, 12000, 0x00, 24, 4 }, + [7] = { .phy = OFDM, 13500, 0x00, 27, 4 } + }, }; static struct ieee80211_rate_table ieee80211_turbog_table = { - 7, /* number of rates */ - { 0 }, - { -/* short ctrl */ -/* Preamble dot11Rate Rate */ -/* 6 Mb */ { TURBO, 6000, 0x00, (0x80|12), 0 }, -/* 12 Mb */ { TURBO, 12000, 0x00, (0x80|24), 1 }, -/* 18 Mb */ { TURBO, 18000, 0x00, 36, 1 }, -/* 24 Mb */ { TURBO, 24000, 0x00, (0x80|48), 3 }, -/* 36 Mb */ { TURBO, 36000, 0x00, 72, 3 }, -/* 48 Mb */ { TURBO, 48000, 0x00, 96, 3 }, -/* 54 Mb */ { TURBO, 54000, 0x00, 108, 3 } - }, + .rateCount = 7, + .info = { +/* short ctrl */ +/* Preamble dot11Rate Rate */ + [0] = { .phy = TURBO, 12000, 0x00, B(12), 0 }, + [1] = { .phy = TURBO, 24000, 0x00, B(24), 1 }, + [2] = { .phy = TURBO, 36000, 0x00, 36, 1 }, + [3] = { .phy = TURBO, 48000, 0x00, B(48), 3 }, + [4] = { .phy = TURBO, 72000, 0x00, 72, 3 }, + [5] = { .phy = TURBO, 96000, 0x00, 96, 3 }, + [6] = { .phy = TURBO, 108000, 0x00, 108, 3 } + }, }; static struct ieee80211_rate_table ieee80211_turboa_table = { - 8, /* number of rates */ - { 0 }, - { -/* short ctrl */ -/* Preamble dot11Rate Rate */ -/* 6 Mb */ { TURBO, 6000, 0x00, (0x80|12), 0 }, -/* 9 Mb */ { TURBO, 9000, 0x00, 18, 0 }, -/* 12 Mb */ { TURBO, 12000, 0x00, (0x80|24), 2 }, -/* 18 Mb */ { TURBO, 18000, 0x00, 36, 2 }, -/* 24 Mb */ { TURBO, 24000, 0x00, (0x80|48), 4 }, -/* 36 Mb */ { TURBO, 36000, 0x00, 72, 4 }, -/* 48 Mb */ { TURBO, 48000, 0x00, 96, 4 }, -/* 54 Mb */ { TURBO, 54000, 0x00, 108, 4 } - }, + .rateCount = 8, + .info = { +/* short ctrl */ +/* Preamble dot11Rate Rate */ + [0] = { .phy = TURBO, 12000, 0x00, B(12), 0 }, + [1] = { .phy = TURBO, 18000, 0x00, 18, 0 }, + [2] = { .phy = TURBO, 24000, 0x00, B(24), 2 }, + [3] = { .phy = TURBO, 36000, 0x00, 36, 2 }, + [4] = { .phy = TURBO, 48000, 0x00, B(48), 4 }, + [5] = { .phy = TURBO, 72000, 0x00, 72, 4 }, + [6] = { .phy = TURBO, 96000, 0x00, 96, 4 }, + [7] = { .phy = TURBO, 108000, 0x00, 108, 4 } + }, }; +#undef B #undef OFDM #undef CCK #undef TURBO