Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32085
b: refs/heads/master
c: fc8fd34
h: refs/heads/master
i:
  32083: 0418144
v: v3
  • Loading branch information
Larry Finger authored and Jeff Garzik committed Jul 5, 2006
1 parent 4856c39 commit 1dbb21a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 31 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: 60d48f1e23c25d09dbe7025ff179b808d72704b3
refs/heads/master: fc8fd3400b716615933a47be453839d190b235bd
24 changes: 0 additions & 24 deletions trunk/drivers/net/wireless/bcm43xx/bcm43xx_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,30 +112,6 @@ int bcm43xx_channel_to_freq(struct bcm43xx_private *bcm,
return bcm43xx_channel_to_freq_bg(channel);
}

/* Lightweight function to check if a channel number is valid.
* Note that this does _NOT_ check for geographical restrictions!
*/
static inline
int bcm43xx_is_valid_channel_a(u8 channel)
{
return (channel >= IEEE80211_52GHZ_MIN_CHANNEL
&& channel <= IEEE80211_52GHZ_MAX_CHANNEL);
}
static inline
int bcm43xx_is_valid_channel_bg(u8 channel)
{
return (channel >= IEEE80211_24GHZ_MIN_CHANNEL
&& channel <= IEEE80211_24GHZ_MAX_CHANNEL);
}
static inline
int bcm43xx_is_valid_channel(struct bcm43xx_private *bcm,
u8 channel)
{
if (bcm43xx_current_phy(bcm)->type == BCM43xx_PHYTYPE_A)
return bcm43xx_is_valid_channel_a(channel);
return bcm43xx_is_valid_channel_bg(channel);
}

void bcm43xx_tsf_read(struct bcm43xx_private *bcm, u64 *tsf);
void bcm43xx_tsf_write(struct bcm43xx_private *bcm, u64 tsf);

Expand Down
7 changes: 2 additions & 5 deletions trunk/drivers/net/wireless/bcm43xx/bcm43xx_radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1594,11 +1594,11 @@ int bcm43xx_radio_selectchannel(struct bcm43xx_private *bcm,
u16 r8, tmp;
u16 freq;

if (!ieee80211_is_valid_channel(bcm->ieee, channel))
return -EINVAL;
if ((radio->manufact == 0x17F) &&
(radio->version == 0x2060) &&
(radio->revision == 1)) {
if (channel > 200)
return -EINVAL;
freq = channel2freq_a(channel);

r8 = bcm43xx_radio_read16(bcm, 0x0008);
Expand Down Expand Up @@ -1651,9 +1651,6 @@ int bcm43xx_radio_selectchannel(struct bcm43xx_private *bcm,
TODO(); //TODO: TSSI2dbm workaround
bcm43xx_phy_xmitpower(bcm);//FIXME correct?
} else {
if ((channel < 1) || (channel > 14))
return -EINVAL;

if (synthetic_pu_workaround)
bcm43xx_synth_pu_workaround(bcm, channel);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/bcm43xx/bcm43xx_wx.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static int bcm43xx_wx_set_channelfreq(struct net_device *net_dev,
channel = bcm43xx_freq_to_channel(bcm, data->freq.m);
freq = data->freq.m;
}
if (!bcm43xx_is_valid_channel(bcm, channel))
if (!ieee80211_is_valid_channel(bcm->ieee, channel))
goto out_unlock;
if (bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED) {
//ieee80211softmac_disassoc(softmac, $REASON);
Expand Down

0 comments on commit 1dbb21a

Please sign in to comment.