Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

+30 -5
+4
drivers/net/wireless/ipw2200.c
··· 3897 if (!(priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING))) 3898 return 0; 3899 ipw_send_disassociate(data, 0); 3900 return 1; 3901 } 3902 ··· 10190 u8 id, hdr_len, unicast; 10191 u16 remaining_bytes; 10192 int fc; 10193 10194 hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); 10195 switch (priv->ieee->iw_mode) {
··· 3897 if (!(priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING))) 3898 return 0; 3899 ipw_send_disassociate(data, 0); 3900 + netif_carrier_off(priv->net_dev); 3901 return 1; 3902 } 3903 ··· 10189 u8 id, hdr_len, unicast; 10190 u16 remaining_bytes; 10191 int fc; 10192 + 10193 + if (!(priv->status & STATUS_ASSOCIATED)) 10194 + goto drop; 10195 10196 hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); 10197 switch (priv->ieee->iw_mode) {
+3
drivers/net/wireless/iwlwifi/iwl-core.c
··· 290 priv->num_stations = 0; 291 memset(priv->stations, 0, sizeof(priv->stations)); 292 293 spin_unlock_irqrestore(&priv->sta_lock, flags); 294 } 295 EXPORT_SYMBOL(iwl_clear_stations_table);
··· 290 priv->num_stations = 0; 291 memset(priv->stations, 0, sizeof(priv->stations)); 292 293 + /* clean ucode key table bit map */ 294 + priv->ucode_key_table = 0; 295 + 296 spin_unlock_irqrestore(&priv->sta_lock, flags); 297 } 298 EXPORT_SYMBOL(iwl_clear_stations_table);
+21 -3
drivers/net/wireless/iwlwifi/iwl-sta.c
··· 475 if (!test_and_set_bit(i, &priv->ucode_key_table)) 476 return i; 477 478 - return -1; 479 } 480 481 int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, u8 send_if_empty) ··· 620 /* else, we are overriding an existing key => no need to allocated room 621 * in uCode. */ 622 623 priv->stations[sta_id].sta.key.key_flags = key_flags; 624 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK; 625 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; ··· 640 { 641 unsigned long flags; 642 __le16 key_flags = 0; 643 644 key_flags |= (STA_KEY_FLG_CCMP | STA_KEY_FLG_MAP_KEY_MSK); 645 key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS); ··· 668 /* else, we are overriding an existing key => no need to allocated room 669 * in uCode. */ 670 671 priv->stations[sta_id].sta.key.key_flags = key_flags; 672 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK; 673 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; 674 675 spin_unlock_irqrestore(&priv->sta_lock, flags); 676 677 - IWL_DEBUG_INFO("hwcrypto: modify ucode station key info\n"); 678 - return iwl_send_add_sta(priv, &priv->stations[sta_id].sta, CMD_ASYNC); 679 } 680 681 static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv, ··· 703 iwl_get_free_ucode_key_index(priv); 704 /* else, we are overriding an existing key => no need to allocated room 705 * in uCode. */ 706 707 /* This copy is acutally not needed: we get the key with each TX */ 708 memcpy(priv->stations[sta_id].keyinfo.key, keyconf->key, 16); ··· 741 * been replaced by another one with different index. 742 * Don't do anything and return ok 743 */ 744 spin_unlock_irqrestore(&priv->sta_lock, flags); 745 return 0; 746 }
··· 475 if (!test_and_set_bit(i, &priv->ucode_key_table)) 476 return i; 477 478 + return WEP_INVALID_OFFSET; 479 } 480 481 int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, u8 send_if_empty) ··· 620 /* else, we are overriding an existing key => no need to allocated room 621 * in uCode. */ 622 623 + WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET, 624 + "no space for new kew"); 625 + 626 priv->stations[sta_id].sta.key.key_flags = key_flags; 627 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK; 628 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; ··· 637 { 638 unsigned long flags; 639 __le16 key_flags = 0; 640 + int ret; 641 642 key_flags |= (STA_KEY_FLG_CCMP | STA_KEY_FLG_MAP_KEY_MSK); 643 key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS); ··· 664 /* else, we are overriding an existing key => no need to allocated room 665 * in uCode. */ 666 667 + WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET, 668 + "no space for new kew"); 669 + 670 priv->stations[sta_id].sta.key.key_flags = key_flags; 671 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK; 672 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; 673 674 + ret = iwl_send_add_sta(priv, &priv->stations[sta_id].sta, CMD_ASYNC); 675 + 676 spin_unlock_irqrestore(&priv->sta_lock, flags); 677 678 + return ret; 679 } 680 681 static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv, ··· 695 iwl_get_free_ucode_key_index(priv); 696 /* else, we are overriding an existing key => no need to allocated room 697 * in uCode. */ 698 + 699 + WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET, 700 + "no space for new kew"); 701 702 /* This copy is acutally not needed: we get the key with each TX */ 703 memcpy(priv->stations[sta_id].keyinfo.key, keyconf->key, 16); ··· 730 * been replaced by another one with different index. 731 * Don't do anything and return ok 732 */ 733 + spin_unlock_irqrestore(&priv->sta_lock, flags); 734 + return 0; 735 + } 736 + 737 + if (priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET) { 738 + IWL_WARNING("Removing wrong key %d 0x%x\n", 739 + keyconf->keyidx, key_flags); 740 spin_unlock_irqrestore(&priv->sta_lock, flags); 741 return 0; 742 }
+1 -1
drivers/net/wireless/zd1211rw/zd_mac.c
··· 615 struct ieee80211_hdr *tx_hdr; 616 617 tx_hdr = (struct ieee80211_hdr *)skb->data; 618 - if (likely(!compare_ether_addr(tx_hdr->addr2, rx_hdr->addr1))) 619 { 620 __skb_unlink(skb, q); 621 tx_status(hw, skb, IEEE80211_TX_STAT_ACK, stats->signal, 1);
··· 615 struct ieee80211_hdr *tx_hdr; 616 617 tx_hdr = (struct ieee80211_hdr *)skb->data; 618 + if (likely(!memcmp(tx_hdr->addr2, rx_hdr->addr1, ETH_ALEN))) 619 { 620 __skb_unlink(skb, q); 621 tx_status(hw, skb, IEEE80211_TX_STAT_ACK, stats->signal, 1);
+1 -1
net/mac80211/sta_info.c
··· 99 100 sta = rcu_dereference(local->sta_hash[STA_HASH(addr)]); 101 while (sta) { 102 - if (compare_ether_addr(sta->sta.addr, addr) == 0) 103 break; 104 sta = rcu_dereference(sta->hnext); 105 }
··· 99 100 sta = rcu_dereference(local->sta_hash[STA_HASH(addr)]); 101 while (sta) { 102 + if (memcmp(sta->sta.addr, addr, ETH_ALEN) == 0) 103 break; 104 sta = rcu_dereference(sta->hnext); 105 }