Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+184 -566
+19
drivers/net/wireless/ath/ath5k/base.c
··· 2415 2415 * Initialization routines * 2416 2416 \*************************/ 2417 2417 2418 + static const struct ieee80211_iface_limit if_limits[] = { 2419 + { .max = 2048, .types = BIT(NL80211_IFTYPE_STATION) }, 2420 + { .max = 4, .types = 2421 + #ifdef CONFIG_MAC80211_MESH 2422 + BIT(NL80211_IFTYPE_MESH_POINT) | 2423 + #endif 2424 + BIT(NL80211_IFTYPE_AP) }, 2425 + }; 2426 + 2427 + static const struct ieee80211_iface_combination if_comb = { 2428 + .limits = if_limits, 2429 + .n_limits = ARRAY_SIZE(if_limits), 2430 + .max_interfaces = 2048, 2431 + .num_different_channels = 1, 2432 + }; 2433 + 2418 2434 int __devinit 2419 2435 ath5k_init_ah(struct ath5k_hw *ah, const struct ath_bus_ops *bus_ops) 2420 2436 { ··· 2451 2435 BIT(NL80211_IFTYPE_STATION) | 2452 2436 BIT(NL80211_IFTYPE_ADHOC) | 2453 2437 BIT(NL80211_IFTYPE_MESH_POINT); 2438 + 2439 + hw->wiphy->iface_combinations = &if_comb; 2440 + hw->wiphy->n_iface_combinations = 1; 2454 2441 2455 2442 /* SW support for IBSS_RSN is provided by mac80211 */ 2456 2443 hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
+1 -1
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
··· 3809 3809 return true; 3810 3810 } 3811 3811 3812 - static void ar9003_hw_internal_regulator_apply(struct ath_hw *ah) 3812 + void ar9003_hw_internal_regulator_apply(struct ath_hw *ah) 3813 3813 { 3814 3814 int internal_regulator = 3815 3815 ath9k_hw_ar9300_get_eeprom(ah, EEP_INTERNAL_REGULATOR);
+3
drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
··· 334 334 335 335 unsigned int ar9003_get_paprd_scale_factor(struct ath_hw *ah, 336 336 struct ath9k_channel *chan); 337 + 338 + void ar9003_hw_internal_regulator_apply(struct ath_hw *ah); 339 + 337 340 #endif
+90 -88
drivers/net/wireless/ath/ath9k/ar9330_1p1_initvals.h
··· 1 1 /* 2 - * Copyright (c) 2011 Atheros Communications Inc. 2 + * Copyright (c) 2010-2011 Atheros Communications Inc. 3 + * Copyright (c) 2011-2012 Qualcomm Atheros Inc. 3 4 * 4 5 * Permission to use, copy, modify, and/or distribute this software for any 5 6 * purpose with or without fee is hereby granted, provided that the above ··· 19 18 #define INITVALS_9330_1P1_H 20 19 21 20 static const u32 ar9331_1p1_baseband_postamble[][5] = { 22 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ 21 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ 23 22 {0x00009810, 0xd00a8005, 0xd00a8005, 0xd00a8005, 0xd00a8005}, 24 23 {0x00009820, 0x206a002e, 0x206a002e, 0x206a002e, 0x206a002e}, 25 24 {0x00009824, 0x5ac640d0, 0x5ac640d0, 0x5ac640d0, 0x5ac640d0}, ··· 28 27 {0x00009830, 0x0000059c, 0x0000059c, 0x0000059c, 0x0000059c}, 29 28 {0x00009c00, 0x00000044, 0x00000044, 0x00000044, 0x00000044}, 30 29 {0x00009e00, 0x0372161e, 0x0372161e, 0x037216a4, 0x037216a4}, 31 - {0x00009e04, 0x00182020, 0x00182020, 0x00182020, 0x00182020}, 30 + {0x00009e04, 0x00202020, 0x00202020, 0x00202020, 0x00202020}, 32 31 {0x00009e0c, 0x6c4000e2, 0x6d4000e2, 0x6d4000e2, 0x6c4000e2}, 33 32 {0x00009e10, 0x7ec80d2e, 0x7ec80d2e, 0x7ec80d2e, 0x7ec80d2e}, 34 - {0x00009e14, 0x31395d5e, 0x3139605e, 0x3139605e, 0x31395d5e}, 33 + {0x00009e14, 0x31365d5e, 0x3136605e, 0x3136605e, 0x31365d5e}, 35 34 {0x00009e18, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, 36 35 {0x00009e1c, 0x0001cf9c, 0x0001cf9c, 0x00021f9c, 0x00021f9c}, 37 36 {0x00009e20, 0x000003b5, 0x000003b5, 0x000003ce, 0x000003ce}, ··· 56 55 {0x0000a288, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, 57 56 {0x0000a28c, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, 58 57 {0x0000a2c4, 0x00158d18, 0x00158d18, 0x00158d18, 0x00158d18}, 59 - {0x0000a2d0, 0x00071981, 0x00071981, 0x00071981, 0x00071981}, 58 + {0x0000a2d0, 0x00071982, 0x00071982, 0x00071982, 0x00071982}, 60 59 {0x0000a2d8, 0xf999a83a, 0xf999a83a, 0xf999a83a, 0xf999a83a}, 61 60 {0x0000a358, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, 62 61 {0x0000ae04, 0x00802020, 0x00802020, 0x00802020, 0x00802020}, ··· 64 63 }; 65 64 66 65 static const u32 ar9331_modes_lowest_ob_db_tx_gain_1p1[][5] = { 67 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ 66 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ 68 67 {0x0000a2d8, 0x7999a83a, 0x7999a83a, 0x7999a83a, 0x7999a83a}, 69 68 {0x0000a2dc, 0xffff2a52, 0xffff2a52, 0xffff2a52, 0xffff2a52}, 70 69 {0x0000a2e0, 0xffffcc84, 0xffffcc84, 0xffffcc84, 0xffffcc84}, ··· 156 155 }; 157 156 158 157 static const u32 ar9331_modes_high_ob_db_tx_gain_1p1[][5] = { 159 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ 158 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ 160 159 {0x0000a2d8, 0x7999a83a, 0x7999a83a, 0x7999a83a, 0x7999a83a}, 161 160 {0x0000a2dc, 0xffaa9a52, 0xffaa9a52, 0xffaa9a52, 0xffaa9a52}, 162 161 {0x0000a2e0, 0xffb31c84, 0xffb31c84, 0xffb31c84, 0xffb31c84}, ··· 246 245 }; 247 246 248 247 static const u32 ar9331_modes_low_ob_db_tx_gain_1p1[][5] = { 249 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ 248 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ 250 249 {0x0000a2d8, 0x7999a83a, 0x7999a83a, 0x7999a83a, 0x7999a83a}, 251 250 {0x0000a2dc, 0xffff2a52, 0xffff2a52, 0xffff2a52, 0xffff2a52}, 252 251 {0x0000a2e0, 0xffffcc84, 0xffffcc84, 0xffffcc84, 0xffffcc84}, ··· 378 377 {0x000160b4, 0x92480040}, 379 378 {0x000160c0, 0x006db6db}, 380 379 {0x000160c4, 0x0186db60}, 381 - {0x000160c8, 0x6db6db6c}, 380 + {0x000160c8, 0x6db4db6c}, 382 381 {0x000160cc, 0x6de6c300}, 383 382 {0x000160d0, 0x14500820}, 384 383 {0x00016100, 0x04cb0001}, 385 384 {0x00016104, 0xfff80015}, 386 385 {0x00016108, 0x00080010}, 387 386 {0x0001610c, 0x00170000}, 388 - {0x00016140, 0x10804000}, 387 + {0x00016140, 0x10800000}, 389 388 {0x00016144, 0x01884080}, 390 389 {0x00016148, 0x000080c0}, 391 390 {0x00016280, 0x01000015}, ··· 418 417 }; 419 418 420 419 static const u32 ar9331_1p1_soc_postamble[][5] = { 421 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ 420 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ 422 421 {0x00007010, 0x00000022, 0x00000022, 0x00000022, 0x00000022}, 423 422 }; 424 423 ··· 692 691 }; 693 692 694 693 static const u32 ar9331_modes_high_power_tx_gain_1p1[][5] = { 695 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ 694 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ 696 695 {0x0000a2d8, 0x7999a83a, 0x7999a83a, 0x7999a83a, 0x7999a83a}, 697 696 {0x0000a2dc, 0xffff2a52, 0xffff2a52, 0xffff2a52, 0xffff2a52}, 698 697 {0x0000a2e0, 0xffffcc84, 0xffffcc84, 0xffffcc84, 0xffffcc84}, ··· 784 783 }; 785 784 786 785 static const u32 ar9331_1p1_mac_postamble[][5] = { 787 - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ 786 + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ 788 787 {0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160}, 789 788 {0x00001070, 0x00000168, 0x000002d0, 0x00000318, 0x0000018c}, 790 789 {0x000010b0, 0x00000e60, 0x00001cc0, 0x00007c70, 0x00003e38}, ··· 974 973 975 974 static const u32 ar9331_common_rx_gain_1p1[][2] = { 976 975 /* Addr allmodes */ 977 - {0x0000a000, 0x00010000}, 978 - {0x0000a004, 0x00030002}, 979 - {0x0000a008, 0x00050004}, 980 - {0x0000a00c, 0x00810080}, 981 - {0x0000a010, 0x00830082}, 982 - {0x0000a014, 0x01810180}, 983 - {0x0000a018, 0x01830182}, 984 - {0x0000a01c, 0x01850184}, 985 - {0x0000a020, 0x01890188}, 986 - {0x0000a024, 0x018b018a}, 987 - {0x0000a028, 0x018d018c}, 988 - {0x0000a02c, 0x01910190}, 989 - {0x0000a030, 0x01930192}, 990 - {0x0000a034, 0x01950194}, 991 - {0x0000a038, 0x038a0196}, 992 - {0x0000a03c, 0x038c038b}, 993 - {0x0000a040, 0x0390038d}, 994 - {0x0000a044, 0x03920391}, 995 - {0x0000a048, 0x03940393}, 996 - {0x0000a04c, 0x03960395}, 976 + {0x00009e18, 0x05000000}, 977 + {0x0000a000, 0x00060005}, 978 + {0x0000a004, 0x00810080}, 979 + {0x0000a008, 0x00830082}, 980 + {0x0000a00c, 0x00850084}, 981 + {0x0000a010, 0x01820181}, 982 + {0x0000a014, 0x01840183}, 983 + {0x0000a018, 0x01880185}, 984 + {0x0000a01c, 0x018a0189}, 985 + {0x0000a020, 0x02850284}, 986 + {0x0000a024, 0x02890288}, 987 + {0x0000a028, 0x028b028a}, 988 + {0x0000a02c, 0x03850384}, 989 + {0x0000a030, 0x03890388}, 990 + {0x0000a034, 0x038b038a}, 991 + {0x0000a038, 0x038d038c}, 992 + {0x0000a03c, 0x03910390}, 993 + {0x0000a040, 0x03930392}, 994 + {0x0000a044, 0x03950394}, 995 + {0x0000a048, 0x00000396}, 996 + {0x0000a04c, 0x00000000}, 997 997 {0x0000a050, 0x00000000}, 998 998 {0x0000a054, 0x00000000}, 999 999 {0x0000a058, 0x00000000}, ··· 1007 1005 {0x0000a074, 0x00000000}, 1008 1006 {0x0000a078, 0x00000000}, 1009 1007 {0x0000a07c, 0x00000000}, 1010 - {0x0000a080, 0x22222229}, 1011 - {0x0000a084, 0x1d1d1d1d}, 1012 - {0x0000a088, 0x1d1d1d1d}, 1013 - {0x0000a08c, 0x1d1d1d1d}, 1014 - {0x0000a090, 0x171d1d1d}, 1015 - {0x0000a094, 0x11111717}, 1016 - {0x0000a098, 0x00030311}, 1017 - {0x0000a09c, 0x00000000}, 1018 - {0x0000a0a0, 0x00000000}, 1008 + {0x0000a080, 0x28282828}, 1009 + {0x0000a084, 0x28282828}, 1010 + {0x0000a088, 0x28282828}, 1011 + {0x0000a08c, 0x28282828}, 1012 + {0x0000a090, 0x28282828}, 1013 + {0x0000a094, 0x24242428}, 1014 + {0x0000a098, 0x171e1e1e}, 1015 + {0x0000a09c, 0x02020b0b}, 1016 + {0x0000a0a0, 0x02020202}, 1019 1017 {0x0000a0a4, 0x00000000}, 1020 1018 {0x0000a0a8, 0x00000000}, 1021 1019 {0x0000a0ac, 0x00000000}, ··· 1023 1021 {0x0000a0b4, 0x00000000}, 1024 1022 {0x0000a0b8, 0x00000000}, 1025 1023 {0x0000a0bc, 0x00000000}, 1026 - {0x0000a0c0, 0x001f0000}, 1027 - {0x0000a0c4, 0x01000101}, 1028 - {0x0000a0c8, 0x011e011f}, 1029 - {0x0000a0cc, 0x011c011d}, 1030 - {0x0000a0d0, 0x02030204}, 1031 - {0x0000a0d4, 0x02010202}, 1032 - {0x0000a0d8, 0x021f0200}, 1033 - {0x0000a0dc, 0x0302021e}, 1034 - {0x0000a0e0, 0x03000301}, 1035 - {0x0000a0e4, 0x031e031f}, 1036 - {0x0000a0e8, 0x0402031d}, 1037 - {0x0000a0ec, 0x04000401}, 1038 - {0x0000a0f0, 0x041e041f}, 1039 - {0x0000a0f4, 0x0502041d}, 1040 - {0x0000a0f8, 0x05000501}, 1041 - {0x0000a0fc, 0x051e051f}, 1042 - {0x0000a100, 0x06010602}, 1043 - {0x0000a104, 0x061f0600}, 1044 - {0x0000a108, 0x061d061e}, 1045 - {0x0000a10c, 0x07020703}, 1046 - {0x0000a110, 0x07000701}, 1024 + {0x0000a0c0, 0x22072208}, 1025 + {0x0000a0c4, 0x22052206}, 1026 + {0x0000a0c8, 0x22032204}, 1027 + {0x0000a0cc, 0x22012202}, 1028 + {0x0000a0d0, 0x221f2200}, 1029 + {0x0000a0d4, 0x221d221e}, 1030 + {0x0000a0d8, 0x33023303}, 1031 + {0x0000a0dc, 0x33003301}, 1032 + {0x0000a0e0, 0x331e331f}, 1033 + {0x0000a0e4, 0x4402331d}, 1034 + {0x0000a0e8, 0x44004401}, 1035 + {0x0000a0ec, 0x441e441f}, 1036 + {0x0000a0f0, 0x55025503}, 1037 + {0x0000a0f4, 0x55005501}, 1038 + {0x0000a0f8, 0x551e551f}, 1039 + {0x0000a0fc, 0x6602551d}, 1040 + {0x0000a100, 0x66006601}, 1041 + {0x0000a104, 0x661e661f}, 1042 + {0x0000a108, 0x7703661d}, 1043 + {0x0000a10c, 0x77017702}, 1044 + {0x0000a110, 0x00007700}, 1047 1045 {0x0000a114, 0x00000000}, 1048 1046 {0x0000a118, 0x00000000}, 1049 1047 {0x0000a11c, 0x00000000}, ··· 1056 1054 {0x0000a138, 0x00000000}, 1057 1055 {0x0000a13c, 0x00000000}, 1058 1056 {0x0000a140, 0x001f0000}, 1059 - {0x0000a144, 0x01000101}, 1060 - {0x0000a148, 0x011e011f}, 1061 - {0x0000a14c, 0x011c011d}, 1062 - {0x0000a150, 0x02030204}, 1063 - {0x0000a154, 0x02010202}, 1064 - {0x0000a158, 0x021f0200}, 1065 - {0x0000a15c, 0x0302021e}, 1066 - {0x0000a160, 0x03000301}, 1067 - {0x0000a164, 0x031e031f}, 1068 - {0x0000a168, 0x0402031d}, 1069 - {0x0000a16c, 0x04000401}, 1070 - {0x0000a170, 0x041e041f}, 1071 - {0x0000a174, 0x0502041d}, 1072 - {0x0000a178, 0x05000501}, 1073 - {0x0000a17c, 0x051e051f}, 1074 - {0x0000a180, 0x06010602}, 1075 - {0x0000a184, 0x061f0600}, 1076 - {0x0000a188, 0x061d061e}, 1077 - {0x0000a18c, 0x07020703}, 1078 - {0x0000a190, 0x07000701}, 1057 + {0x0000a144, 0x111f1100}, 1058 + {0x0000a148, 0x111d111e}, 1059 + {0x0000a14c, 0x111b111c}, 1060 + {0x0000a150, 0x22032204}, 1061 + {0x0000a154, 0x22012202}, 1062 + {0x0000a158, 0x221f2200}, 1063 + {0x0000a15c, 0x221d221e}, 1064 + {0x0000a160, 0x33013302}, 1065 + {0x0000a164, 0x331f3300}, 1066 + {0x0000a168, 0x4402331e}, 1067 + {0x0000a16c, 0x44004401}, 1068 + {0x0000a170, 0x441e441f}, 1069 + {0x0000a174, 0x55015502}, 1070 + {0x0000a178, 0x551f5500}, 1071 + {0x0000a17c, 0x6602551e}, 1072 + {0x0000a180, 0x66006601}, 1073 + {0x0000a184, 0x661e661f}, 1074 + {0x0000a188, 0x7703661d}, 1075 + {0x0000a18c, 0x77017702}, 1076 + {0x0000a190, 0x00007700}, 1079 1077 {0x0000a194, 0x00000000}, 1080 1078 {0x0000a198, 0x00000000}, 1081 1079 {0x0000a19c, 0x00000000}, ··· 1102 1100 {0x0000a1f0, 0x00000396}, 1103 1101 {0x0000a1f4, 0x00000396}, 1104 1102 {0x0000a1f8, 0x00000396}, 1105 - {0x0000a1fc, 0x00000196}, 1103 + {0x0000a1fc, 0x00000296}, 1106 1104 }; 1107 1105 1108 1106 static const u32 ar9331_common_tx_gain_offset1_1[][1] = { 1109 - {0}, 1110 - {3}, 1111 - {0}, 1112 - {0}, 1107 + {0x00000000}, 1108 + {0x00000003}, 1109 + {0x00000000}, 1110 + {0x00000000}, 1113 1111 }; 1114 1112 1115 1113 static const u32 ar9331_1p1_chansel_xtal_25M[] = {
+3
drivers/net/wireless/ath/ath9k/hw.c
··· 1468 1468 return false; 1469 1469 1470 1470 ah->chip_fullsleep = false; 1471 + 1472 + if (AR_SREV_9330(ah)) 1473 + ar9003_hw_internal_regulator_apply(ah); 1471 1474 ath9k_hw_init_pll(ah, chan); 1472 1475 ath9k_hw_set_rfmode(ah, chan); 1473 1476
+4 -3
drivers/net/wireless/ath/ath9k/main.c
··· 239 239 { 240 240 struct ath_hw *ah = sc->sc_ah; 241 241 struct ath_common *common = ath9k_hw_common(ah); 242 - bool ret; 242 + bool ret = true; 243 243 244 244 ieee80211_stop_queues(sc->hw); 245 245 ··· 250 250 ath9k_debug_samp_bb_mac(sc); 251 251 ath9k_hw_disable_interrupts(ah); 252 252 253 - ret = ath_drain_all_txq(sc, retry_tx); 254 - 255 253 if (!ath_stoprecv(sc)) 254 + ret = false; 255 + 256 + if (!ath_drain_all_txq(sc, retry_tx)) 256 257 ret = false; 257 258 258 259 if (!flush) {
+10 -6
drivers/net/wireless/ath/ath9k/xmit.c
··· 64 64 static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc, 65 65 struct ath_txq *txq, 66 66 struct ath_atx_tid *tid, 67 - struct sk_buff *skb); 67 + struct sk_buff *skb, 68 + bool dequeue); 68 69 69 70 enum { 70 71 MCS_HT20, ··· 812 811 fi = get_frame_info(skb); 813 812 bf = fi->bf; 814 813 if (!fi->bf) 815 - bf = ath_tx_setup_buffer(sc, txq, tid, skb); 814 + bf = ath_tx_setup_buffer(sc, txq, tid, skb, true); 816 815 817 816 if (!bf) 818 817 continue; ··· 1727 1726 return; 1728 1727 } 1729 1728 1730 - bf = ath_tx_setup_buffer(sc, txctl->txq, tid, skb); 1729 + bf = ath_tx_setup_buffer(sc, txctl->txq, tid, skb, false); 1731 1730 if (!bf) 1732 1731 return; 1733 1732 ··· 1754 1753 1755 1754 bf = fi->bf; 1756 1755 if (!bf) 1757 - bf = ath_tx_setup_buffer(sc, txq, tid, skb); 1756 + bf = ath_tx_setup_buffer(sc, txq, tid, skb, false); 1758 1757 1759 1758 if (!bf) 1760 1759 return; ··· 1815 1814 static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc, 1816 1815 struct ath_txq *txq, 1817 1816 struct ath_atx_tid *tid, 1818 - struct sk_buff *skb) 1817 + struct sk_buff *skb, 1818 + bool dequeue) 1819 1819 { 1820 1820 struct ath_common *common = ath9k_hw_common(sc->sc_ah); 1821 1821 struct ath_frame_info *fi = get_frame_info(skb); ··· 1865 1863 return bf; 1866 1864 1867 1865 error: 1866 + if (dequeue) 1867 + __skb_unlink(skb, &tid->buf_q); 1868 1868 dev_kfree_skb_any(skb); 1869 1869 return NULL; 1870 1870 } ··· 1897 1893 */ 1898 1894 ath_tx_send_ampdu(sc, tid, skb, txctl); 1899 1895 } else { 1900 - bf = ath_tx_setup_buffer(sc, txctl->txq, tid, skb); 1896 + bf = ath_tx_setup_buffer(sc, txctl->txq, tid, skb, false); 1901 1897 if (!bf) 1902 1898 return; 1903 1899
+3 -2
drivers/net/wireless/brcm80211/brcmfmac/usb.c
··· 28 28 #include <linux/uaccess.h> 29 29 #include <linux/firmware.h> 30 30 #include <linux/usb.h> 31 + #include <linux/vmalloc.h> 31 32 #include <net/cfg80211.h> 32 33 33 34 #include <defs.h> ··· 1240 1239 return -EINVAL; 1241 1240 } 1242 1241 1243 - devinfo->image = kmalloc(fw->size, GFP_ATOMIC); /* plus nvram */ 1242 + devinfo->image = vmalloc(fw->size); /* plus nvram */ 1244 1243 if (!devinfo->image) 1245 1244 return -ENOMEM; 1246 1245 ··· 1604 1603 void brcmf_usb_exit(void) 1605 1604 { 1606 1605 usb_deregister(&brcmf_usbdrvr); 1607 - kfree(g_image.data); 1606 + vfree(g_image.data); 1608 1607 g_image.data = NULL; 1609 1608 g_image.len = 0; 1610 1609 }
-8
drivers/net/wireless/iwlwifi/Kconfig
··· 137 137 even if the microcode doesn't advertise it. 138 138 139 139 Say Y only if you want to experiment with MFP. 140 - 141 - config IWLWIFI_UCODE16 142 - bool "support uCode 16.0" 143 - depends on IWLWIFI 144 - help 145 - This option enables support for uCode version 16.0. 146 - 147 - Say Y if you want to use 16.0 microcode.
-1
drivers/net/wireless/iwlwifi/Makefile
··· 18 18 iwlwifi-objs += iwl-trans-pcie.o iwl-trans-pcie-rx.o iwl-trans-pcie-tx.o 19 19 20 20 21 - iwlwifi-$(CONFIG_IWLWIFI_UCODE16) += iwl-phy-db.o 22 21 iwlwifi-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o 23 22 iwlwifi-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o 24 23 iwlwifi-$(CONFIG_IWLWIFI_DEVICE_TESTMODE) += iwl-testmode.o
+2 -2
drivers/net/wireless/iwlwifi/iwl-2000.c
··· 79 79 .chain_noise_scale = 1000, 80 80 .wd_timeout = IWL_DEF_WD_TIMEOUT, 81 81 .max_event_log_size = 512, 82 - .shadow_reg_enable = true, 82 + .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ 83 83 .hd_v2 = true, 84 84 }; 85 85 ··· 97 97 .chain_noise_scale = 1000, 98 98 .wd_timeout = IWL_LONG_WD_TIMEOUT, 99 99 .max_event_log_size = 512, 100 - .shadow_reg_enable = true, 100 + .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ 101 101 .hd_v2 = true, 102 102 }; 103 103
+3 -3
drivers/net/wireless/iwlwifi/iwl-6000.c
··· 86 86 .chain_noise_scale = 1000, 87 87 .wd_timeout = IWL_DEF_WD_TIMEOUT, 88 88 .max_event_log_size = 512, 89 - .shadow_reg_enable = true, 89 + .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ 90 90 }; 91 91 92 92 static const struct iwl_base_params iwl6050_base_params = { ··· 102 102 .chain_noise_scale = 1500, 103 103 .wd_timeout = IWL_DEF_WD_TIMEOUT, 104 104 .max_event_log_size = 1024, 105 - .shadow_reg_enable = true, 105 + .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ 106 106 }; 107 107 108 108 static const struct iwl_base_params iwl6000_g2_base_params = { ··· 118 118 .chain_noise_scale = 1000, 119 119 .wd_timeout = IWL_LONG_WD_TIMEOUT, 120 120 .max_event_log_size = 512, 121 - .shadow_reg_enable = true, 121 + .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ 122 122 }; 123 123 124 124 static const struct iwl_ht_params iwl6000_ht_params = {
+1
drivers/net/wireless/iwlwifi/iwl-agn-rs.c
··· 884 884 if ((priv->bt_traffic_load != priv->last_bt_traffic_load) || 885 885 (priv->bt_full_concurrent != full_concurrent)) { 886 886 priv->bt_full_concurrent = full_concurrent; 887 + priv->last_bt_traffic_load = priv->bt_traffic_load; 887 888 888 889 /* Update uCode's rate table. */ 889 890 tbl = &(lq_sta->lq_info[lq_sta->active_tbl]);
+1 -1
drivers/net/wireless/iwlwifi/iwl-agn-sta.c
··· 772 772 ~IWL_STA_DRIVER_ACTIVE; 773 773 priv->stations[i].used &= 774 774 ~IWL_STA_UCODE_INPROGRESS; 775 - spin_unlock_bh(&priv->sta_lock); 775 + continue; 776 776 } 777 777 /* 778 778 * Rate scaling has already been initialized, send
+9 -9
drivers/net/wireless/iwlwifi/iwl-drv.c
··· 657 657 return -EINVAL; 658 658 } 659 659 660 - static int alloc_pci_desc(struct iwl_drv *drv, 661 - struct iwl_firmware_pieces *pieces, 662 - enum iwl_ucode_type type) 660 + static int iwl_alloc_ucode(struct iwl_drv *drv, 661 + struct iwl_firmware_pieces *pieces, 662 + enum iwl_ucode_type type) 663 663 { 664 664 int i; 665 665 for (i = 0; 666 666 i < IWL_UCODE_SECTION_MAX && get_sec_size(pieces, type, i); 667 667 i++) 668 668 if (iwl_alloc_fw_desc(drv, &(drv->fw.img[type].sec[i]), 669 - get_sec(pieces, type, i))) 670 - return -1; 669 + get_sec(pieces, type, i))) 670 + return -ENOMEM; 671 671 return 0; 672 672 } 673 673 ··· 825 825 * 1) unmodified from disk 826 826 * 2) backup cache for save/restore during power-downs */ 827 827 for (i = 0; i < IWL_UCODE_TYPE_MAX; i++) 828 - if (alloc_pci_desc(drv, &pieces, i)) 829 - goto err_pci_alloc; 828 + if (iwl_alloc_ucode(drv, &pieces, i)) 829 + goto out_free_fw; 830 830 831 831 /* Now that we can no longer fail, copy information */ 832 832 ··· 866 866 drv->op_mode = iwl_dvm_ops.start(drv->trans, drv->cfg, &drv->fw); 867 867 868 868 if (!drv->op_mode) 869 - goto out_unbind; 869 + goto out_free_fw; 870 870 871 871 return; 872 872 ··· 877 877 goto out_unbind; 878 878 return; 879 879 880 - err_pci_alloc: 880 + out_free_fw: 881 881 IWL_ERR(drv, "failed to allocate pci memory\n"); 882 882 iwl_dealloc_ucode(drv); 883 883 release_firmware(ucode_raw);
-288
drivers/net/wireless/iwlwifi/iwl-phy-db.c
··· 1 - /****************************************************************************** 2 - * 3 - * This file is provided under a dual BSD/GPLv2 license. When using or 4 - * redistributing this file, you may do so under either license. 5 - * 6 - * GPL LICENSE SUMMARY 7 - * 8 - * Copyright(c) 2007 - 2012 Intel Corporation. All rights reserved. 9 - * 10 - * This program is free software; you can redistribute it and/or modify 11 - * it under the terms of version 2 of the GNU General Public License as 12 - * published by the Free Software Foundation. 13 - * 14 - * This program is distributed in the hope that it will be useful, but 15 - * WITHOUT ANY WARRANTY; without even the implied warranty of 16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 - * General Public License for more details. 18 - * 19 - * You should have received a copy of the GNU General Public License 20 - * along with this program; if not, write to the Free Software 21 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, 22 - * USA 23 - * 24 - * The full GNU General Public License is included in this distribution 25 - * in the file called LICENSE.GPL. 26 - * 27 - * Contact Information: 28 - * Intel Linux Wireless <ilw@linux.intel.com> 29 - * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 30 - * 31 - * BSD LICENSE 32 - * 33 - * Copyright(c) 2005 - 2012 Intel Corporation. All rights reserved. 34 - * All rights reserved. 35 - * 36 - * Redistribution and use in source and binary forms, with or without 37 - * modification, are permitted provided that the following conditions 38 - * are met: 39 - * 40 - * * Redistributions of source code must retain the above copyright 41 - * notice, this list of conditions and the following disclaimer. 42 - * * Redistributions in binary form must reproduce the above copyright 43 - * notice, this list of conditions and the following disclaimer in 44 - * the documentation and/or other materials provided with the 45 - * distribution. 46 - * * Neither the name Intel Corporation nor the names of its 47 - * contributors may be used to endorse or promote products derived 48 - * from this software without specific prior written permission. 49 - * 50 - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 51 - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 52 - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 53 - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 54 - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 55 - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 56 - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 57 - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 58 - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 59 - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 60 - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 61 - * 62 - *****************************************************************************/ 63 - 64 - #include <linux/slab.h> 65 - #include <linux/string.h> 66 - 67 - #include "iwl-debug.h" 68 - #include "iwl-dev.h" 69 - 70 - #include "iwl-phy-db.h" 71 - 72 - #define CHANNEL_NUM_SIZE 4 /* num of channels in calib_ch size */ 73 - 74 - struct iwl_phy_db *iwl_phy_db_init(struct device *dev) 75 - { 76 - struct iwl_phy_db *phy_db = kzalloc(sizeof(struct iwl_phy_db), 77 - GFP_KERNEL); 78 - 79 - if (!phy_db) 80 - return phy_db; 81 - 82 - phy_db->dev = dev; 83 - 84 - /* TODO: add default values of the phy db. */ 85 - return phy_db; 86 - } 87 - 88 - /* 89 - * get phy db section: returns a pointer to a phy db section specified by 90 - * type and channel group id. 91 - */ 92 - static struct iwl_phy_db_entry * 93 - iwl_phy_db_get_section(struct iwl_phy_db *phy_db, 94 - enum iwl_phy_db_section_type type, 95 - u16 chg_id) 96 - { 97 - if (!phy_db || type < 0 || type >= IWL_PHY_DB_MAX) 98 - return NULL; 99 - 100 - switch (type) { 101 - case IWL_PHY_DB_CFG: 102 - return &phy_db->cfg; 103 - case IWL_PHY_DB_CALIB_NCH: 104 - return &phy_db->calib_nch; 105 - case IWL_PHY_DB_CALIB_CH: 106 - return &phy_db->calib_ch; 107 - case IWL_PHY_DB_CALIB_CHG_PAPD: 108 - if (chg_id < 0 || chg_id >= IWL_NUM_PAPD_CH_GROUPS) 109 - return NULL; 110 - return &phy_db->calib_ch_group_papd[chg_id]; 111 - case IWL_PHY_DB_CALIB_CHG_TXP: 112 - if (chg_id < 0 || chg_id >= IWL_NUM_TXP_CH_GROUPS) 113 - return NULL; 114 - return &phy_db->calib_ch_group_txp[chg_id]; 115 - default: 116 - return NULL; 117 - } 118 - return NULL; 119 - } 120 - 121 - static void iwl_phy_db_free_section(struct iwl_phy_db *phy_db, 122 - enum iwl_phy_db_section_type type, 123 - u16 chg_id) 124 - { 125 - struct iwl_phy_db_entry *entry = 126 - iwl_phy_db_get_section(phy_db, type, chg_id); 127 - if (!entry) 128 - return; 129 - 130 - kfree(entry->data); 131 - entry->data = NULL; 132 - entry->size = 0; 133 - } 134 - 135 - void iwl_phy_db_free(struct iwl_phy_db *phy_db) 136 - { 137 - int i; 138 - 139 - if (!phy_db) 140 - return; 141 - 142 - iwl_phy_db_free_section(phy_db, IWL_PHY_DB_CFG, 0); 143 - iwl_phy_db_free_section(phy_db, IWL_PHY_DB_CALIB_NCH, 0); 144 - iwl_phy_db_free_section(phy_db, IWL_PHY_DB_CALIB_CH, 0); 145 - for (i = 0; i < IWL_NUM_PAPD_CH_GROUPS; i++) 146 - iwl_phy_db_free_section(phy_db, IWL_PHY_DB_CALIB_CHG_PAPD, i); 147 - for (i = 0; i < IWL_NUM_TXP_CH_GROUPS; i++) 148 - iwl_phy_db_free_section(phy_db, IWL_PHY_DB_CALIB_CHG_TXP, i); 149 - 150 - kfree(phy_db); 151 - } 152 - 153 - int iwl_phy_db_set_section(struct iwl_phy_db *phy_db, 154 - enum iwl_phy_db_section_type type, u8 *data, 155 - u16 size, gfp_t alloc_ctx) 156 - { 157 - struct iwl_phy_db_entry *entry; 158 - u16 chg_id = 0; 159 - 160 - if (!phy_db) 161 - return -EINVAL; 162 - 163 - if (type == IWL_PHY_DB_CALIB_CHG_PAPD || 164 - type == IWL_PHY_DB_CALIB_CHG_TXP) 165 - chg_id = le16_to_cpup((__le16 *)data); 166 - 167 - entry = iwl_phy_db_get_section(phy_db, type, chg_id); 168 - if (!entry) 169 - return -EINVAL; 170 - 171 - kfree(entry->data); 172 - entry->data = kmemdup(data, size, alloc_ctx); 173 - if (!entry->data) { 174 - entry->size = 0; 175 - return -ENOMEM; 176 - } 177 - 178 - entry->size = size; 179 - 180 - if (type == IWL_PHY_DB_CALIB_CH) { 181 - phy_db->channel_num = le32_to_cpup((__le32 *)data); 182 - phy_db->channel_size = 183 - (size - CHANNEL_NUM_SIZE) / phy_db->channel_num; 184 - } 185 - 186 - return 0; 187 - } 188 - 189 - static int is_valid_channel(u16 ch_id) 190 - { 191 - if (ch_id <= 14 || 192 - (36 <= ch_id && ch_id <= 64 && ch_id % 4 == 0) || 193 - (100 <= ch_id && ch_id <= 140 && ch_id % 4 == 0) || 194 - (145 <= ch_id && ch_id <= 165 && ch_id % 4 == 1)) 195 - return 1; 196 - return 0; 197 - } 198 - 199 - static u8 ch_id_to_ch_index(u16 ch_id) 200 - { 201 - if (WARN_ON(!is_valid_channel(ch_id))) 202 - return 0xff; 203 - 204 - if (ch_id <= 14) 205 - return ch_id - 1; 206 - if (ch_id <= 64) 207 - return (ch_id + 20) / 4; 208 - if (ch_id <= 140) 209 - return (ch_id - 12) / 4; 210 - return (ch_id - 13) / 4; 211 - } 212 - 213 - 214 - static u16 channel_id_to_papd(u16 ch_id) 215 - { 216 - if (WARN_ON(!is_valid_channel(ch_id))) 217 - return 0xff; 218 - 219 - if (1 <= ch_id && ch_id <= 14) 220 - return 0; 221 - if (36 <= ch_id && ch_id <= 64) 222 - return 1; 223 - if (100 <= ch_id && ch_id <= 140) 224 - return 2; 225 - return 3; 226 - } 227 - 228 - static u16 channel_id_to_txp(struct iwl_phy_db *phy_db, u16 ch_id) 229 - { 230 - struct iwl_phy_db_chg_txp *txp_chg; 231 - int i; 232 - u8 ch_index = ch_id_to_ch_index(ch_id); 233 - if (ch_index == 0xff) 234 - return 0xff; 235 - 236 - for (i = 0; i < IWL_NUM_TXP_CH_GROUPS; i++) { 237 - txp_chg = (void *)phy_db->calib_ch_group_txp[i].data; 238 - if (!txp_chg) 239 - return 0xff; 240 - /* 241 - * Looking for the first channel group that its max channel is 242 - * higher then wanted channel. 243 - */ 244 - if (le16_to_cpu(txp_chg->max_channel_idx) >= ch_index) 245 - return i; 246 - } 247 - return 0xff; 248 - } 249 - 250 - int iwl_phy_db_get_section_data(struct iwl_phy_db *phy_db, 251 - enum iwl_phy_db_section_type type, u8 **data, 252 - u16 *size, u16 ch_id) 253 - { 254 - struct iwl_phy_db_entry *entry; 255 - u32 channel_num; 256 - u32 channel_size; 257 - u16 ch_group_id = 0; 258 - u16 index; 259 - 260 - if (!phy_db) 261 - return -EINVAL; 262 - 263 - /* find wanted channel group */ 264 - if (type == IWL_PHY_DB_CALIB_CHG_PAPD) 265 - ch_group_id = channel_id_to_papd(ch_id); 266 - else if (type == IWL_PHY_DB_CALIB_CHG_TXP) 267 - ch_group_id = channel_id_to_txp(phy_db, ch_id); 268 - 269 - entry = iwl_phy_db_get_section(phy_db, type, ch_group_id); 270 - if (!entry) 271 - return -EINVAL; 272 - 273 - if (type == IWL_PHY_DB_CALIB_CH) { 274 - index = ch_id_to_ch_index(ch_id); 275 - channel_num = phy_db->channel_num; 276 - channel_size = phy_db->channel_size; 277 - if (index >= channel_num) { 278 - IWL_ERR(phy_db, "Wrong channel number %d", ch_id); 279 - return -EINVAL; 280 - } 281 - *data = entry->data + CHANNEL_NUM_SIZE + index * channel_size; 282 - *size = channel_size; 283 - } else { 284 - *data = entry->data; 285 - *size = entry->size; 286 - } 287 - return 0; 288 - }
-129
drivers/net/wireless/iwlwifi/iwl-phy-db.h
··· 1 - /****************************************************************************** 2 - * 3 - * This file is provided under a dual BSD/GPLv2 license. When using or 4 - * redistributing this file, you may do so under either license. 5 - * 6 - * GPL LICENSE SUMMARY 7 - * 8 - * Copyright(c) 2007 - 2012 Intel Corporation. All rights reserved. 9 - * 10 - * This program is free software; you can redistribute it and/or modify 11 - * it under the terms of version 2 of the GNU General Public License as 12 - * published by the Free Software Foundation. 13 - * 14 - * This program is distributed in the hope that it will be useful, but 15 - * WITHOUT ANY WARRANTY; without even the implied warranty of 16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 - * General Public License for more details. 18 - * 19 - * You should have received a copy of the GNU General Public License 20 - * along with this program; if not, write to the Free Software 21 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, 22 - * USA 23 - * 24 - * The full GNU General Public License is included in this distribution 25 - * in the file called LICENSE.GPL. 26 - * 27 - * Contact Information: 28 - * Intel Linux Wireless <ilw@linux.intel.com> 29 - * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 30 - * 31 - * BSD LICENSE 32 - * 33 - * Copyright(c) 2005 - 2012 Intel Corporation. All rights reserved. 34 - * All rights reserved. 35 - * 36 - * Redistribution and use in source and binary forms, with or without 37 - * modification, are permitted provided that the following conditions 38 - * are met: 39 - * 40 - * * Redistributions of source code must retain the above copyright 41 - * notice, this list of conditions and the following disclaimer. 42 - * * Redistributions in binary form must reproduce the above copyright 43 - * notice, this list of conditions and the following disclaimer in 44 - * the documentation and/or other materials provided with the 45 - * distribution. 46 - * * Neither the name Intel Corporation nor the names of its 47 - * contributors may be used to endorse or promote products derived 48 - * from this software without specific prior written permission. 49 - * 50 - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 51 - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 52 - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 53 - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 54 - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 55 - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 56 - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 57 - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 58 - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 59 - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 60 - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 61 - * 62 - *****************************************************************************/ 63 - 64 - #ifndef __IWL_PHYDB_H__ 65 - #define __IWL_PHYDB_H__ 66 - 67 - #include <linux/types.h> 68 - 69 - #define IWL_NUM_PAPD_CH_GROUPS 4 70 - #define IWL_NUM_TXP_CH_GROUPS 8 71 - 72 - struct iwl_phy_db_entry { 73 - u16 size; 74 - u8 *data; 75 - }; 76 - 77 - struct iwl_shared; 78 - 79 - /** 80 - * struct iwl_phy_db - stores phy configuration and calibration data. 81 - * 82 - * @cfg: phy configuration. 83 - * @calib_nch: non channel specific calibration data. 84 - * @calib_ch: channel specific calibration data. 85 - * @calib_ch_group_papd: calibration data related to papd channel group. 86 - * @calib_ch_group_txp: calibration data related to tx power chanel group. 87 - */ 88 - struct iwl_phy_db { 89 - struct iwl_phy_db_entry cfg; 90 - struct iwl_phy_db_entry calib_nch; 91 - struct iwl_phy_db_entry calib_ch; 92 - struct iwl_phy_db_entry calib_ch_group_papd[IWL_NUM_PAPD_CH_GROUPS]; 93 - struct iwl_phy_db_entry calib_ch_group_txp[IWL_NUM_TXP_CH_GROUPS]; 94 - 95 - u32 channel_num; 96 - u32 channel_size; 97 - 98 - /* for an access to the logger */ 99 - struct device *dev; 100 - }; 101 - 102 - enum iwl_phy_db_section_type { 103 - IWL_PHY_DB_CFG = 1, 104 - IWL_PHY_DB_CALIB_NCH, 105 - IWL_PHY_DB_CALIB_CH, 106 - IWL_PHY_DB_CALIB_CHG_PAPD, 107 - IWL_PHY_DB_CALIB_CHG_TXP, 108 - IWL_PHY_DB_MAX 109 - }; 110 - 111 - /* for parsing of tx power channel group data that comes from the firmware*/ 112 - struct iwl_phy_db_chg_txp { 113 - __le32 space; 114 - __le16 max_channel_idx; 115 - } __packed; 116 - 117 - struct iwl_phy_db *iwl_phy_db_init(struct device *dev); 118 - 119 - void iwl_phy_db_free(struct iwl_phy_db *phy_db); 120 - 121 - int iwl_phy_db_set_section(struct iwl_phy_db *phy_db, 122 - enum iwl_phy_db_section_type type, u8 *data, 123 - u16 size, gfp_t alloc_ctx); 124 - 125 - int iwl_phy_db_get_section_data(struct iwl_phy_db *phy_db, 126 - enum iwl_phy_db_section_type type, u8 **data, 127 - u16 *size, u16 ch_id); 128 - 129 - #endif /* __IWL_PHYDB_H__ */
+1 -1
drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
··· 347 347 void iwl_trans_pcie_tx_agg_setup(struct iwl_trans *trans, int queue, int fifo, 348 348 int sta_id, int tid, int frame_limit, u16 ssn); 349 349 void iwlagn_txq_free_tfd(struct iwl_trans *trans, struct iwl_tx_queue *txq, 350 - int index, enum dma_data_direction dma_dir); 350 + enum dma_data_direction dma_dir); 351 351 int iwl_tx_queue_reclaim(struct iwl_trans *trans, int txq_id, int index, 352 352 struct sk_buff_head *skbs); 353 353 int iwl_queue_space(const struct iwl_queue *q);
+14 -8
drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
··· 204 204 for (i = 1; i < num_tbs; i++) 205 205 dma_unmap_single(trans->dev, iwl_tfd_tb_get_addr(tfd, i), 206 206 iwl_tfd_tb_get_len(tfd, i), dma_dir); 207 + 208 + tfd->num_tbs = 0; 207 209 } 208 210 209 211 /** 210 212 * iwlagn_txq_free_tfd - Free all chunks referenced by TFD [txq->q.read_ptr] 211 213 * @trans - transport private data 212 214 * @txq - tx queue 213 - * @index - the index of the TFD to be freed 214 - *@dma_dir - the direction of the DMA mapping 215 + * @dma_dir - the direction of the DMA mapping 215 216 * 216 217 * Does NOT advance any TFD circular buffer read/write indexes 217 218 * Does NOT free the TFD itself (which is within circular buffer) 218 219 */ 219 220 void iwlagn_txq_free_tfd(struct iwl_trans *trans, struct iwl_tx_queue *txq, 220 - int index, enum dma_data_direction dma_dir) 221 + enum dma_data_direction dma_dir) 221 222 { 222 223 struct iwl_tfd *tfd_tmp = txq->tfds; 223 224 225 + /* rd_ptr is bounded by n_bd and idx is bounded by n_window */ 226 + int rd_ptr = txq->q.read_ptr; 227 + int idx = get_cmd_index(&txq->q, rd_ptr); 228 + 224 229 lockdep_assert_held(&txq->lock); 225 230 226 - iwlagn_unmap_tfd(trans, &txq->entries[index].meta, 227 - &tfd_tmp[index], dma_dir); 231 + /* We have only q->n_window txq->entries, but we use q->n_bd tfds */ 232 + iwlagn_unmap_tfd(trans, &txq->entries[idx].meta, 233 + &tfd_tmp[rd_ptr], dma_dir); 228 234 229 235 /* free SKB */ 230 236 if (txq->entries) { 231 237 struct sk_buff *skb; 232 238 233 - skb = txq->entries[index].skb; 239 + skb = txq->entries[idx].skb; 234 240 235 241 /* Can be called from irqs-disabled context 236 242 * If skb is not NULL, it means that the whole queue is being ··· 244 238 */ 245 239 if (skb) { 246 240 iwl_op_mode_free_skb(trans->op_mode, skb); 247 - txq->entries[index].skb = NULL; 241 + txq->entries[idx].skb = NULL; 248 242 } 249 243 } 250 244 } ··· 979 973 980 974 iwlagn_txq_inval_byte_cnt_tbl(trans, txq); 981 975 982 - iwlagn_txq_free_tfd(trans, txq, txq->q.read_ptr, DMA_TO_DEVICE); 976 + iwlagn_txq_free_tfd(trans, txq, DMA_TO_DEVICE); 983 977 freed++; 984 978 } 985 979
+1 -3
drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
··· 435 435 436 436 spin_lock_bh(&txq->lock); 437 437 while (q->write_ptr != q->read_ptr) { 438 - /* The read_ptr needs to bound by q->n_window */ 439 - iwlagn_txq_free_tfd(trans, txq, get_cmd_index(q, q->read_ptr), 440 - dma_dir); 438 + iwlagn_txq_free_tfd(trans, txq, dma_dir); 441 439 q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd); 442 440 } 443 441 spin_unlock_bh(&txq->lock);
+1 -1
drivers/net/wireless/ti/wl1251/sdio.c
··· 260 260 } 261 261 262 262 if (wl->irq) { 263 + irq_set_status_flags(wl->irq, IRQ_NOAUTOEN); 263 264 ret = request_irq(wl->irq, wl1251_line_irq, 0, "wl1251", wl); 264 265 if (ret < 0) { 265 266 wl1251_error("request_irq() failed: %d", ret); ··· 268 267 } 269 268 270 269 irq_set_irq_type(wl->irq, IRQ_TYPE_EDGE_RISING); 271 - disable_irq(wl->irq); 272 270 273 271 wl1251_sdio_ops.enable_irq = wl1251_enable_line_irq; 274 272 wl1251_sdio_ops.disable_irq = wl1251_disable_line_irq;
+1 -2
drivers/net/wireless/ti/wl1251/spi.c
··· 281 281 282 282 wl->use_eeprom = pdata->use_eeprom; 283 283 284 + irq_set_status_flags(wl->irq, IRQ_NOAUTOEN); 284 285 ret = request_irq(wl->irq, wl1251_irq, 0, DRIVER_NAME, wl); 285 286 if (ret < 0) { 286 287 wl1251_error("request_irq() failed: %d", ret); ··· 289 288 } 290 289 291 290 irq_set_irq_type(wl->irq, IRQ_TYPE_EDGE_RISING); 292 - 293 - disable_irq(wl->irq); 294 291 295 292 ret = wl1251_init_ieee80211(wl); 296 293 if (ret)
+2
drivers/net/wireless/ti/wlcore/acx.c
··· 1715 1715 1716 1716 } 1717 1717 1718 + #ifdef CONFIG_PM 1718 1719 /* Set the global behaviour of RX filters - On/Off + default action */ 1719 1720 int wl1271_acx_default_rx_filter_enable(struct wl1271 *wl, bool enable, 1720 1721 enum rx_filter_action action) ··· 1795 1794 kfree(acx); 1796 1795 return ret; 1797 1796 } 1797 + #endif /* CONFIG_PM */
+3 -1
drivers/net/wireless/ti/wlcore/acx.h
··· 1330 1330 int wl1271_acx_fm_coex(struct wl1271 *wl); 1331 1331 int wl12xx_acx_set_rate_mgmt_params(struct wl1271 *wl); 1332 1332 int wl12xx_acx_config_hangover(struct wl1271 *wl); 1333 + 1334 + #ifdef CONFIG_PM 1333 1335 int wl1271_acx_default_rx_filter_enable(struct wl1271 *wl, bool enable, 1334 1336 enum rx_filter_action action); 1335 1337 int wl1271_acx_set_rx_filter(struct wl1271 *wl, u8 index, bool enable, 1336 1338 struct wl12xx_rx_filter *filter); 1337 - 1339 + #endif /* CONFIG_PM */ 1338 1340 #endif /* __WL1271_ACX_H__ */
+2
drivers/net/wireless/ti/wlcore/rx.c
··· 279 279 wl12xx_rearm_rx_streaming(wl, active_hlids); 280 280 } 281 281 282 + #ifdef CONFIG_PM 282 283 int wl1271_rx_filter_enable(struct wl1271 *wl, 283 284 int index, bool enable, 284 285 struct wl12xx_rx_filter *filter) ··· 315 314 wl1271_rx_filter_enable(wl, i, 0, NULL); 316 315 } 317 316 } 317 + #endif /* CONFIG_PM */
+1 -1
drivers/nfc/pn544_hci.c
··· 232 232 233 233 static int check_crc(u8 *buf, int buflen) 234 234 { 235 - u8 len; 235 + int len; 236 236 u16 crc; 237 237 238 238 len = buf[0] + 1;
+2 -1
net/mac80211/mlme.c
··· 1522 1522 * anymore. The timeout will be reset if the frame is ACKed by 1523 1523 * the AP. 1524 1524 */ 1525 + ifmgd->probe_send_count++; 1526 + 1525 1527 if (sdata->local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) { 1526 1528 ifmgd->nullfunc_failed = false; 1527 1529 ieee80211_send_nullfunc(sdata->local, sdata, 0); ··· 1540 1538 0, (u32) -1, true, false); 1541 1539 } 1542 1540 1543 - ifmgd->probe_send_count++; 1544 1541 ifmgd->probe_timeout = jiffies + msecs_to_jiffies(probe_wait_ms); 1545 1542 run_again(ifmgd, ifmgd->probe_timeout); 1546 1543 if (sdata->local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
+1 -1
net/mac80211/tx.c
··· 153 153 154 154 /* Don't calculate ACKs for QoS Frames with NoAck Policy set */ 155 155 if (ieee80211_is_data_qos(hdr->frame_control) && 156 - *(ieee80211_get_qos_ctl(hdr)) | IEEE80211_QOS_CTL_ACK_POLICY_NOACK) 156 + *(ieee80211_get_qos_ctl(hdr)) & IEEE80211_QOS_CTL_ACK_POLICY_NOACK) 157 157 dur = 0; 158 158 else 159 159 /* Time needed to transmit ACK
+6 -6
net/mac80211/util.c
··· 1371 1371 } 1372 1372 } 1373 1373 1374 + /* add back keys */ 1375 + list_for_each_entry(sdata, &local->interfaces, list) 1376 + if (ieee80211_sdata_running(sdata)) 1377 + ieee80211_enable_keys(sdata); 1378 + 1379 + wake_up: 1374 1380 /* 1375 1381 * Clear the WLAN_STA_BLOCK_BA flag so new aggregation 1376 1382 * sessions can be established after a resume. ··· 1398 1392 mutex_unlock(&local->sta_mtx); 1399 1393 } 1400 1394 1401 - /* add back keys */ 1402 - list_for_each_entry(sdata, &local->interfaces, list) 1403 - if (ieee80211_sdata_running(sdata)) 1404 - ieee80211_enable_keys(sdata); 1405 - 1406 - wake_up: 1407 1395 ieee80211_wake_queues_by_reason(hw, 1408 1396 IEEE80211_QUEUE_STOP_REASON_SUSPEND); 1409 1397