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

+78 -59
+11 -10
drivers/net/wireless/iwlwifi/iwl-sta.c
··· 719 719 { 720 720 unsigned long flags; 721 721 int ret = 0; 722 + __le16 key_flags = 0; 723 + 724 + key_flags |= (STA_KEY_FLG_TKIP | STA_KEY_FLG_MAP_KEY_MSK); 725 + key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS); 726 + key_flags &= ~STA_KEY_FLG_INVALID; 727 + 728 + if (sta_id == priv->hw_params.bcast_sta_id) 729 + key_flags |= STA_KEY_MULTICAST_MSK; 722 730 723 731 keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; 724 732 keyconf->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC; ··· 746 738 WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET, 747 739 "no space for a new key"); 748 740 741 + priv->stations[sta_id].sta.key.key_flags = key_flags; 742 + 743 + 749 744 /* This copy is acutally not needed: we get the key with each TX */ 750 745 memcpy(priv->stations[sta_id].keyinfo.key, keyconf->key, 16); 751 746 ··· 765 754 { 766 755 u8 sta_id = IWL_INVALID_STATION; 767 756 unsigned long flags; 768 - __le16 key_flags = 0; 769 757 int i; 770 - DECLARE_MAC_BUF(mac); 771 758 772 759 sta_id = iwl_find_station(priv, addr); 773 760 if (sta_id == IWL_INVALID_STATION) { ··· 780 771 return; 781 772 } 782 773 783 - key_flags |= (STA_KEY_FLG_TKIP | STA_KEY_FLG_MAP_KEY_MSK); 784 - key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS); 785 - key_flags &= ~STA_KEY_FLG_INVALID; 786 - 787 - if (sta_id == priv->hw_params.bcast_sta_id) 788 - key_flags |= STA_KEY_MULTICAST_MSK; 789 - 790 774 spin_lock_irqsave(&priv->sta_lock, flags); 791 775 792 - priv->stations[sta_id].sta.key.key_flags = key_flags; 793 776 priv->stations[sta_id].sta.key.tkip_rx_tsc_byte2 = (u8) iv32; 794 777 795 778 for (i = 0; i < 5; i++)
-1
drivers/net/wireless/iwlwifi/iwl3945-base.c
··· 1744 1744 rxq->bd = NULL; 1745 1745 rxq->rb_stts = NULL; 1746 1746 } 1747 - EXPORT_SYMBOL(iwl3945_rx_queue_free); 1748 1747 1749 1748 1750 1749 /* Convert linear signal-to-noise ratio into dB */
+1 -1
net/mac80211/rc80211_minstrel.c
··· 476 476 return NULL; 477 477 478 478 for (i = 0; i < IEEE80211_NUM_BANDS; i++) { 479 - sband = hw->wiphy->bands[hw->conf.channel->band]; 479 + sband = hw->wiphy->bands[i]; 480 480 if (sband->n_bitrates > max_rates) 481 481 max_rates = sband->n_bitrates; 482 482 }
+49 -44
net/mac80211/rc80211_pid_algo.c
··· 317 317 struct ieee80211_sta *sta, void *priv_sta) 318 318 { 319 319 struct rc_pid_sta_info *spinfo = priv_sta; 320 + struct rc_pid_info *pinfo = priv; 321 + struct rc_pid_rateinfo *rinfo = pinfo->rinfo; 320 322 struct sta_info *si; 323 + int i, j, tmp; 324 + bool s; 321 325 322 326 /* TODO: This routine should consider using RSSI from previous packets 323 327 * as we need to have IEEE 802.1X auth succeed immediately after assoc.. 324 328 * Until that method is implemented, we will use the lowest supported 325 329 * rate as a workaround. */ 326 - 327 - spinfo->txrate_idx = rate_lowest_index(sband, sta); 328 - /* HACK */ 329 - si = container_of(sta, struct sta_info, sta); 330 - si->fail_avg = 0; 331 - } 332 - 333 - static void *rate_control_pid_alloc(struct ieee80211_hw *hw, 334 - struct dentry *debugfsdir) 335 - { 336 - struct rc_pid_info *pinfo; 337 - struct rc_pid_rateinfo *rinfo; 338 - struct ieee80211_supported_band *sband; 339 - int i, j, tmp; 340 - bool s; 341 - #ifdef CONFIG_MAC80211_DEBUGFS 342 - struct rc_pid_debugfs_entries *de; 343 - #endif 344 - 345 - sband = hw->wiphy->bands[hw->conf.channel->band]; 346 - 347 - pinfo = kmalloc(sizeof(*pinfo), GFP_ATOMIC); 348 - if (!pinfo) 349 - return NULL; 350 - 351 - /* We can safely assume that sband won't change unless we get 352 - * reinitialized. */ 353 - rinfo = kmalloc(sizeof(*rinfo) * sband->n_bitrates, GFP_ATOMIC); 354 - if (!rinfo) { 355 - kfree(pinfo); 356 - return NULL; 357 - } 358 - 359 - pinfo->target = RC_PID_TARGET_PF; 360 - pinfo->sampling_period = RC_PID_INTERVAL; 361 - pinfo->coeff_p = RC_PID_COEFF_P; 362 - pinfo->coeff_i = RC_PID_COEFF_I; 363 - pinfo->coeff_d = RC_PID_COEFF_D; 364 - pinfo->smoothing_shift = RC_PID_SMOOTHING_SHIFT; 365 - pinfo->sharpen_factor = RC_PID_SHARPENING_FACTOR; 366 - pinfo->sharpen_duration = RC_PID_SHARPENING_DURATION; 367 - pinfo->norm_offset = RC_PID_NORM_OFFSET; 368 - pinfo->rinfo = rinfo; 369 - pinfo->oldrate = 0; 370 330 371 331 /* Sort the rates. This is optimized for the most common case (i.e. 372 332 * almost-sorted CCK+OFDM rates). Kind of bubble-sort with reversed ··· 354 394 if (!s) 355 395 break; 356 396 } 397 + 398 + spinfo->txrate_idx = rate_lowest_index(sband, sta); 399 + /* HACK */ 400 + si = container_of(sta, struct sta_info, sta); 401 + si->fail_avg = 0; 402 + } 403 + 404 + static void *rate_control_pid_alloc(struct ieee80211_hw *hw, 405 + struct dentry *debugfsdir) 406 + { 407 + struct rc_pid_info *pinfo; 408 + struct rc_pid_rateinfo *rinfo; 409 + struct ieee80211_supported_band *sband; 410 + int i, max_rates = 0; 411 + #ifdef CONFIG_MAC80211_DEBUGFS 412 + struct rc_pid_debugfs_entries *de; 413 + #endif 414 + 415 + pinfo = kmalloc(sizeof(*pinfo), GFP_ATOMIC); 416 + if (!pinfo) 417 + return NULL; 418 + 419 + for (i = 0; i < IEEE80211_NUM_BANDS; i++) { 420 + sband = hw->wiphy->bands[i]; 421 + if (sband->n_bitrates > max_rates) 422 + max_rates = sband->n_bitrates; 423 + } 424 + 425 + rinfo = kmalloc(sizeof(*rinfo) * max_rates, GFP_ATOMIC); 426 + if (!rinfo) { 427 + kfree(pinfo); 428 + return NULL; 429 + } 430 + 431 + pinfo->target = RC_PID_TARGET_PF; 432 + pinfo->sampling_period = RC_PID_INTERVAL; 433 + pinfo->coeff_p = RC_PID_COEFF_P; 434 + pinfo->coeff_i = RC_PID_COEFF_I; 435 + pinfo->coeff_d = RC_PID_COEFF_D; 436 + pinfo->smoothing_shift = RC_PID_SMOOTHING_SHIFT; 437 + pinfo->sharpen_factor = RC_PID_SHARPENING_FACTOR; 438 + pinfo->sharpen_duration = RC_PID_SHARPENING_DURATION; 439 + pinfo->norm_offset = RC_PID_NORM_OFFSET; 440 + pinfo->rinfo = rinfo; 441 + pinfo->oldrate = 0; 357 442 358 443 #ifdef CONFIG_MAC80211_DEBUGFS 359 444 de = &pinfo->dentries;
+1 -1
net/mac80211/tx.c
··· 772 772 hdrlen = ieee80211_hdrlen(hdr->frame_control); 773 773 774 774 /* internal error, why is TX_FRAGMENTED set? */ 775 - if (WARN_ON(skb->len <= frag_threshold)) 775 + if (WARN_ON(skb->len + FCS_LEN <= frag_threshold)) 776 776 return TX_DROP; 777 777 778 778 /*
+15 -2
net/wireless/reg.c
··· 907 907 int freq_reg_info(struct wiphy *wiphy, u32 center_freq, u32 *bandwidth, 908 908 const struct ieee80211_reg_rule **reg_rule) 909 909 { 910 + assert_cfg80211_lock(); 910 911 return freq_reg_info_regd(wiphy, center_freq, 911 912 bandwidth, reg_rule, NULL); 912 913 } ··· 1134 1133 if (is_world_regdom(cfg80211_regdomain->alpha2) || 1135 1134 (wiphy->regd && is_world_regdom(wiphy->regd->alpha2))) 1136 1135 return true; 1137 - if (last_request->initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE && 1136 + if (last_request && 1137 + last_request->initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE && 1138 1138 wiphy->custom_regulatory) 1139 1139 return true; 1140 1140 return false; ··· 1144 1142 /* Reap the advantages of previously found beacons */ 1145 1143 static void reg_process_beacons(struct wiphy *wiphy) 1146 1144 { 1145 + /* 1146 + * Means we are just firing up cfg80211, so no beacons would 1147 + * have been processed yet. 1148 + */ 1149 + if (!last_request) 1150 + return; 1147 1151 if (!reg_is_world_roaming(wiphy)) 1148 1152 return; 1149 1153 wiphy_update_beacon_reg(wiphy); ··· 1183 1175 const struct ieee80211_power_rule *power_rule = NULL; 1184 1176 struct ieee80211_supported_band *sband; 1185 1177 struct ieee80211_channel *chan; 1178 + 1179 + assert_cfg80211_lock(); 1186 1180 1187 1181 sband = wiphy->bands[band]; 1188 1182 BUG_ON(chan_idx >= sband->n_channels); ··· 1224 1214 const struct ieee80211_regdomain *regd) 1225 1215 { 1226 1216 enum ieee80211_band band; 1217 + 1218 + mutex_lock(&cfg80211_mutex); 1227 1219 for (band = 0; band < IEEE80211_NUM_BANDS; band++) { 1228 1220 if (wiphy->bands[band]) 1229 1221 handle_band_custom(wiphy, band, regd); 1230 1222 } 1223 + mutex_unlock(&cfg80211_mutex); 1231 1224 } 1232 1225 EXPORT_SYMBOL(wiphy_apply_custom_regulatory); 1233 1226 ··· 1436 1423 return call_crda(last_request->alpha2); 1437 1424 } 1438 1425 1439 - /* This currently only processes user and driver regulatory hints */ 1426 + /* This processes *all* regulatory hints */ 1440 1427 static void reg_process_hint(struct regulatory_request *reg_request) 1441 1428 { 1442 1429 int r = 0;
+1
net/wireless/scan.c
··· 395 395 memcpy(ies, res->pub.information_elements, ielen); 396 396 found->ies_allocated = true; 397 397 found->pub.information_elements = ies; 398 + found->pub.len_information_elements = ielen; 398 399 } 399 400 } 400 401 }