Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21236
b: refs/heads/master
c: 07981aa
h: refs/heads/master
v: v3
  • Loading branch information
Pete Zaitcev authored and John W. Linville committed Feb 28, 2006
1 parent 19be0ef commit cde74d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: a23f460dd0c7c9c58b03494c7819e126b2c72383
refs/heads/master: 07981aa43f6aec32b875f360755ed3d14f9d5139
9 changes: 6 additions & 3 deletions trunk/net/ieee80211/ieee80211_geo.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ int ieee80211_is_valid_channel(struct ieee80211_device *ieee, u8 channel)

/* Driver needs to initialize the geography map before using
* these helper functions */
BUG_ON(ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0);
if (ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0)
return 0;

if (ieee->freq_band & IEEE80211_24GHZ_BAND)
for (i = 0; i < ieee->geo.bg_channels; i++)
Expand Down Expand Up @@ -78,7 +79,8 @@ int ieee80211_channel_to_index(struct ieee80211_device *ieee, u8 channel)

/* Driver needs to initialize the geography map before using
* these helper functions */
BUG_ON(ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0);
if (ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0)
return -1;

if (ieee->freq_band & IEEE80211_24GHZ_BAND)
for (i = 0; i < ieee->geo.bg_channels; i++)
Expand All @@ -99,7 +101,8 @@ u8 ieee80211_freq_to_channel(struct ieee80211_device * ieee, u32 freq)

/* Driver needs to initialize the geography map before using
* these helper functions */
BUG_ON(ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0);
if (ieee->geo.bg_channels == 0 && ieee->geo.a_channels == 0)
return 0;

freq /= 100000;

Expand Down

0 comments on commit cde74d8

Please sign in to comment.