ieee80211_phy.c (16fb0422) | ieee80211_phy.c (ed20d0e3) |
---|---|
1/*- 2 * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 275 unchanged lines hidden (view full) --- 284 else if (IEEE80211_IS_CHAN_A(c)) 285 rt = &ieee80211_11a_table; 286 else if (IEEE80211_IS_CHAN_ANYG(c)) 287 rt = &ieee80211_11g_table; 288 else if (IEEE80211_IS_CHAN_B(c)) 289 rt = &ieee80211_11b_table; 290 else { 291 /* NB: should not get here */ | 1/*- 2 * Copyright (c) 2007-2008 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 275 unchanged lines hidden (view full) --- 284 else if (IEEE80211_IS_CHAN_A(c)) 285 rt = &ieee80211_11a_table; 286 else if (IEEE80211_IS_CHAN_ANYG(c)) 287 rt = &ieee80211_11g_table; 288 else if (IEEE80211_IS_CHAN_B(c)) 289 rt = &ieee80211_11b_table; 290 else { 291 /* NB: should not get here */ |
292 panic("%s: no rate table for channel; freq %u flags 0x%x\n", | 292 panic("%s: no rate table for channel; freq %u flags 0x%x", |
293 __func__, c->ic_freq, c->ic_flags); 294 } 295 return rt; 296} 297 298/* 299 * Convert PLCP signal/rate field to 802.11 rate (.5Mbits/s) 300 * --- 147 unchanged lines hidden (view full) --- 448 KASSERT(bitsPerSymbol != 0, ("turbo bps")); 449 450 numBits = TURBO_PLCP_BITS + (frameLen << 3); 451 numSymbols = howmany(numBits, bitsPerSymbol); 452 txTime = TURBO_SIFS_TIME + TURBO_PREAMBLE_TIME 453 + (numSymbols * TURBO_SYMBOL_TIME); 454 break; 455 default: | 293 __func__, c->ic_freq, c->ic_flags); 294 } 295 return rt; 296} 297 298/* 299 * Convert PLCP signal/rate field to 802.11 rate (.5Mbits/s) 300 * --- 147 unchanged lines hidden (view full) --- 448 KASSERT(bitsPerSymbol != 0, ("turbo bps")); 449 450 numBits = TURBO_PLCP_BITS + (frameLen << 3); 451 numSymbols = howmany(numBits, bitsPerSymbol); 452 txTime = TURBO_SIFS_TIME + TURBO_PREAMBLE_TIME 453 + (numSymbols * TURBO_SYMBOL_TIME); 454 break; 455 default: |
456 panic("%s: unknown phy %u (rate %u)\n", __func__, | 456 panic("%s: unknown phy %u (rate %u)", __func__, |
457 rt->info[rix].phy, rate); 458 break; 459 } 460 return txTime; 461} | 457 rt->info[rix].phy, rate); 458 break; 459 } 460 return txTime; 461} |