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