aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-12-06 01:54:40 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-06 01:54:40 -0500
commit730c30ec646bd252a9448a66ecd51d794853513f (patch)
treec0d413860f9d8bf37374f17cfabb4911143465d7 /drivers/net/wireless
parent726e07a8a38168266ac95d87736f9501a2d9e7b2 (diff)
parent0a0755c9fe47dc9f8271935909c66096e43efbfe (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/wireless/iwlwifi/iwl-core.c drivers/net/wireless/iwlwifi/iwl-sta.c
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2200.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.c26
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c2
4 files changed, 27 insertions, 6 deletions
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
index 48fa6df3a774..23728eb6110a 100644
--- a/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
@@ -3895,6 +3895,7 @@ static int ipw_disassociate(void *data)
3895 if (!(priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING))) 3895 if (!(priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING)))
3896 return 0; 3896 return 0;
3897 ipw_send_disassociate(data, 0); 3897 ipw_send_disassociate(data, 0);
3898 netif_carrier_off(priv->net_dev);
3898 return 1; 3899 return 1;
3899} 3900}
3900 3901
@@ -10155,6 +10156,9 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb,
10155 u16 remaining_bytes; 10156 u16 remaining_bytes;
10156 int fc; 10157 int fc;
10157 10158
10159 if (!(priv->status & STATUS_ASSOCIATED))
10160 goto drop;
10161
10158 hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); 10162 hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));
10159 switch (priv->ieee->iw_mode) { 10163 switch (priv->ieee->iw_mode) {
10160 case IW_MODE_ADHOC: 10164 case IW_MODE_ADHOC:
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 1b021ca74e25..d00dfe4edc3b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -238,7 +238,6 @@ int iwl_hw_nic_init(struct iwl_priv *priv)
238} 238}
239EXPORT_SYMBOL(iwl_hw_nic_init); 239EXPORT_SYMBOL(iwl_hw_nic_init);
240 240
241
242void iwl_reset_qos(struct iwl_priv *priv) 241void iwl_reset_qos(struct iwl_priv *priv)
243{ 242{
244 u16 cw_min = 15; 243 u16 cw_min = 15;
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index f86a8ca2aa3b..4a2479a1622a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -494,7 +494,7 @@ static int iwl_get_free_ucode_key_index(struct iwl_priv *priv)
494 if (!test_and_set_bit(i, &priv->ucode_key_table)) 494 if (!test_and_set_bit(i, &priv->ucode_key_table))
495 return i; 495 return i;
496 496
497 return -1; 497 return WEP_INVALID_OFFSET;
498} 498}
499 499
500int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, u8 send_if_empty) 500int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, u8 send_if_empty)
@@ -639,6 +639,9 @@ static int iwl_set_wep_dynamic_key_info(struct iwl_priv *priv,
639 /* else, we are overriding an existing key => no need to allocated room 639 /* else, we are overriding an existing key => no need to allocated room
640 * in uCode. */ 640 * in uCode. */
641 641
642 WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
643 "no space for new kew");
644
642 priv->stations[sta_id].sta.key.key_flags = key_flags; 645 priv->stations[sta_id].sta.key.key_flags = key_flags;
643 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK; 646 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
644 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; 647 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
@@ -656,6 +659,7 @@ static int iwl_set_ccmp_dynamic_key_info(struct iwl_priv *priv,
656{ 659{
657 unsigned long flags; 660 unsigned long flags;
658 __le16 key_flags = 0; 661 __le16 key_flags = 0;
662 int ret;
659 663
660 key_flags |= (STA_KEY_FLG_CCMP | STA_KEY_FLG_MAP_KEY_MSK); 664 key_flags |= (STA_KEY_FLG_CCMP | STA_KEY_FLG_MAP_KEY_MSK);
661 key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS); 665 key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS);
@@ -683,14 +687,18 @@ static int iwl_set_ccmp_dynamic_key_info(struct iwl_priv *priv,
683 /* else, we are overriding an existing key => no need to allocated room 687 /* else, we are overriding an existing key => no need to allocated room
684 * in uCode. */ 688 * in uCode. */
685 689
690 WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
691 "no space for new kew");
692
686 priv->stations[sta_id].sta.key.key_flags = key_flags; 693 priv->stations[sta_id].sta.key.key_flags = key_flags;
687 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK; 694 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
688 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; 695 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
689 696
697 ret = iwl_send_add_sta(priv, &priv->stations[sta_id].sta, CMD_ASYNC);
698
690 spin_unlock_irqrestore(&priv->sta_lock, flags); 699 spin_unlock_irqrestore(&priv->sta_lock, flags);
691 700
692 IWL_DEBUG_INFO("hwcrypto: modify ucode station key info\n"); 701 return ret;
693 return iwl_send_add_sta(priv, &priv->stations[sta_id].sta, CMD_ASYNC);
694} 702}
695 703
696static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv, 704static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv,
@@ -715,7 +723,10 @@ static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv,
715 /* else, we are overriding an existing key => no need to allocated room 723 /* else, we are overriding an existing key => no need to allocated room
716 * in uCode. */ 724 * in uCode. */
717 725
718 /* This copy is actually not needed: we get the key with each TX */ 726 WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET,
727 "no space for new kew");
728
729 /* This copy is acutally not needed: we get the key with each TX */
719 memcpy(priv->stations[sta_id].keyinfo.key, keyconf->key, 16); 730 memcpy(priv->stations[sta_id].keyinfo.key, keyconf->key, 16);
720 731
721 memcpy(priv->stations[sta_id].sta.key.key, keyconf->key, 16); 732 memcpy(priv->stations[sta_id].sta.key.key, keyconf->key, 16);
@@ -802,6 +813,13 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
802 return 0; 813 return 0;
803 } 814 }
804 815
816 if (priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET) {
817 IWL_WARNING("Removing wrong key %d 0x%x\n",
818 keyconf->keyidx, key_flags);
819 spin_unlock_irqrestore(&priv->sta_lock, flags);
820 return 0;
821 }
822
805 if (!test_and_clear_bit(priv->stations[sta_id].sta.key.key_offset, 823 if (!test_and_clear_bit(priv->stations[sta_id].sta.key.key_offset,
806 &priv->ucode_key_table)) 824 &priv->ucode_key_table))
807 IWL_ERROR("index %d not used in uCode key table.\n", 825 IWL_ERROR("index %d not used in uCode key table.\n",
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index 07513e48b8f2..9caa96a13586 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -615,7 +615,7 @@ static int filter_ack(struct ieee80211_hw *hw, struct ieee80211_hdr *rx_hdr,
615 struct ieee80211_hdr *tx_hdr; 615 struct ieee80211_hdr *tx_hdr;
616 616
617 tx_hdr = (struct ieee80211_hdr *)skb->data; 617 tx_hdr = (struct ieee80211_hdr *)skb->data;
618 if (likely(!compare_ether_addr(tx_hdr->addr2, rx_hdr->addr1))) 618 if (likely(!memcmp(tx_hdr->addr2, rx_hdr->addr1, ETH_ALEN)))
619 { 619 {
620 __skb_unlink(skb, q); 620 __skb_unlink(skb, q);
621 tx_status(hw, skb, stats->signal, 1); 621 tx_status(hw, skb, stats->signal, 1);