diff options
author | David S. Miller <davem@davemloft.net> | 2009-01-29 18:27:47 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-29 18:27:47 -0500 |
commit | ae9e47e9e864bc5f0a7a7e71dc3f287196b3626b (patch) | |
tree | 08aac6bd0b77fb8a3936f120e87574cb32459d2d | |
parent | a4e6db07984529847c6ad8bc616485e721dcb809 (diff) | |
parent | be0093705c3ce98d73cac0ca8f93ea105cdf4e9c (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
-rw-r--r-- | MAINTAINERS | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath5k/base.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rtl818x/rtl8187_rtl8225.c | 10 | ||||
-rw-r--r-- | net/wireless/reg.c | 32 |
5 files changed, 41 insertions, 17 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index d992d407197b..474ec0c53272 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -2836,8 +2836,6 @@ S: Maintained | |||
2836 | MAC80211 | 2836 | MAC80211 |
2837 | P: Johannes Berg | 2837 | P: Johannes Berg |
2838 | M: johannes@sipsolutions.net | 2838 | M: johannes@sipsolutions.net |
2839 | P: Michael Wu | ||
2840 | M: flamingice@sourmilk.net | ||
2841 | L: linux-wireless@vger.kernel.org | 2839 | L: linux-wireless@vger.kernel.org |
2842 | W: http://linuxwireless.org/ | 2840 | W: http://linuxwireless.org/ |
2843 | T: git kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6.git | 2841 | T: git kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6.git |
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index 8ef87356e083..a533ed60bb4d 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -1028,6 +1028,8 @@ ath5k_setup_bands(struct ieee80211_hw *hw) | |||
1028 | * it's done by reseting the chip. To accomplish this we must | 1028 | * it's done by reseting the chip. To accomplish this we must |
1029 | * first cleanup any pending DMA, then restart stuff after a la | 1029 | * first cleanup any pending DMA, then restart stuff after a la |
1030 | * ath5k_init. | 1030 | * ath5k_init. |
1031 | * | ||
1032 | * Called with sc->lock. | ||
1031 | */ | 1033 | */ |
1032 | static int | 1034 | static int |
1033 | ath5k_chan_set(struct ath5k_softc *sc, struct ieee80211_channel *chan) | 1035 | ath5k_chan_set(struct ath5k_softc *sc, struct ieee80211_channel *chan) |
@@ -2814,11 +2816,17 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed) | |||
2814 | { | 2816 | { |
2815 | struct ath5k_softc *sc = hw->priv; | 2817 | struct ath5k_softc *sc = hw->priv; |
2816 | struct ieee80211_conf *conf = &hw->conf; | 2818 | struct ieee80211_conf *conf = &hw->conf; |
2819 | int ret; | ||
2820 | |||
2821 | mutex_lock(&sc->lock); | ||
2817 | 2822 | ||
2818 | sc->bintval = conf->beacon_int; | 2823 | sc->bintval = conf->beacon_int; |
2819 | sc->power_level = conf->power_level; | 2824 | sc->power_level = conf->power_level; |
2820 | 2825 | ||
2821 | return ath5k_chan_set(sc, conf->channel); | 2826 | ret = ath5k_chan_set(sc, conf->channel); |
2827 | |||
2828 | mutex_unlock(&sc->lock); | ||
2829 | return ret; | ||
2822 | } | 2830 | } |
2823 | 2831 | ||
2824 | static int | 2832 | static int |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 0dc8eed16404..b35c8813bef4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1719,6 +1719,10 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1719 | priv->ucode_data_backup.len = data_size; | 1719 | priv->ucode_data_backup.len = data_size; |
1720 | iwl_alloc_fw_desc(priv->pci_dev, &priv->ucode_data_backup); | 1720 | iwl_alloc_fw_desc(priv->pci_dev, &priv->ucode_data_backup); |
1721 | 1721 | ||
1722 | if (!priv->ucode_code.v_addr || !priv->ucode_data.v_addr || | ||
1723 | !priv->ucode_data_backup.v_addr) | ||
1724 | goto err_pci_alloc; | ||
1725 | |||
1722 | /* Initialization instructions and data */ | 1726 | /* Initialization instructions and data */ |
1723 | if (init_size && init_data_size) { | 1727 | if (init_size && init_data_size) { |
1724 | priv->ucode_init.len = init_size; | 1728 | priv->ucode_init.len = init_size; |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c b/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c index 4e75e8e7fa90..78df281b297a 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c +++ b/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c | |||
@@ -285,7 +285,10 @@ static void rtl8225_rf_set_tx_power(struct ieee80211_hw *dev, int channel) | |||
285 | ofdm_power = priv->channels[channel - 1].hw_value >> 4; | 285 | ofdm_power = priv->channels[channel - 1].hw_value >> 4; |
286 | 286 | ||
287 | cck_power = min(cck_power, (u8)11); | 287 | cck_power = min(cck_power, (u8)11); |
288 | ofdm_power = min(ofdm_power, (u8)35); | 288 | if (ofdm_power > (u8)15) |
289 | ofdm_power = 25; | ||
290 | else | ||
291 | ofdm_power += 10; | ||
289 | 292 | ||
290 | rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK, | 293 | rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK, |
291 | rtl8225_tx_gain_cck_ofdm[cck_power / 6] >> 1); | 294 | rtl8225_tx_gain_cck_ofdm[cck_power / 6] >> 1); |
@@ -536,7 +539,10 @@ static void rtl8225z2_rf_set_tx_power(struct ieee80211_hw *dev, int channel) | |||
536 | cck_power += priv->txpwr_base & 0xF; | 539 | cck_power += priv->txpwr_base & 0xF; |
537 | cck_power = min(cck_power, (u8)35); | 540 | cck_power = min(cck_power, (u8)35); |
538 | 541 | ||
539 | ofdm_power = min(ofdm_power, (u8)15); | 542 | if (ofdm_power > (u8)15) |
543 | ofdm_power = 25; | ||
544 | else | ||
545 | ofdm_power += 10; | ||
540 | ofdm_power += priv->txpwr_base >> 4; | 546 | ofdm_power += priv->txpwr_base >> 4; |
541 | ofdm_power = min(ofdm_power, (u8)35); | 547 | ofdm_power = min(ofdm_power, (u8)35); |
542 | 548 | ||
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index bc494cef2102..85c9034c59b2 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -498,6 +498,7 @@ static struct ieee80211_regdomain *country_ie_2_rd( | |||
498 | * calculate the number of reg rules we will need. We will need one | 498 | * calculate the number of reg rules we will need. We will need one |
499 | * for each channel subband */ | 499 | * for each channel subband */ |
500 | while (country_ie_len >= 3) { | 500 | while (country_ie_len >= 3) { |
501 | int end_channel = 0; | ||
501 | struct ieee80211_country_ie_triplet *triplet = | 502 | struct ieee80211_country_ie_triplet *triplet = |
502 | (struct ieee80211_country_ie_triplet *) country_ie; | 503 | (struct ieee80211_country_ie_triplet *) country_ie; |
503 | int cur_sub_max_channel = 0, cur_channel = 0; | 504 | int cur_sub_max_channel = 0, cur_channel = 0; |
@@ -509,9 +510,25 @@ static struct ieee80211_regdomain *country_ie_2_rd( | |||
509 | continue; | 510 | continue; |
510 | } | 511 | } |
511 | 512 | ||
513 | /* 2 GHz */ | ||
514 | if (triplet->chans.first_channel <= 14) | ||
515 | end_channel = triplet->chans.first_channel + | ||
516 | triplet->chans.num_channels; | ||
517 | else | ||
518 | /* | ||
519 | * 5 GHz -- For example in country IEs if the first | ||
520 | * channel given is 36 and the number of channels is 4 | ||
521 | * then the individual channel numbers defined for the | ||
522 | * 5 GHz PHY by these parameters are: 36, 40, 44, and 48 | ||
523 | * and not 36, 37, 38, 39. | ||
524 | * | ||
525 | * See: http://tinyurl.com/11d-clarification | ||
526 | */ | ||
527 | end_channel = triplet->chans.first_channel + | ||
528 | (4 * (triplet->chans.num_channels - 1)); | ||
529 | |||
512 | cur_channel = triplet->chans.first_channel; | 530 | cur_channel = triplet->chans.first_channel; |
513 | cur_sub_max_channel = ieee80211_channel_to_frequency( | 531 | cur_sub_max_channel = end_channel; |
514 | cur_channel + triplet->chans.num_channels); | ||
515 | 532 | ||
516 | /* Basic sanity check */ | 533 | /* Basic sanity check */ |
517 | if (cur_sub_max_channel < cur_channel) | 534 | if (cur_sub_max_channel < cur_channel) |
@@ -590,15 +607,6 @@ static struct ieee80211_regdomain *country_ie_2_rd( | |||
590 | end_channel = triplet->chans.first_channel + | 607 | end_channel = triplet->chans.first_channel + |
591 | triplet->chans.num_channels; | 608 | triplet->chans.num_channels; |
592 | else | 609 | else |
593 | /* | ||
594 | * 5 GHz -- For example in country IEs if the first | ||
595 | * channel given is 36 and the number of channels is 4 | ||
596 | * then the individual channel numbers defined for the | ||
597 | * 5 GHz PHY by these parameters are: 36, 40, 44, and 48 | ||
598 | * and not 36, 37, 38, 39. | ||
599 | * | ||
600 | * See: http://tinyurl.com/11d-clarification | ||
601 | */ | ||
602 | end_channel = triplet->chans.first_channel + | 610 | end_channel = triplet->chans.first_channel + |
603 | (4 * (triplet->chans.num_channels - 1)); | 611 | (4 * (triplet->chans.num_channels - 1)); |
604 | 612 | ||
@@ -1276,7 +1284,7 @@ static void reg_country_ie_process_debug( | |||
1276 | if (intersected_rd) { | 1284 | if (intersected_rd) { |
1277 | printk(KERN_DEBUG "cfg80211: We intersect both of these " | 1285 | printk(KERN_DEBUG "cfg80211: We intersect both of these " |
1278 | "and get:\n"); | 1286 | "and get:\n"); |
1279 | print_regdomain_info(rd); | 1287 | print_regdomain_info(intersected_rd); |
1280 | return; | 1288 | return; |
1281 | } | 1289 | } |
1282 | printk(KERN_DEBUG "cfg80211: Intersection between both failed\n"); | 1290 | printk(KERN_DEBUG "cfg80211: Intersection between both failed\n"); |