2 * Copyright (c) 2004-2005 Atheros Communications Inc.
5 * This module implements frequently used wlan utilies
7 * $Id: //depot/sw/releases/olca2.0-GPL/host/wlan/src/wlan_utils.c#1 $
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation;
14 * Software distributed under the License is distributed on an "AS
15 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
16 * implied. See the License for the specific language governing
17 * rights and limitations under the License.
29 * converts ieee channel number to frequency
32 wlan_ieee2freq(int chan
)
37 if (chan
< 14) { /* 0-13 */
38 return (2407 + (chan
*5));
40 if (chan
< 27) { /* 15-26 */
41 return (2512 + ((chan
-15)*20));
43 return (5000 + (chan
*5));
47 * Converts MHz frequency to IEEE channel number.
50 wlan_freq2ieee(A_UINT16 freq
)
55 return (freq
- 2407) / 5;
57 return 15 + ((freq
- 2512) / 20);
58 return (freq
- 5000) / 5;
This page took 0.054646 seconds and 5 git commands to generate.