Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205958
b: refs/heads/master
c: e7d122b
h: refs/heads/master
v: v3
  • Loading branch information
Neil Munro authored and Greg Kroah-Hartman committed Jul 22, 2010
1 parent 4af68c4 commit 7a222f5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 28 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e3eb7cdd111eec56d201c4a2b20b743c746b6d99
refs/heads/master: e7d122b55d6031c748a9f264c1f6f28f948852a2
50 changes: 23 additions & 27 deletions trunk/drivers/staging/rt2860/chlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,35 +73,31 @@ struct rt_ch_freq_map {
extern struct rt_ch_freq_map CH_HZ_ID_MAP[];
extern int CH_HZ_ID_MAP_NUM;

#define MAP_CHANNEL_ID_TO_KHZ(_ch, _khz) \
do{ \
int _chIdx; \
for (_chIdx = 0; _chIdx < CH_HZ_ID_MAP_NUM; _chIdx++)\
{ \
if ((_ch) == CH_HZ_ID_MAP[_chIdx].channel) \
{ \
(_khz) = CH_HZ_ID_MAP[_chIdx].freqKHz * 1000; \
break; \
} \
} \
if (_chIdx == CH_HZ_ID_MAP_NUM) \
(_khz) = 2412000; \
}while(0)
#define MAP_CHANNEL_ID_TO_KHZ(_ch, _khz) \
do { \
int _chIdx; \
for (_chIdx = 0; _chIdx < CH_HZ_ID_MAP_NUM; _chIdx++) {\
if ((_ch) == CH_HZ_ID_MAP[_chIdx].channel) { \
(_khz) = CH_HZ_ID_MAP[_chIdx].freqKHz * 1000;\
break; \
} \
} \
if (_chIdx == CH_HZ_ID_MAP_NUM) \
(_khz) = 2412000; \
} while (0)

#define MAP_KHZ_TO_CHANNEL_ID(_khz, _ch) \
do{ \
int _chIdx; \
for (_chIdx = 0; _chIdx < CH_HZ_ID_MAP_NUM; _chIdx++)\
{ \
if ((_khz) == CH_HZ_ID_MAP[_chIdx].freqKHz) \
{ \
(_ch) = CH_HZ_ID_MAP[_chIdx].channel; \
break; \
} \
} \
if (_chIdx == CH_HZ_ID_MAP_NUM) \
(_ch) = 1; \
}while(0)
do { \
int _chIdx; \
for (_chIdx = 0; _chIdx < CH_HZ_ID_MAP_NUM; _chIdx++) {\
if ((_khz) == CH_HZ_ID_MAP[_chIdx].freqKHz) {\
(_ch) = CH_HZ_ID_MAP[_chIdx].channel; \
break; \
} \
} \
if (_chIdx == CH_HZ_ID_MAP_NUM) \
(_ch) = 1; \
} while (0)

void BuildChannelListEx(struct rt_rtmp_adapter *pAd);

Expand Down

0 comments on commit 7a222f5

Please sign in to comment.