diff options
author | John W. Linville <linville@tuxdriver.com> | 2013-04-10 14:09:54 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-04-10 14:09:54 -0400 |
commit | 655d8e2328a6ef6b6b514609a4c1e33508d3a1da (patch) | |
tree | 144b686bf3fd6512a55987da2d911f739646ce02 /drivers/net/wireless/mwl8k.c | |
parent | 6fe5468f452c0c40348ebd4e737758a842286ca8 (diff) | |
parent | ddc4db2e3d5393ede7a9222bb3b7522a603a4678 (diff) |
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Conflicts:
drivers/net/wireless/ath/carl9170/debug.c
drivers/net/wireless/ath/carl9170/main.c
net/mac80211/ieee80211_i.h
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 956c1084ebf1..ee1778cf270f 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -2852,7 +2852,9 @@ static int mwl8k_cmd_tx_power(struct ieee80211_hw *hw, | |||
2852 | struct ieee80211_conf *conf, | 2852 | struct ieee80211_conf *conf, |
2853 | unsigned short pwr) | 2853 | unsigned short pwr) |
2854 | { | 2854 | { |
2855 | struct ieee80211_channel *channel = conf->channel; | 2855 | struct ieee80211_channel *channel = conf->chandef.chan; |
2856 | enum nl80211_channel_type channel_type = | ||
2857 | cfg80211_get_chandef_type(&conf->chandef); | ||
2856 | struct mwl8k_cmd_tx_power *cmd; | 2858 | struct mwl8k_cmd_tx_power *cmd; |
2857 | int rc; | 2859 | int rc; |
2858 | int i; | 2860 | int i; |
@@ -2872,14 +2874,14 @@ static int mwl8k_cmd_tx_power(struct ieee80211_hw *hw, | |||
2872 | 2874 | ||
2873 | cmd->channel = cpu_to_le16(channel->hw_value); | 2875 | cmd->channel = cpu_to_le16(channel->hw_value); |
2874 | 2876 | ||
2875 | if (conf->channel_type == NL80211_CHAN_NO_HT || | 2877 | if (channel_type == NL80211_CHAN_NO_HT || |
2876 | conf->channel_type == NL80211_CHAN_HT20) { | 2878 | channel_type == NL80211_CHAN_HT20) { |
2877 | cmd->bw = cpu_to_le16(0x2); | 2879 | cmd->bw = cpu_to_le16(0x2); |
2878 | } else { | 2880 | } else { |
2879 | cmd->bw = cpu_to_le16(0x4); | 2881 | cmd->bw = cpu_to_le16(0x4); |
2880 | if (conf->channel_type == NL80211_CHAN_HT40MINUS) | 2882 | if (channel_type == NL80211_CHAN_HT40MINUS) |
2881 | cmd->sub_ch = cpu_to_le16(0x3); | 2883 | cmd->sub_ch = cpu_to_le16(0x3); |
2882 | else if (conf->channel_type == NL80211_CHAN_HT40PLUS) | 2884 | else if (channel_type == NL80211_CHAN_HT40PLUS) |
2883 | cmd->sub_ch = cpu_to_le16(0x1); | 2885 | cmd->sub_ch = cpu_to_le16(0x1); |
2884 | } | 2886 | } |
2885 | 2887 | ||
@@ -3023,7 +3025,9 @@ struct mwl8k_cmd_set_rf_channel { | |||
3023 | static int mwl8k_cmd_set_rf_channel(struct ieee80211_hw *hw, | 3025 | static int mwl8k_cmd_set_rf_channel(struct ieee80211_hw *hw, |
3024 | struct ieee80211_conf *conf) | 3026 | struct ieee80211_conf *conf) |
3025 | { | 3027 | { |
3026 | struct ieee80211_channel *channel = conf->channel; | 3028 | struct ieee80211_channel *channel = conf->chandef.chan; |
3029 | enum nl80211_channel_type channel_type = | ||
3030 | cfg80211_get_chandef_type(&conf->chandef); | ||
3027 | struct mwl8k_cmd_set_rf_channel *cmd; | 3031 | struct mwl8k_cmd_set_rf_channel *cmd; |
3028 | int rc; | 3032 | int rc; |
3029 | 3033 | ||
@@ -3041,12 +3045,12 @@ static int mwl8k_cmd_set_rf_channel(struct ieee80211_hw *hw, | |||
3041 | else if (channel->band == IEEE80211_BAND_5GHZ) | 3045 | else if (channel->band == IEEE80211_BAND_5GHZ) |
3042 | cmd->channel_flags |= cpu_to_le32(0x00000004); | 3046 | cmd->channel_flags |= cpu_to_le32(0x00000004); |
3043 | 3047 | ||
3044 | if (conf->channel_type == NL80211_CHAN_NO_HT || | 3048 | if (channel_type == NL80211_CHAN_NO_HT || |
3045 | conf->channel_type == NL80211_CHAN_HT20) | 3049 | channel_type == NL80211_CHAN_HT20) |
3046 | cmd->channel_flags |= cpu_to_le32(0x00000080); | 3050 | cmd->channel_flags |= cpu_to_le32(0x00000080); |
3047 | else if (conf->channel_type == NL80211_CHAN_HT40MINUS) | 3051 | else if (channel_type == NL80211_CHAN_HT40MINUS) |
3048 | cmd->channel_flags |= cpu_to_le32(0x000001900); | 3052 | cmd->channel_flags |= cpu_to_le32(0x000001900); |
3049 | else if (conf->channel_type == NL80211_CHAN_HT40PLUS) | 3053 | else if (channel_type == NL80211_CHAN_HT40PLUS) |
3050 | cmd->channel_flags |= cpu_to_le32(0x000000900); | 3054 | cmd->channel_flags |= cpu_to_le32(0x000000900); |
3051 | 3055 | ||
3052 | rc = mwl8k_post_cmd(hw, &cmd->header); | 3056 | rc = mwl8k_post_cmd(hw, &cmd->header); |
@@ -3965,7 +3969,7 @@ static int mwl8k_cmd_set_new_stn_add(struct ieee80211_hw *hw, | |||
3965 | memcpy(cmd->mac_addr, sta->addr, ETH_ALEN); | 3969 | memcpy(cmd->mac_addr, sta->addr, ETH_ALEN); |
3966 | cmd->stn_id = cpu_to_le16(sta->aid); | 3970 | cmd->stn_id = cpu_to_le16(sta->aid); |
3967 | cmd->action = cpu_to_le16(MWL8K_STA_ACTION_ADD); | 3971 | cmd->action = cpu_to_le16(MWL8K_STA_ACTION_ADD); |
3968 | if (hw->conf.channel->band == IEEE80211_BAND_2GHZ) | 3972 | if (hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ) |
3969 | rates = sta->supp_rates[IEEE80211_BAND_2GHZ]; | 3973 | rates = sta->supp_rates[IEEE80211_BAND_2GHZ]; |
3970 | else | 3974 | else |
3971 | rates = sta->supp_rates[IEEE80211_BAND_5GHZ] << 5; | 3975 | rates = sta->supp_rates[IEEE80211_BAND_5GHZ] << 5; |
@@ -4400,7 +4404,7 @@ static int mwl8k_cmd_update_stadb_add(struct ieee80211_hw *hw, | |||
4400 | p->ht_caps = cpu_to_le16(sta->ht_cap.cap); | 4404 | p->ht_caps = cpu_to_le16(sta->ht_cap.cap); |
4401 | p->extended_ht_caps = (sta->ht_cap.ampdu_factor & 3) | | 4405 | p->extended_ht_caps = (sta->ht_cap.ampdu_factor & 3) | |
4402 | ((sta->ht_cap.ampdu_density & 7) << 2); | 4406 | ((sta->ht_cap.ampdu_density & 7) << 2); |
4403 | if (hw->conf.channel->band == IEEE80211_BAND_2GHZ) | 4407 | if (hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ) |
4404 | rates = sta->supp_rates[IEEE80211_BAND_2GHZ]; | 4408 | rates = sta->supp_rates[IEEE80211_BAND_2GHZ]; |
4405 | else | 4409 | else |
4406 | rates = sta->supp_rates[IEEE80211_BAND_5GHZ] << 5; | 4410 | rates = sta->supp_rates[IEEE80211_BAND_5GHZ] << 5; |
@@ -4881,7 +4885,7 @@ mwl8k_bss_info_changed_sta(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
4881 | goto out; | 4885 | goto out; |
4882 | } | 4886 | } |
4883 | 4887 | ||
4884 | if (hw->conf.channel->band == IEEE80211_BAND_2GHZ) { | 4888 | if (hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ) { |
4885 | ap_legacy_rates = ap->supp_rates[IEEE80211_BAND_2GHZ]; | 4889 | ap_legacy_rates = ap->supp_rates[IEEE80211_BAND_2GHZ]; |
4886 | } else { | 4890 | } else { |
4887 | ap_legacy_rates = | 4891 | ap_legacy_rates = |
@@ -4913,7 +4917,7 @@ mwl8k_bss_info_changed_sta(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
4913 | if (idx) | 4917 | if (idx) |
4914 | idx--; | 4918 | idx--; |
4915 | 4919 | ||
4916 | if (hw->conf.channel->band == IEEE80211_BAND_2GHZ) | 4920 | if (hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ) |
4917 | rate = mwl8k_rates_24[idx].hw_value; | 4921 | rate = mwl8k_rates_24[idx].hw_value; |
4918 | else | 4922 | else |
4919 | rate = mwl8k_rates_50[idx].hw_value; | 4923 | rate = mwl8k_rates_50[idx].hw_value; |
@@ -4986,7 +4990,7 @@ mwl8k_bss_info_changed_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
4986 | if (idx) | 4990 | if (idx) |
4987 | idx--; | 4991 | idx--; |
4988 | 4992 | ||
4989 | if (hw->conf.channel->band == IEEE80211_BAND_2GHZ) | 4993 | if (hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ) |
4990 | rate = mwl8k_rates_24[idx].hw_value; | 4994 | rate = mwl8k_rates_24[idx].hw_value; |
4991 | else | 4995 | else |
4992 | rate = mwl8k_rates_50[idx].hw_value; | 4996 | rate = mwl8k_rates_50[idx].hw_value; |
@@ -5259,7 +5263,7 @@ static int mwl8k_get_survey(struct ieee80211_hw *hw, int idx, | |||
5259 | if (idx != 0) | 5263 | if (idx != 0) |
5260 | return -ENOENT; | 5264 | return -ENOENT; |
5261 | 5265 | ||
5262 | survey->channel = conf->channel; | 5266 | survey->channel = conf->chandef.chan; |
5263 | survey->filled = SURVEY_INFO_NOISE_DBM; | 5267 | survey->filled = SURVEY_INFO_NOISE_DBM; |
5264 | survey->noise = priv->noise; | 5268 | survey->noise = priv->noise; |
5265 | 5269 | ||