Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183557
b: refs/heads/master
c: 610677d
h: refs/heads/master
i:
  183555: 0cacd53
v: v3
  • Loading branch information
Lennert Buytenhek authored and John W. Linville committed Jan 5, 2010
1 parent da7f380 commit 1ae634e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 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: 9e1b17ead81e72d3db37b4cf15cde1f613603822
refs/heads/master: 610677d2f0415570a7590790e8be376a946cd08b
18 changes: 13 additions & 5 deletions trunk/drivers/net/wireless/mwl8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -2030,8 +2030,9 @@ struct mwl8k_cmd_set_rf_channel {
} __attribute__((packed));

static int mwl8k_cmd_set_rf_channel(struct ieee80211_hw *hw,
struct ieee80211_channel *channel)
struct ieee80211_conf *conf)
{
struct ieee80211_channel *channel = conf->channel;
struct mwl8k_cmd_set_rf_channel *cmd;
int rc;

Expand All @@ -2043,10 +2044,17 @@ static int mwl8k_cmd_set_rf_channel(struct ieee80211_hw *hw,
cmd->header.length = cpu_to_le16(sizeof(*cmd));
cmd->action = cpu_to_le16(MWL8K_CMD_SET);
cmd->current_channel = channel->hw_value;

if (channel->band == IEEE80211_BAND_2GHZ)
cmd->channel_flags = cpu_to_le32(0x00000081);
else
cmd->channel_flags = cpu_to_le32(0x00000000);
cmd->channel_flags |= cpu_to_le32(0x00000001);

if (conf->channel_type == NL80211_CHAN_NO_HT ||
conf->channel_type == NL80211_CHAN_HT20)
cmd->channel_flags |= cpu_to_le32(0x00000080);
else if (conf->channel_type == NL80211_CHAN_HT40MINUS)
cmd->channel_flags |= cpu_to_le32(0x000001900);
else if (conf->channel_type == NL80211_CHAN_HT40PLUS)
cmd->channel_flags |= cpu_to_le32(0x000000900);

rc = mwl8k_post_cmd(hw, &cmd->header);
kfree(cmd);
Expand Down Expand Up @@ -2926,7 +2934,7 @@ static int mwl8k_config(struct ieee80211_hw *hw, u32 changed)
if (rc)
goto out;

rc = mwl8k_cmd_set_rf_channel(hw, conf->channel);
rc = mwl8k_cmd_set_rf_channel(hw, conf);
if (rc)
goto out;

Expand Down

0 comments on commit 1ae634e

Please sign in to comment.