Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183641
b: refs/heads/master
c: 0695323
h: refs/heads/master
i:
  183639: 18d88c2
v: v3
  • Loading branch information
Lennert Buytenhek authored and John W. Linville committed Jan 12, 2010
1 parent cdbd6b1 commit 40d70ee
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 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: 42574ea2274ec0a2a9c58ab01be91b65e60a2291
refs/heads/master: 06953235f48c696b22c5ed45570680fb070f7277
31 changes: 25 additions & 6 deletions trunk/drivers/net/wireless/mwl8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -1666,11 +1666,14 @@ struct mwl8k_cmd_get_hw_spec_sta {
#define MWL8K_CAP_DELAY_BA 0x00003000
#define MWL8K_CAP_MIMO 0x00000200
#define MWL8K_CAP_40MHZ 0x00000100
#define MWL8K_CAP_BAND_MASK 0x00000007
#define MWL8K_CAP_5GHZ 0x00000004
#define MWL8K_CAP_2GHZ4 0x00000001

static void mwl8k_set_ht_caps(struct ieee80211_hw *hw, u32 cap)
static void
mwl8k_set_ht_caps(struct ieee80211_hw *hw,
struct ieee80211_supported_band *band, u32 cap)
{
struct mwl8k_priv *priv = hw->priv;
struct ieee80211_supported_band *band = &priv->band_24;
int rx_streams;
int tx_streams;

Expand Down Expand Up @@ -1716,6 +1719,24 @@ static void mwl8k_set_ht_caps(struct ieee80211_hw *hw, u32 cap)
}
}

static void
mwl8k_set_caps(struct ieee80211_hw *hw, u32 caps)
{
struct mwl8k_priv *priv = hw->priv;

if ((caps & MWL8K_CAP_2GHZ4) || !(caps & MWL8K_CAP_BAND_MASK)) {
mwl8k_setup_2ghz_band(hw);
if (caps & MWL8K_CAP_MIMO)
mwl8k_set_ht_caps(hw, &priv->band_24, caps);
}

if (caps & MWL8K_CAP_5GHZ) {
mwl8k_setup_5ghz_band(hw);
if (caps & MWL8K_CAP_MIMO)
mwl8k_set_ht_caps(hw, &priv->band_50, caps);
}
}

static int mwl8k_cmd_get_hw_spec_sta(struct ieee80211_hw *hw)
{
struct mwl8k_priv *priv = hw->priv;
Expand Down Expand Up @@ -1746,9 +1767,7 @@ static int mwl8k_cmd_get_hw_spec_sta(struct ieee80211_hw *hw)
priv->num_mcaddrs = le16_to_cpu(cmd->num_mcaddrs);
priv->fw_rev = le32_to_cpu(cmd->fw_rev);
priv->hw_rev = cmd->hw_rev;
mwl8k_setup_2ghz_band(hw);
if (cmd->caps & cpu_to_le32(MWL8K_CAP_MIMO))
mwl8k_set_ht_caps(hw, le32_to_cpu(cmd->caps));
mwl8k_set_caps(hw, le32_to_cpu(cmd->caps));
}

kfree(cmd);
Expand Down

0 comments on commit 40d70ee

Please sign in to comment.