Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102938
b: refs/heads/master
c: 398f9e7
h: refs/heads/master
v: v3
  • Loading branch information
Assaf Krauss authored and John W. Linville committed Jun 14, 2008
1 parent a6e189a commit 9b843dd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 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: c46fbefa32c3c314884d3d3be27d0e1839de2c24
refs/heads/master: 398f9e765f57c0dca0f6fb13c28ad929c09c68ef
25 changes: 11 additions & 14 deletions trunk/drivers/net/wireless/iwlwifi/iwl4965-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,22 +1176,11 @@ static void iwl4965_connection_init_rx_config(struct iwl_priv *priv)

static int iwl4965_set_mode(struct iwl_priv *priv, int mode)
{
if (mode == IEEE80211_IF_TYPE_IBSS) {
const struct iwl_channel_info *ch_info;

ch_info = iwl_get_channel_info(priv,
priv->band,
le16_to_cpu(priv->staging_rxon.channel));

if (!ch_info || !is_channel_ibss(ch_info)) {
IWL_ERROR("channel %d not IBSS channel\n",
le16_to_cpu(priv->staging_rxon.channel));
return -EINVAL;
}
}

priv->iw_mode = mode;

/* init channel/phymode to values given at driver init */
iwl_set_rxon_channel(priv, IEEE80211_BAND_2GHZ, 6);

iwl4965_connection_init_rx_config(priv);
memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN);

Expand Down Expand Up @@ -3892,6 +3881,14 @@ static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co
goto out;
}

if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS &&
!is_channel_ibss(ch_info)) {
IWL_ERROR("channel %d in band %d not IBSS channel\n",
conf->channel->hw_value, conf->channel->band);
ret = -EINVAL;
goto out;
}

spin_lock_irqsave(&priv->lock, flags);

/* if we are switching from ht to 2.4 clear flags
Expand Down

0 comments on commit 9b843dd

Please sign in to comment.