diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-14 11:36:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-14 11:36:15 -0500 |
commit | 4a24eef671614aea479eac6c9ce5fa2cf590ee76 (patch) | |
tree | 4861f88217c3468cdeae74ad427a4129220e45f2 /drivers/net | |
parent | 4f374425b625d48445e370f63c896283eb2a9bae (diff) | |
parent | cd65c3c7d1081290b7365897c2290a84aa967d4d (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits)
net: fix build erros with CONFIG_BUG=n, CONFIG_GENERIC_BUG=n
ipv6: skb_dst() can be NULL in ipv6_hop_jumbo().
tg3: Update copyright and driver version
tg3: Disable 5717 serdes and B0 support
tg3: Add reliable serdes detection for 5717 A0
tg3: Fix std rx prod ring handling
tg3: Fix std prod ring nicaddr for 5787 and 57765
sfc: Fix conditions for MDIO self-test
sfc: Fix polling for slow MCDI operations
e1000e: workaround link issues on busy hub in half duplex on 82577/82578
e1000e: MDIO slow mode should always be done for 82577
ixgbe: update copyright dates
ixgbe: Do not attempt to perform interrupts in netpoll when down
cfg80211: fix refcount imbalance when wext is disabled
mac80211: fix queue selection for data frames on monitor interfaces
iwlwifi: silence buffer overflow warning
iwlwifi: disable tx on beacon update notification
iwlwifi: fix iwl_queue_used bug when read_ptr == write_ptr
mac80211: fix endian error
mac80211: add missing sanity checks for action frames
...
Diffstat (limited to 'drivers/net')
40 files changed, 226 insertions, 165 deletions
diff --git a/drivers/net/e1000e/e1000.h b/drivers/net/e1000e/e1000.h index cebbd9079d53..d6ee28f6ea08 100644 --- a/drivers/net/e1000e/e1000.h +++ b/drivers/net/e1000e/e1000.h | |||
@@ -582,7 +582,6 @@ extern s32 e1000_read_phy_reg_hv_locked(struct e1000_hw *hw, u32 offset, | |||
582 | extern s32 e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data); | 582 | extern s32 e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data); |
583 | extern s32 e1000_write_phy_reg_hv_locked(struct e1000_hw *hw, u32 offset, | 583 | extern s32 e1000_write_phy_reg_hv_locked(struct e1000_hw *hw, u32 offset, |
584 | u16 data); | 584 | u16 data); |
585 | extern s32 e1000_set_mdio_slow_mode_hv(struct e1000_hw *hw, bool slow); | ||
586 | extern s32 e1000_link_stall_workaround_hv(struct e1000_hw *hw); | 585 | extern s32 e1000_link_stall_workaround_hv(struct e1000_hw *hw); |
587 | extern s32 e1000_copper_link_setup_82577(struct e1000_hw *hw); | 586 | extern s32 e1000_copper_link_setup_82577(struct e1000_hw *hw); |
588 | extern s32 e1000_check_polarity_82577(struct e1000_hw *hw); | 587 | extern s32 e1000_check_polarity_82577(struct e1000_hw *hw); |
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c index ad08cf3f40c0..8b6ecd127889 100644 --- a/drivers/net/e1000e/ich8lan.c +++ b/drivers/net/e1000e/ich8lan.c | |||
@@ -138,6 +138,10 @@ | |||
138 | #define E1000_NVM_K1_CONFIG 0x1B /* NVM K1 Config Word */ | 138 | #define E1000_NVM_K1_CONFIG 0x1B /* NVM K1 Config Word */ |
139 | #define E1000_NVM_K1_ENABLE 0x1 /* NVM Enable K1 bit */ | 139 | #define E1000_NVM_K1_ENABLE 0x1 /* NVM Enable K1 bit */ |
140 | 140 | ||
141 | /* KMRN Mode Control */ | ||
142 | #define HV_KMRN_MODE_CTRL PHY_REG(769, 16) | ||
143 | #define HV_KMRN_MDIO_SLOW 0x0400 | ||
144 | |||
141 | /* ICH GbE Flash Hardware Sequencing Flash Status Register bit breakdown */ | 145 | /* ICH GbE Flash Hardware Sequencing Flash Status Register bit breakdown */ |
142 | /* Offset 04h HSFSTS */ | 146 | /* Offset 04h HSFSTS */ |
143 | union ich8_hws_flash_status { | 147 | union ich8_hws_flash_status { |
@@ -219,6 +223,7 @@ static s32 e1000_set_lplu_state_pchlan(struct e1000_hw *hw, bool active); | |||
219 | static void e1000_power_down_phy_copper_ich8lan(struct e1000_hw *hw); | 223 | static void e1000_power_down_phy_copper_ich8lan(struct e1000_hw *hw); |
220 | static void e1000_lan_init_done_ich8lan(struct e1000_hw *hw); | 224 | static void e1000_lan_init_done_ich8lan(struct e1000_hw *hw); |
221 | static s32 e1000_k1_gig_workaround_hv(struct e1000_hw *hw, bool link); | 225 | static s32 e1000_k1_gig_workaround_hv(struct e1000_hw *hw, bool link); |
226 | static s32 e1000_set_mdio_slow_mode_hv(struct e1000_hw *hw); | ||
222 | 227 | ||
223 | static inline u16 __er16flash(struct e1000_hw *hw, unsigned long reg) | 228 | static inline u16 __er16flash(struct e1000_hw *hw, unsigned long reg) |
224 | { | 229 | { |
@@ -270,7 +275,21 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) | |||
270 | phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; | 275 | phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; |
271 | 276 | ||
272 | phy->id = e1000_phy_unknown; | 277 | phy->id = e1000_phy_unknown; |
273 | e1000e_get_phy_id(hw); | 278 | ret_val = e1000e_get_phy_id(hw); |
279 | if (ret_val) | ||
280 | goto out; | ||
281 | if ((phy->id == 0) || (phy->id == PHY_REVISION_MASK)) { | ||
282 | /* | ||
283 | * In case the PHY needs to be in mdio slow mode (eg. 82577), | ||
284 | * set slow mode and try to get the PHY id again. | ||
285 | */ | ||
286 | ret_val = e1000_set_mdio_slow_mode_hv(hw); | ||
287 | if (ret_val) | ||
288 | goto out; | ||
289 | ret_val = e1000e_get_phy_id(hw); | ||
290 | if (ret_val) | ||
291 | goto out; | ||
292 | } | ||
274 | phy->type = e1000e_get_phy_type_from_id(phy->id); | 293 | phy->type = e1000e_get_phy_type_from_id(phy->id); |
275 | 294 | ||
276 | switch (phy->type) { | 295 | switch (phy->type) { |
@@ -292,6 +311,7 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) | |||
292 | break; | 311 | break; |
293 | } | 312 | } |
294 | 313 | ||
314 | out: | ||
295 | return ret_val; | 315 | return ret_val; |
296 | } | 316 | } |
297 | 317 | ||
@@ -1076,16 +1096,44 @@ out: | |||
1076 | 1096 | ||
1077 | 1097 | ||
1078 | /** | 1098 | /** |
1099 | * e1000_set_mdio_slow_mode_hv - Set slow MDIO access mode | ||
1100 | * @hw: pointer to the HW structure | ||
1101 | **/ | ||
1102 | static s32 e1000_set_mdio_slow_mode_hv(struct e1000_hw *hw) | ||
1103 | { | ||
1104 | s32 ret_val; | ||
1105 | u16 data; | ||
1106 | |||
1107 | ret_val = e1e_rphy(hw, HV_KMRN_MODE_CTRL, &data); | ||
1108 | if (ret_val) | ||
1109 | return ret_val; | ||
1110 | |||
1111 | data |= HV_KMRN_MDIO_SLOW; | ||
1112 | |||
1113 | ret_val = e1e_wphy(hw, HV_KMRN_MODE_CTRL, data); | ||
1114 | |||
1115 | return ret_val; | ||
1116 | } | ||
1117 | |||
1118 | /** | ||
1079 | * e1000_hv_phy_workarounds_ich8lan - A series of Phy workarounds to be | 1119 | * e1000_hv_phy_workarounds_ich8lan - A series of Phy workarounds to be |
1080 | * done after every PHY reset. | 1120 | * done after every PHY reset. |
1081 | **/ | 1121 | **/ |
1082 | static s32 e1000_hv_phy_workarounds_ich8lan(struct e1000_hw *hw) | 1122 | static s32 e1000_hv_phy_workarounds_ich8lan(struct e1000_hw *hw) |
1083 | { | 1123 | { |
1084 | s32 ret_val = 0; | 1124 | s32 ret_val = 0; |
1125 | u16 phy_data; | ||
1085 | 1126 | ||
1086 | if (hw->mac.type != e1000_pchlan) | 1127 | if (hw->mac.type != e1000_pchlan) |
1087 | return ret_val; | 1128 | return ret_val; |
1088 | 1129 | ||
1130 | /* Set MDIO slow mode before any other MDIO access */ | ||
1131 | if (hw->phy.type == e1000_phy_82577) { | ||
1132 | ret_val = e1000_set_mdio_slow_mode_hv(hw); | ||
1133 | if (ret_val) | ||
1134 | goto out; | ||
1135 | } | ||
1136 | |||
1089 | if (((hw->phy.type == e1000_phy_82577) && | 1137 | if (((hw->phy.type == e1000_phy_82577) && |
1090 | ((hw->phy.revision == 1) || (hw->phy.revision == 2))) || | 1138 | ((hw->phy.revision == 1) || (hw->phy.revision == 2))) || |
1091 | ((hw->phy.type == e1000_phy_82578) && (hw->phy.revision == 1))) { | 1139 | ((hw->phy.type == e1000_phy_82578) && (hw->phy.revision == 1))) { |
@@ -1118,16 +1166,32 @@ static s32 e1000_hv_phy_workarounds_ich8lan(struct e1000_hw *hw) | |||
1118 | 1166 | ||
1119 | hw->phy.addr = 1; | 1167 | hw->phy.addr = 1; |
1120 | ret_val = e1000e_write_phy_reg_mdic(hw, IGP01E1000_PHY_PAGE_SELECT, 0); | 1168 | ret_val = e1000e_write_phy_reg_mdic(hw, IGP01E1000_PHY_PAGE_SELECT, 0); |
1169 | hw->phy.ops.release(hw); | ||
1121 | if (ret_val) | 1170 | if (ret_val) |
1122 | goto out; | 1171 | goto out; |
1123 | hw->phy.ops.release(hw); | ||
1124 | 1172 | ||
1125 | /* | 1173 | /* |
1126 | * Configure the K1 Si workaround during phy reset assuming there is | 1174 | * Configure the K1 Si workaround during phy reset assuming there is |
1127 | * link so that it disables K1 if link is in 1Gbps. | 1175 | * link so that it disables K1 if link is in 1Gbps. |
1128 | */ | 1176 | */ |
1129 | ret_val = e1000_k1_gig_workaround_hv(hw, true); | 1177 | ret_val = e1000_k1_gig_workaround_hv(hw, true); |
1178 | if (ret_val) | ||
1179 | goto out; | ||
1130 | 1180 | ||
1181 | /* Workaround for link disconnects on a busy hub in half duplex */ | ||
1182 | ret_val = hw->phy.ops.acquire(hw); | ||
1183 | if (ret_val) | ||
1184 | goto out; | ||
1185 | ret_val = hw->phy.ops.read_reg_locked(hw, | ||
1186 | PHY_REG(BM_PORT_CTRL_PAGE, 17), | ||
1187 | &phy_data); | ||
1188 | if (ret_val) | ||
1189 | goto release; | ||
1190 | ret_val = hw->phy.ops.write_reg_locked(hw, | ||
1191 | PHY_REG(BM_PORT_CTRL_PAGE, 17), | ||
1192 | phy_data & 0x00FF); | ||
1193 | release: | ||
1194 | hw->phy.ops.release(hw); | ||
1131 | out: | 1195 | out: |
1132 | return ret_val; | 1196 | return ret_val; |
1133 | } | 1197 | } |
@@ -1184,6 +1248,7 @@ static s32 e1000_phy_hw_reset_ich8lan(struct e1000_hw *hw) | |||
1184 | /* Allow time for h/w to get to a quiescent state after reset */ | 1248 | /* Allow time for h/w to get to a quiescent state after reset */ |
1185 | mdelay(10); | 1249 | mdelay(10); |
1186 | 1250 | ||
1251 | /* Perform any necessary post-reset workarounds */ | ||
1187 | if (hw->mac.type == e1000_pchlan) { | 1252 | if (hw->mac.type == e1000_pchlan) { |
1188 | ret_val = e1000_hv_phy_workarounds_ich8lan(hw); | 1253 | ret_val = e1000_hv_phy_workarounds_ich8lan(hw); |
1189 | if (ret_val) | 1254 | if (ret_val) |
@@ -2484,6 +2549,10 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) | |||
2484 | if (!ret_val) | 2549 | if (!ret_val) |
2485 | e1000_release_swflag_ich8lan(hw); | 2550 | e1000_release_swflag_ich8lan(hw); |
2486 | 2551 | ||
2552 | /* Perform any necessary post-reset workarounds */ | ||
2553 | if (hw->mac.type == e1000_pchlan) | ||
2554 | ret_val = e1000_hv_phy_workarounds_ich8lan(hw); | ||
2555 | |||
2487 | if (ctrl & E1000_CTRL_PHY_RST) | 2556 | if (ctrl & E1000_CTRL_PHY_RST) |
2488 | ret_val = hw->phy.ops.get_cfg_done(hw); | 2557 | ret_val = hw->phy.ops.get_cfg_done(hw); |
2489 | 2558 | ||
@@ -2528,9 +2597,6 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw) | |||
2528 | kab |= E1000_KABGTXD_BGSQLBIAS; | 2597 | kab |= E1000_KABGTXD_BGSQLBIAS; |
2529 | ew32(KABGTXD, kab); | 2598 | ew32(KABGTXD, kab); |
2530 | 2599 | ||
2531 | if (hw->mac.type == e1000_pchlan) | ||
2532 | ret_val = e1000_hv_phy_workarounds_ich8lan(hw); | ||
2533 | |||
2534 | out: | 2600 | out: |
2535 | return ret_val; | 2601 | return ret_val; |
2536 | } | 2602 | } |
diff --git a/drivers/net/e1000e/phy.c b/drivers/net/e1000e/phy.c index 55a2c0acfee7..7f3ceb9dad6a 100644 --- a/drivers/net/e1000e/phy.c +++ b/drivers/net/e1000e/phy.c | |||
@@ -152,32 +152,9 @@ s32 e1000e_get_phy_id(struct e1000_hw *hw) | |||
152 | if (phy->id != 0 && phy->id != PHY_REVISION_MASK) | 152 | if (phy->id != 0 && phy->id != PHY_REVISION_MASK) |
153 | goto out; | 153 | goto out; |
154 | 154 | ||
155 | /* | ||
156 | * If the PHY ID is still unknown, we may have an 82577 | ||
157 | * without link. We will try again after setting Slow MDIC | ||
158 | * mode. No harm in trying again in this case since the PHY | ||
159 | * ID is unknown at this point anyway. | ||
160 | */ | ||
161 | ret_val = phy->ops.acquire(hw); | ||
162 | if (ret_val) | ||
163 | goto out; | ||
164 | ret_val = e1000_set_mdio_slow_mode_hv(hw, true); | ||
165 | if (ret_val) | ||
166 | goto out; | ||
167 | phy->ops.release(hw); | ||
168 | |||
169 | retry_count++; | 155 | retry_count++; |
170 | } | 156 | } |
171 | out: | 157 | out: |
172 | /* Revert to MDIO fast mode, if applicable */ | ||
173 | if (retry_count) { | ||
174 | ret_val = phy->ops.acquire(hw); | ||
175 | if (ret_val) | ||
176 | return ret_val; | ||
177 | ret_val = e1000_set_mdio_slow_mode_hv(hw, false); | ||
178 | phy->ops.release(hw); | ||
179 | } | ||
180 | |||
181 | return ret_val; | 158 | return ret_val; |
182 | } | 159 | } |
183 | 160 | ||
@@ -2791,38 +2768,6 @@ static s32 e1000_set_d0_lplu_state(struct e1000_hw *hw, bool active) | |||
2791 | } | 2768 | } |
2792 | 2769 | ||
2793 | /** | 2770 | /** |
2794 | * e1000_set_mdio_slow_mode_hv - Set slow MDIO access mode | ||
2795 | * @hw: pointer to the HW structure | ||
2796 | * @slow: true for slow mode, false for normal mode | ||
2797 | * | ||
2798 | * Assumes semaphore already acquired. | ||
2799 | **/ | ||
2800 | s32 e1000_set_mdio_slow_mode_hv(struct e1000_hw *hw, bool slow) | ||
2801 | { | ||
2802 | s32 ret_val = 0; | ||
2803 | u16 data = 0; | ||
2804 | |||
2805 | /* Set MDIO mode - page 769, register 16: 0x2580==slow, 0x2180==fast */ | ||
2806 | hw->phy.addr = 1; | ||
2807 | ret_val = e1000e_write_phy_reg_mdic(hw, IGP01E1000_PHY_PAGE_SELECT, | ||
2808 | (BM_PORT_CTRL_PAGE << IGP_PAGE_SHIFT)); | ||
2809 | if (ret_val) | ||
2810 | goto out; | ||
2811 | |||
2812 | ret_val = e1000e_write_phy_reg_mdic(hw, BM_CS_CTRL1, | ||
2813 | (0x2180 | (slow << 10))); | ||
2814 | if (ret_val) | ||
2815 | goto out; | ||
2816 | |||
2817 | /* dummy read when reverting to fast mode - throw away result */ | ||
2818 | if (!slow) | ||
2819 | ret_val = e1000e_read_phy_reg_mdic(hw, BM_CS_CTRL1, &data); | ||
2820 | |||
2821 | out: | ||
2822 | return ret_val; | ||
2823 | } | ||
2824 | |||
2825 | /** | ||
2826 | * __e1000_read_phy_reg_hv - Read HV PHY register | 2771 | * __e1000_read_phy_reg_hv - Read HV PHY register |
2827 | * @hw: pointer to the HW structure | 2772 | * @hw: pointer to the HW structure |
2828 | * @offset: register offset to be read | 2773 | * @offset: register offset to be read |
@@ -2839,7 +2784,6 @@ static s32 __e1000_read_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 *data, | |||
2839 | s32 ret_val; | 2784 | s32 ret_val; |
2840 | u16 page = BM_PHY_REG_PAGE(offset); | 2785 | u16 page = BM_PHY_REG_PAGE(offset); |
2841 | u16 reg = BM_PHY_REG_NUM(offset); | 2786 | u16 reg = BM_PHY_REG_NUM(offset); |
2842 | bool in_slow_mode = false; | ||
2843 | 2787 | ||
2844 | if (!locked) { | 2788 | if (!locked) { |
2845 | ret_val = hw->phy.ops.acquire(hw); | 2789 | ret_val = hw->phy.ops.acquire(hw); |
@@ -2847,16 +2791,6 @@ static s32 __e1000_read_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 *data, | |||
2847 | return ret_val; | 2791 | return ret_val; |
2848 | } | 2792 | } |
2849 | 2793 | ||
2850 | /* Workaround failure in MDIO access while cable is disconnected */ | ||
2851 | if ((hw->phy.type == e1000_phy_82577) && | ||
2852 | !(er32(STATUS) & E1000_STATUS_LU)) { | ||
2853 | ret_val = e1000_set_mdio_slow_mode_hv(hw, true); | ||
2854 | if (ret_val) | ||
2855 | goto out; | ||
2856 | |||
2857 | in_slow_mode = true; | ||
2858 | } | ||
2859 | |||
2860 | /* Page 800 works differently than the rest so it has its own func */ | 2794 | /* Page 800 works differently than the rest so it has its own func */ |
2861 | if (page == BM_WUC_PAGE) { | 2795 | if (page == BM_WUC_PAGE) { |
2862 | ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, | 2796 | ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, |
@@ -2893,10 +2827,6 @@ static s32 __e1000_read_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 *data, | |||
2893 | ret_val = e1000e_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & reg, | 2827 | ret_val = e1000e_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & reg, |
2894 | data); | 2828 | data); |
2895 | out: | 2829 | out: |
2896 | /* Revert to MDIO fast mode, if applicable */ | ||
2897 | if ((hw->phy.type == e1000_phy_82577) && in_slow_mode) | ||
2898 | ret_val |= e1000_set_mdio_slow_mode_hv(hw, false); | ||
2899 | |||
2900 | if (!locked) | 2830 | if (!locked) |
2901 | hw->phy.ops.release(hw); | 2831 | hw->phy.ops.release(hw); |
2902 | 2832 | ||
@@ -2948,7 +2878,6 @@ static s32 __e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data, | |||
2948 | s32 ret_val; | 2878 | s32 ret_val; |
2949 | u16 page = BM_PHY_REG_PAGE(offset); | 2879 | u16 page = BM_PHY_REG_PAGE(offset); |
2950 | u16 reg = BM_PHY_REG_NUM(offset); | 2880 | u16 reg = BM_PHY_REG_NUM(offset); |
2951 | bool in_slow_mode = false; | ||
2952 | 2881 | ||
2953 | if (!locked) { | 2882 | if (!locked) { |
2954 | ret_val = hw->phy.ops.acquire(hw); | 2883 | ret_val = hw->phy.ops.acquire(hw); |
@@ -2956,16 +2885,6 @@ static s32 __e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data, | |||
2956 | return ret_val; | 2885 | return ret_val; |
2957 | } | 2886 | } |
2958 | 2887 | ||
2959 | /* Workaround failure in MDIO access while cable is disconnected */ | ||
2960 | if ((hw->phy.type == e1000_phy_82577) && | ||
2961 | !(er32(STATUS) & E1000_STATUS_LU)) { | ||
2962 | ret_val = e1000_set_mdio_slow_mode_hv(hw, true); | ||
2963 | if (ret_val) | ||
2964 | goto out; | ||
2965 | |||
2966 | in_slow_mode = true; | ||
2967 | } | ||
2968 | |||
2969 | /* Page 800 works differently than the rest so it has its own func */ | 2888 | /* Page 800 works differently than the rest so it has its own func */ |
2970 | if (page == BM_WUC_PAGE) { | 2889 | if (page == BM_WUC_PAGE) { |
2971 | ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, | 2890 | ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, |
@@ -3019,10 +2938,6 @@ static s32 __e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data, | |||
3019 | data); | 2938 | data); |
3020 | 2939 | ||
3021 | out: | 2940 | out: |
3022 | /* Revert to MDIO fast mode, if applicable */ | ||
3023 | if ((hw->phy.type == e1000_phy_82577) && in_slow_mode) | ||
3024 | ret_val |= e1000_set_mdio_slow_mode_hv(hw, false); | ||
3025 | |||
3026 | if (!locked) | 2941 | if (!locked) |
3027 | hw->phy.ops.release(hw); | 2942 | hw->phy.ops.release(hw); |
3028 | 2943 | ||
diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile index 21b41f42b61c..bfef0ebcba9a 100644 --- a/drivers/net/ixgbe/Makefile +++ b/drivers/net/ixgbe/Makefile | |||
@@ -1,7 +1,7 @@ | |||
1 | ################################################################################ | 1 | ################################################################################ |
2 | # | 2 | # |
3 | # Intel 10 Gigabit PCI Express Linux driver | 3 | # Intel 10 Gigabit PCI Express Linux driver |
4 | # Copyright(c) 1999 - 2009 Intel Corporation. | 4 | # Copyright(c) 1999 - 2010 Intel Corporation. |
5 | # | 5 | # |
6 | # This program is free software; you can redistribute it and/or modify it | 6 | # This program is free software; you can redistribute it and/or modify it |
7 | # under the terms and conditions of the GNU General Public License, | 7 | # under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index 8da8eb535084..303e7bd39b67 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c index 204177d78cec..3103f4165311 100644 --- a/drivers/net/ixgbe/ixgbe_82598.c +++ b/drivers/net/ixgbe/ixgbe_82598.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c index 538340527aa6..b49bd6b9feb7 100644 --- a/drivers/net/ixgbe/ixgbe_82599.c +++ b/drivers/net/ixgbe/ixgbe_82599.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c index 688b8ca5da32..21f158f79dd0 100644 --- a/drivers/net/ixgbe/ixgbe_common.c +++ b/drivers/net/ixgbe/ixgbe_common.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_common.h b/drivers/net/ixgbe/ixgbe_common.h index 27f3214bed2e..dfff0ffaa502 100644 --- a/drivers/net/ixgbe/ixgbe_common.h +++ b/drivers/net/ixgbe/ixgbe_common.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_dcb.c b/drivers/net/ixgbe/ixgbe_dcb.c index a1562287342f..9aea4f04bbd2 100644 --- a/drivers/net/ixgbe/ixgbe_dcb.c +++ b/drivers/net/ixgbe/ixgbe_dcb.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_dcb.h b/drivers/net/ixgbe/ixgbe_dcb.h index 64a9fa15c059..5caafd4afbc3 100644 --- a/drivers/net/ixgbe/ixgbe_dcb.h +++ b/drivers/net/ixgbe/ixgbe_dcb.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_dcb_82598.c b/drivers/net/ixgbe/ixgbe_dcb_82598.c index f30263898ebc..f0e9279d4669 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_82598.c +++ b/drivers/net/ixgbe/ixgbe_dcb_82598.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_dcb_82598.h b/drivers/net/ixgbe/ixgbe_dcb_82598.h index ebbe53c352a7..cc728fa092e2 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_82598.h +++ b/drivers/net/ixgbe/ixgbe_dcb_82598.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_dcb_82599.c b/drivers/net/ixgbe/ixgbe_dcb_82599.c index ec8a252636d3..4f7a26ab411e 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_82599.c +++ b/drivers/net/ixgbe/ixgbe_dcb_82599.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_dcb_82599.h b/drivers/net/ixgbe/ixgbe_dcb_82599.h index 9e5e2827e4af..0f3f791e1e1d 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_82599.h +++ b/drivers/net/ixgbe/ixgbe_dcb_82599.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c index 3c7a79a7d7c6..56f37f66b696 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 0bd49d3b9f65..d77961fc75f9 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_fcoe.c b/drivers/net/ixgbe/ixgbe_fcoe.c index da32a108a7b4..e9a20c88c155 100644 --- a/drivers/net/ixgbe/ixgbe_fcoe.c +++ b/drivers/net/ixgbe/ixgbe_fcoe.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_fcoe.h b/drivers/net/ixgbe/ixgbe_fcoe.h index de8ff53187da..abf4b2b3f252 100644 --- a/drivers/net/ixgbe/ixgbe_fcoe.h +++ b/drivers/net/ixgbe/ixgbe_fcoe.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 2ad754c864cf..9c9202f40b10 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -52,7 +52,7 @@ static const char ixgbe_driver_string[] = | |||
52 | 52 | ||
53 | #define DRV_VERSION "2.0.44-k2" | 53 | #define DRV_VERSION "2.0.44-k2" |
54 | const char ixgbe_driver_version[] = DRV_VERSION; | 54 | const char ixgbe_driver_version[] = DRV_VERSION; |
55 | static char ixgbe_copyright[] = "Copyright (c) 1999-2009 Intel Corporation."; | 55 | static char ixgbe_copyright[] = "Copyright (c) 1999-2010 Intel Corporation."; |
56 | 56 | ||
57 | static const struct ixgbe_info *ixgbe_info_tbl[] = { | 57 | static const struct ixgbe_info *ixgbe_info_tbl[] = { |
58 | [board_82598] = &ixgbe_82598_info, | 58 | [board_82598] = &ixgbe_82598_info, |
@@ -5576,6 +5576,10 @@ static void ixgbe_netpoll(struct net_device *netdev) | |||
5576 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 5576 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
5577 | int i; | 5577 | int i; |
5578 | 5578 | ||
5579 | /* if interface is down do nothing */ | ||
5580 | if (test_bit(__IXGBE_DOWN, &adapter->state)) | ||
5581 | return; | ||
5582 | |||
5579 | adapter->flags |= IXGBE_FLAG_IN_NETPOLL; | 5583 | adapter->flags |= IXGBE_FLAG_IN_NETPOLL; |
5580 | if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) { | 5584 | if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) { |
5581 | int num_q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS; | 5585 | int num_q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS; |
diff --git a/drivers/net/ixgbe/ixgbe_phy.c b/drivers/net/ixgbe/ixgbe_phy.c index 9ecad17522c3..1c1efd386956 100644 --- a/drivers/net/ixgbe/ixgbe_phy.c +++ b/drivers/net/ixgbe/ixgbe_phy.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_phy.h b/drivers/net/ixgbe/ixgbe_phy.h index 9b700f5bf1ed..9cf5f3b4cc5d 100644 --- a/drivers/net/ixgbe/ixgbe_phy.h +++ b/drivers/net/ixgbe/ixgbe_phy.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h index 84650c6ebe03..9eafddfa1b97 100644 --- a/drivers/net/ixgbe/ixgbe_type.h +++ b/drivers/net/ixgbe/ixgbe_type.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/sfc/mcdi.c b/drivers/net/sfc/mcdi.c index 683353b904c7..0d4eba7266ec 100644 --- a/drivers/net/sfc/mcdi.c +++ b/drivers/net/sfc/mcdi.c | |||
@@ -142,8 +142,9 @@ static int efx_mcdi_poll(struct efx_nic *efx) | |||
142 | if (spins != 0) { | 142 | if (spins != 0) { |
143 | --spins; | 143 | --spins; |
144 | udelay(1); | 144 | udelay(1); |
145 | } else | 145 | } else { |
146 | schedule(); | 146 | schedule_timeout_uninterruptible(1); |
147 | } | ||
147 | 148 | ||
148 | time = get_seconds(); | 149 | time = get_seconds(); |
149 | 150 | ||
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c index af3933579790..250c8827b842 100644 --- a/drivers/net/sfc/selftest.c +++ b/drivers/net/sfc/selftest.c | |||
@@ -79,10 +79,14 @@ struct efx_loopback_state { | |||
79 | static int efx_test_mdio(struct efx_nic *efx, struct efx_self_tests *tests) | 79 | static int efx_test_mdio(struct efx_nic *efx, struct efx_self_tests *tests) |
80 | { | 80 | { |
81 | int rc = 0; | 81 | int rc = 0; |
82 | int devad = __ffs(efx->mdio.mmds); | 82 | int devad; |
83 | u16 physid1, physid2; | 83 | u16 physid1, physid2; |
84 | 84 | ||
85 | if (efx->phy_type == PHY_TYPE_NONE) | 85 | if (efx->mdio.mode_support & MDIO_SUPPORTS_C45) |
86 | devad = __ffs(efx->mdio.mmds); | ||
87 | else if (efx->mdio.mode_support & MDIO_SUPPORTS_C22) | ||
88 | devad = MDIO_DEVAD_NONE; | ||
89 | else | ||
86 | return 0; | 90 | return 0; |
87 | 91 | ||
88 | mutex_lock(&efx->mac_lock); | 92 | mutex_lock(&efx->mac_lock); |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 3a74d2168598..7f82b0238e08 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com) | 4 | * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com) |
5 | * Copyright (C) 2001, 2002, 2003 Jeff Garzik (jgarzik@pobox.com) | 5 | * Copyright (C) 2001, 2002, 2003 Jeff Garzik (jgarzik@pobox.com) |
6 | * Copyright (C) 2004 Sun Microsystems Inc. | 6 | * Copyright (C) 2004 Sun Microsystems Inc. |
7 | * Copyright (C) 2005-2009 Broadcom Corporation. | 7 | * Copyright (C) 2005-2010 Broadcom Corporation. |
8 | * | 8 | * |
9 | * Firmware is: | 9 | * Firmware is: |
10 | * Derived from proprietary unpublished source code, | 10 | * Derived from proprietary unpublished source code, |
@@ -68,8 +68,8 @@ | |||
68 | 68 | ||
69 | #define DRV_MODULE_NAME "tg3" | 69 | #define DRV_MODULE_NAME "tg3" |
70 | #define PFX DRV_MODULE_NAME ": " | 70 | #define PFX DRV_MODULE_NAME ": " |
71 | #define DRV_MODULE_VERSION "3.105" | 71 | #define DRV_MODULE_VERSION "3.106" |
72 | #define DRV_MODULE_RELDATE "December 2, 2009" | 72 | #define DRV_MODULE_RELDATE "January 12, 2010" |
73 | 73 | ||
74 | #define TG3_DEF_MAC_MODE 0 | 74 | #define TG3_DEF_MAC_MODE 0 |
75 | #define TG3_DEF_RX_MODE 0 | 75 | #define TG3_DEF_RX_MODE 0 |
@@ -1037,7 +1037,11 @@ static void tg3_mdio_start(struct tg3 *tp) | |||
1037 | else | 1037 | else |
1038 | tp->phy_addr = 1; | 1038 | tp->phy_addr = 1; |
1039 | 1039 | ||
1040 | is_serdes = tr32(SG_DIG_STATUS) & SG_DIG_IS_SERDES; | 1040 | if (tp->pci_chip_rev_id != CHIPREV_ID_5717_A0) |
1041 | is_serdes = tr32(SG_DIG_STATUS) & SG_DIG_IS_SERDES; | ||
1042 | else | ||
1043 | is_serdes = tr32(TG3_CPMU_PHY_STRAP) & | ||
1044 | TG3_CPMU_PHY_STRAP_IS_SERDES; | ||
1041 | if (is_serdes) | 1045 | if (is_serdes) |
1042 | tp->phy_addr += 7; | 1046 | tp->phy_addr += 7; |
1043 | } else | 1047 | } else |
@@ -4693,8 +4697,9 @@ next_pkt: | |||
4693 | (*post_ptr)++; | 4697 | (*post_ptr)++; |
4694 | 4698 | ||
4695 | if (unlikely(rx_std_posted >= tp->rx_std_max_post)) { | 4699 | if (unlikely(rx_std_posted >= tp->rx_std_max_post)) { |
4696 | u32 idx = *post_ptr % TG3_RX_RING_SIZE; | 4700 | tpr->rx_std_prod_idx = std_prod_idx % TG3_RX_RING_SIZE; |
4697 | tw32_rx_mbox(TG3_RX_STD_PROD_IDX_REG, idx); | 4701 | tw32_rx_mbox(TG3_RX_STD_PROD_IDX_REG, |
4702 | tpr->rx_std_prod_idx); | ||
4698 | work_mask &= ~RXD_OPAQUE_RING_STD; | 4703 | work_mask &= ~RXD_OPAQUE_RING_STD; |
4699 | rx_std_posted = 0; | 4704 | rx_std_posted = 0; |
4700 | } | 4705 | } |
@@ -7742,7 +7747,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) | |||
7742 | ((u64) tpr->rx_std_mapping >> 32)); | 7747 | ((u64) tpr->rx_std_mapping >> 32)); |
7743 | tw32(RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW, | 7748 | tw32(RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW, |
7744 | ((u64) tpr->rx_std_mapping & 0xffffffff)); | 7749 | ((u64) tpr->rx_std_mapping & 0xffffffff)); |
7745 | if (!(tp->tg3_flags3 & TG3_FLG3_5755_PLUS)) | 7750 | if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5717) |
7746 | tw32(RCVDBDI_STD_BD + TG3_BDINFO_NIC_ADDR, | 7751 | tw32(RCVDBDI_STD_BD + TG3_BDINFO_NIC_ADDR, |
7747 | NIC_SRAM_RX_BUFFER_DESC); | 7752 | NIC_SRAM_RX_BUFFER_DESC); |
7748 | 7753 | ||
@@ -12122,7 +12127,8 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp) | |||
12122 | 12127 | ||
12123 | tp->phy_id = eeprom_phy_id; | 12128 | tp->phy_id = eeprom_phy_id; |
12124 | if (eeprom_phy_serdes) { | 12129 | if (eeprom_phy_serdes) { |
12125 | if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) | 12130 | if ((tp->tg3_flags2 & TG3_FLG2_5780_CLASS) || |
12131 | GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717) | ||
12126 | tp->tg3_flags2 |= TG3_FLG2_MII_SERDES; | 12132 | tp->tg3_flags2 |= TG3_FLG2_MII_SERDES; |
12127 | else | 12133 | else |
12128 | tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES; | 12134 | tp->tg3_flags2 |= TG3_FLG2_PHY_SERDES; |
@@ -13384,6 +13390,11 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
13384 | if (err) | 13390 | if (err) |
13385 | return err; | 13391 | return err; |
13386 | 13392 | ||
13393 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5717 && | ||
13394 | (tp->pci_chip_rev_id != CHIPREV_ID_5717_A0 || | ||
13395 | (tp->tg3_flags2 & TG3_FLG2_MII_SERDES))) | ||
13396 | return -ENOTSUPP; | ||
13397 | |||
13387 | /* Initialize data/descriptor byte/word swapping. */ | 13398 | /* Initialize data/descriptor byte/word swapping. */ |
13388 | val = tr32(GRC_MODE); | 13399 | val = tr32(GRC_MODE); |
13389 | val &= GRC_MODE_HOST_STACKUP; | 13400 | val &= GRC_MODE_HOST_STACKUP; |
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index cd30889650f8..8a167912902b 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -4,6 +4,7 @@ | |||
4 | * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com) | 4 | * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com) |
5 | * Copyright (C) 2001 Jeff Garzik (jgarzik@pobox.com) | 5 | * Copyright (C) 2001 Jeff Garzik (jgarzik@pobox.com) |
6 | * Copyright (C) 2004 Sun Microsystems Inc. | 6 | * Copyright (C) 2004 Sun Microsystems Inc. |
7 | * Copyright (C) 2007-2010 Broadcom Corporation. | ||
7 | */ | 8 | */ |
8 | 9 | ||
9 | #ifndef _T3_H | 10 | #ifndef _T3_H |
@@ -1054,6 +1055,8 @@ | |||
1054 | #define CPMU_MUTEX_REQ_DRIVER 0x00001000 | 1055 | #define CPMU_MUTEX_REQ_DRIVER 0x00001000 |
1055 | #define TG3_CPMU_MUTEX_GNT 0x00003660 | 1056 | #define TG3_CPMU_MUTEX_GNT 0x00003660 |
1056 | #define CPMU_MUTEX_GNT_DRIVER 0x00001000 | 1057 | #define CPMU_MUTEX_GNT_DRIVER 0x00001000 |
1058 | #define TG3_CPMU_PHY_STRAP 0x00003664 | ||
1059 | #define TG3_CPMU_PHY_STRAP_IS_SERDES 0x00000020 | ||
1057 | /* 0x3664 --> 0x3800 unused */ | 1060 | /* 0x3664 --> 0x3800 unused */ |
1058 | 1061 | ||
1059 | /* Mbuf cluster free registers */ | 1062 | /* Mbuf cluster free registers */ |
diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c b/drivers/net/wireless/ath/ath5k/eeprom.c index 5d1c8677f180..6a3f4da7fb48 100644 --- a/drivers/net/wireless/ath/ath5k/eeprom.c +++ b/drivers/net/wireless/ath/ath5k/eeprom.c | |||
@@ -97,7 +97,7 @@ ath5k_eeprom_init_header(struct ath5k_hw *ah) | |||
97 | struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom; | 97 | struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom; |
98 | int ret; | 98 | int ret; |
99 | u16 val; | 99 | u16 val; |
100 | u32 cksum, offset; | 100 | u32 cksum, offset, eep_max = AR5K_EEPROM_INFO_MAX; |
101 | 101 | ||
102 | /* | 102 | /* |
103 | * Read values from EEPROM and store them in the capability structure | 103 | * Read values from EEPROM and store them in the capability structure |
@@ -116,12 +116,38 @@ ath5k_eeprom_init_header(struct ath5k_hw *ah) | |||
116 | * Validate the checksum of the EEPROM date. There are some | 116 | * Validate the checksum of the EEPROM date. There are some |
117 | * devices with invalid EEPROMs. | 117 | * devices with invalid EEPROMs. |
118 | */ | 118 | */ |
119 | for (cksum = 0, offset = 0; offset < AR5K_EEPROM_INFO_MAX; offset++) { | 119 | AR5K_EEPROM_READ(AR5K_EEPROM_SIZE_UPPER, val); |
120 | if (val) { | ||
121 | eep_max = (val & AR5K_EEPROM_SIZE_UPPER_MASK) << | ||
122 | AR5K_EEPROM_SIZE_ENDLOC_SHIFT; | ||
123 | AR5K_EEPROM_READ(AR5K_EEPROM_SIZE_LOWER, val); | ||
124 | eep_max = (eep_max | val) - AR5K_EEPROM_INFO_BASE; | ||
125 | |||
126 | /* | ||
127 | * Fail safe check to prevent stupid loops due | ||
128 | * to busted EEPROMs. XXX: This value is likely too | ||
129 | * big still, waiting on a better value. | ||
130 | */ | ||
131 | if (eep_max > (3 * AR5K_EEPROM_INFO_MAX)) { | ||
132 | ATH5K_ERR(ah->ah_sc, "Invalid max custom EEPROM size: " | ||
133 | "%d (0x%04x) max expected: %d (0x%04x)\n", | ||
134 | eep_max, eep_max, | ||
135 | 3 * AR5K_EEPROM_INFO_MAX, | ||
136 | 3 * AR5K_EEPROM_INFO_MAX); | ||
137 | return -EIO; | ||
138 | } | ||
139 | } | ||
140 | |||
141 | for (cksum = 0, offset = 0; offset < eep_max; offset++) { | ||
120 | AR5K_EEPROM_READ(AR5K_EEPROM_INFO(offset), val); | 142 | AR5K_EEPROM_READ(AR5K_EEPROM_INFO(offset), val); |
121 | cksum ^= val; | 143 | cksum ^= val; |
122 | } | 144 | } |
123 | if (cksum != AR5K_EEPROM_INFO_CKSUM) { | 145 | if (cksum != AR5K_EEPROM_INFO_CKSUM) { |
124 | ATH5K_ERR(ah->ah_sc, "Invalid EEPROM checksum 0x%04x\n", cksum); | 146 | ATH5K_ERR(ah->ah_sc, "Invalid EEPROM " |
147 | "checksum: 0x%04x eep_max: 0x%04x (%s)\n", | ||
148 | cksum, eep_max, | ||
149 | eep_max == AR5K_EEPROM_INFO_MAX ? | ||
150 | "default size" : "custom size"); | ||
125 | return -EIO; | 151 | return -EIO; |
126 | } | 152 | } |
127 | 153 | ||
diff --git a/drivers/net/wireless/ath/ath5k/eeprom.h b/drivers/net/wireless/ath/ath5k/eeprom.h index 0123f3521a0b..473a483bb9c3 100644 --- a/drivers/net/wireless/ath/ath5k/eeprom.h +++ b/drivers/net/wireless/ath/ath5k/eeprom.h | |||
@@ -37,6 +37,14 @@ | |||
37 | #define AR5K_EEPROM_RFKILL_POLARITY_S 1 | 37 | #define AR5K_EEPROM_RFKILL_POLARITY_S 1 |
38 | 38 | ||
39 | #define AR5K_EEPROM_REG_DOMAIN 0x00bf /* EEPROM regdom */ | 39 | #define AR5K_EEPROM_REG_DOMAIN 0x00bf /* EEPROM regdom */ |
40 | |||
41 | /* FLASH(EEPROM) Defines for AR531X chips */ | ||
42 | #define AR5K_EEPROM_SIZE_LOWER 0x1b /* size info -- lower */ | ||
43 | #define AR5K_EEPROM_SIZE_UPPER 0x1c /* size info -- upper */ | ||
44 | #define AR5K_EEPROM_SIZE_UPPER_MASK 0xfff0 | ||
45 | #define AR5K_EEPROM_SIZE_UPPER_SHIFT 4 | ||
46 | #define AR5K_EEPROM_SIZE_ENDLOC_SHIFT 12 | ||
47 | |||
40 | #define AR5K_EEPROM_CHECKSUM 0x00c0 /* EEPROM checksum */ | 48 | #define AR5K_EEPROM_CHECKSUM 0x00c0 /* EEPROM checksum */ |
41 | #define AR5K_EEPROM_INFO_BASE 0x00c0 /* EEPROM header */ | 49 | #define AR5K_EEPROM_INFO_BASE 0x00c0 /* EEPROM header */ |
42 | #define AR5K_EEPROM_INFO_MAX (0x400 - AR5K_EEPROM_INFO_BASE) | 50 | #define AR5K_EEPROM_INFO_MAX (0x400 - AR5K_EEPROM_INFO_BASE) |
diff --git a/drivers/net/wireless/ath/ath9k/Kconfig b/drivers/net/wireless/ath/ath9k/Kconfig index 03a1106ad725..5774cea23a3b 100644 --- a/drivers/net/wireless/ath/ath9k/Kconfig +++ b/drivers/net/wireless/ath/ath9k/Kconfig | |||
@@ -25,7 +25,7 @@ config ATH9K | |||
25 | 25 | ||
26 | config ATH9K_DEBUGFS | 26 | config ATH9K_DEBUGFS |
27 | bool "Atheros ath9k debugging" | 27 | bool "Atheros ath9k debugging" |
28 | depends on ATH9K | 28 | depends on ATH9K && DEBUG_FS |
29 | ---help--- | 29 | ---help--- |
30 | Say Y, if you need access to ath9k's statistics for | 30 | Say Y, if you need access to ath9k's statistics for |
31 | interrupts, rate control, etc. | 31 | interrupts, rate control, etc. |
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index e2cef2ff5d8f..1597a42731ed 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -33,11 +33,11 @@ struct ath_node; | |||
33 | 33 | ||
34 | /* Macro to expand scalars to 64-bit objects */ | 34 | /* Macro to expand scalars to 64-bit objects */ |
35 | 35 | ||
36 | #define ito64(x) (sizeof(x) == 8) ? \ | 36 | #define ito64(x) (sizeof(x) == 1) ? \ |
37 | (((unsigned long long int)(x)) & (0xff)) : \ | 37 | (((unsigned long long int)(x)) & (0xff)) : \ |
38 | (sizeof(x) == 16) ? \ | 38 | (sizeof(x) == 2) ? \ |
39 | (((unsigned long long int)(x)) & 0xffff) : \ | 39 | (((unsigned long long int)(x)) & 0xffff) : \ |
40 | ((sizeof(x) == 32) ? \ | 40 | ((sizeof(x) == 4) ? \ |
41 | (((unsigned long long int)(x)) & 0xffffffff) : \ | 41 | (((unsigned long long int)(x)) & 0xffffffff) : \ |
42 | (unsigned long long int)(x)) | 42 | (unsigned long long int)(x)) |
43 | 43 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 484c5fdf7c2a..9b4b8b5c7574 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -1961,7 +1961,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv, | |||
1961 | struct ieee80211_tx_info *info; | 1961 | struct ieee80211_tx_info *info; |
1962 | struct iwl4965_tx_resp *tx_resp = (void *)&pkt->u.raw[0]; | 1962 | struct iwl4965_tx_resp *tx_resp = (void *)&pkt->u.raw[0]; |
1963 | u32 status = le32_to_cpu(tx_resp->u.status); | 1963 | u32 status = le32_to_cpu(tx_resp->u.status); |
1964 | int tid = MAX_TID_COUNT; | 1964 | int uninitialized_var(tid); |
1965 | int sta_id; | 1965 | int sta_id; |
1966 | int freed; | 1966 | int freed; |
1967 | u8 *qc = NULL; | 1967 | u8 *qc = NULL; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 574d36658702..5461f105bd2d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -2344,6 +2344,21 @@ static void iwl_ht_conf(struct iwl_priv *priv, | |||
2344 | IWL_DEBUG_MAC80211(priv, "leave\n"); | 2344 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
2345 | } | 2345 | } |
2346 | 2346 | ||
2347 | static inline void iwl_set_no_assoc(struct iwl_priv *priv) | ||
2348 | { | ||
2349 | priv->assoc_id = 0; | ||
2350 | iwl_led_disassociate(priv); | ||
2351 | /* | ||
2352 | * inform the ucode that there is no longer an | ||
2353 | * association and that no more packets should be | ||
2354 | * sent | ||
2355 | */ | ||
2356 | priv->staging_rxon.filter_flags &= | ||
2357 | ~RXON_FILTER_ASSOC_MSK; | ||
2358 | priv->staging_rxon.assoc_id = 0; | ||
2359 | iwlcore_commit_rxon(priv); | ||
2360 | } | ||
2361 | |||
2347 | #define IWL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6) | 2362 | #define IWL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6) |
2348 | void iwl_bss_info_changed(struct ieee80211_hw *hw, | 2363 | void iwl_bss_info_changed(struct ieee80211_hw *hw, |
2349 | struct ieee80211_vif *vif, | 2364 | struct ieee80211_vif *vif, |
@@ -2475,20 +2490,8 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw, | |||
2475 | IWL_DELAY_NEXT_SCAN_AFTER_ASSOC; | 2490 | IWL_DELAY_NEXT_SCAN_AFTER_ASSOC; |
2476 | if (!iwl_is_rfkill(priv)) | 2491 | if (!iwl_is_rfkill(priv)) |
2477 | priv->cfg->ops->lib->post_associate(priv); | 2492 | priv->cfg->ops->lib->post_associate(priv); |
2478 | } else { | 2493 | } else |
2479 | priv->assoc_id = 0; | 2494 | iwl_set_no_assoc(priv); |
2480 | iwl_led_disassociate(priv); | ||
2481 | |||
2482 | /* | ||
2483 | * inform the ucode that there is no longer an | ||
2484 | * association and that no more packets should be | ||
2485 | * send | ||
2486 | */ | ||
2487 | priv->staging_rxon.filter_flags &= | ||
2488 | ~RXON_FILTER_ASSOC_MSK; | ||
2489 | priv->staging_rxon.assoc_id = 0; | ||
2490 | iwlcore_commit_rxon(priv); | ||
2491 | } | ||
2492 | } | 2495 | } |
2493 | 2496 | ||
2494 | if (changes && iwl_is_associated(priv) && priv->assoc_id) { | 2497 | if (changes && iwl_is_associated(priv) && priv->assoc_id) { |
@@ -2503,12 +2506,14 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw, | |||
2503 | } | 2506 | } |
2504 | } | 2507 | } |
2505 | 2508 | ||
2506 | if ((changes & BSS_CHANGED_BEACON_ENABLED) && | 2509 | if (changes & BSS_CHANGED_BEACON_ENABLED) { |
2507 | vif->bss_conf.enable_beacon) { | 2510 | if (vif->bss_conf.enable_beacon) { |
2508 | memcpy(priv->staging_rxon.bssid_addr, | 2511 | memcpy(priv->staging_rxon.bssid_addr, |
2509 | bss_conf->bssid, ETH_ALEN); | 2512 | bss_conf->bssid, ETH_ALEN); |
2510 | memcpy(priv->bssid, bss_conf->bssid, ETH_ALEN); | 2513 | memcpy(priv->bssid, bss_conf->bssid, ETH_ALEN); |
2511 | iwlcore_config_ap(priv); | 2514 | iwlcore_config_ap(priv); |
2515 | } else | ||
2516 | iwl_set_no_assoc(priv); | ||
2512 | } | 2517 | } |
2513 | 2518 | ||
2514 | mutex_unlock(&priv->mutex); | 2519 | mutex_unlock(&priv->mutex); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 165d1f6e2dd9..3822cf53e368 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -711,7 +711,7 @@ extern void iwl_txq_ctx_stop(struct iwl_priv *priv); | |||
711 | extern int iwl_queue_space(const struct iwl_queue *q); | 711 | extern int iwl_queue_space(const struct iwl_queue *q); |
712 | static inline int iwl_queue_used(const struct iwl_queue *q, int i) | 712 | static inline int iwl_queue_used(const struct iwl_queue *q, int i) |
713 | { | 713 | { |
714 | return q->write_ptr > q->read_ptr ? | 714 | return q->write_ptr >= q->read_ptr ? |
715 | (i >= q->read_ptr && i < q->write_ptr) : | 715 | (i >= q->read_ptr && i < q->write_ptr) : |
716 | !(i < q->read_ptr && i >= q->write_ptr); | 716 | !(i < q->read_ptr && i >= q->write_ptr); |
717 | } | 717 | } |
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 59d49159cf2a..59f92105b0c2 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -3157,8 +3157,10 @@ static void mwl8k_configure_filter(struct ieee80211_hw *hw, | |||
3157 | /* Clear unsupported feature flags */ | 3157 | /* Clear unsupported feature flags */ |
3158 | *total_flags &= FIF_ALLMULTI | FIF_BCN_PRBRESP_PROMISC; | 3158 | *total_flags &= FIF_ALLMULTI | FIF_BCN_PRBRESP_PROMISC; |
3159 | 3159 | ||
3160 | if (mwl8k_fw_lock(hw)) | 3160 | if (mwl8k_fw_lock(hw)) { |
3161 | kfree(cmd); | ||
3161 | return; | 3162 | return; |
3163 | } | ||
3162 | 3164 | ||
3163 | if (priv->sniffer_enabled) { | 3165 | if (priv->sniffer_enabled) { |
3164 | mwl8k_enable_sniffer(hw, 0); | 3166 | mwl8k_enable_sniffer(hw, 0); |
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 27bf887f1453..9deae41cb784 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -340,7 +340,7 @@ static int rt2800_blink_set(struct led_classdev *led_cdev, | |||
340 | rt2x00_set_field32(®, LED_CFG_OFF_PERIOD, *delay_off); | 340 | rt2x00_set_field32(®, LED_CFG_OFF_PERIOD, *delay_off); |
341 | rt2x00_set_field32(®, LED_CFG_SLOW_BLINK_PERIOD, 3); | 341 | rt2x00_set_field32(®, LED_CFG_SLOW_BLINK_PERIOD, 3); |
342 | rt2x00_set_field32(®, LED_CFG_R_LED_MODE, 3); | 342 | rt2x00_set_field32(®, LED_CFG_R_LED_MODE, 3); |
343 | rt2x00_set_field32(®, LED_CFG_G_LED_MODE, 12); | 343 | rt2x00_set_field32(®, LED_CFG_G_LED_MODE, 3); |
344 | rt2x00_set_field32(®, LED_CFG_Y_LED_MODE, 3); | 344 | rt2x00_set_field32(®, LED_CFG_Y_LED_MODE, 3); |
345 | rt2x00_set_field32(®, LED_CFG_LED_POLAR, 1); | 345 | rt2x00_set_field32(®, LED_CFG_LED_POLAR, 1); |
346 | rt2800_register_write(led->rt2x00dev, LED_CFG, reg); | 346 | rt2800_register_write(led->rt2x00dev, LED_CFG, reg); |
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 4d841c07c970..dcfc8c25d1a7 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -113,6 +113,12 @@ | |||
113 | ( ((unsigned long)((__skb)->data + (__header))) & 3 ) | 113 | ( ((unsigned long)((__skb)->data + (__header))) & 3 ) |
114 | 114 | ||
115 | /* | 115 | /* |
116 | * Constants for extra TX headroom for alignment purposes. | ||
117 | */ | ||
118 | #define RT2X00_ALIGN_SIZE 4 /* Only whole frame needs alignment */ | ||
119 | #define RT2X00_L2PAD_SIZE 8 /* Both header & payload need alignment */ | ||
120 | |||
121 | /* | ||
116 | * Standard timing and size defines. | 122 | * Standard timing and size defines. |
117 | * These values should follow the ieee80211 specifications. | 123 | * These values should follow the ieee80211 specifications. |
118 | */ | 124 | */ |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 06c43ca39bf8..265e66dba552 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -686,7 +686,17 @@ static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
686 | /* | 686 | /* |
687 | * Initialize extra TX headroom required. | 687 | * Initialize extra TX headroom required. |
688 | */ | 688 | */ |
689 | rt2x00dev->hw->extra_tx_headroom = rt2x00dev->ops->extra_tx_headroom; | 689 | rt2x00dev->hw->extra_tx_headroom = |
690 | max_t(unsigned int, IEEE80211_TX_STATUS_HEADROOM, | ||
691 | rt2x00dev->ops->extra_tx_headroom); | ||
692 | |||
693 | /* | ||
694 | * Take TX headroom required for alignment into account. | ||
695 | */ | ||
696 | if (test_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags)) | ||
697 | rt2x00dev->hw->extra_tx_headroom += RT2X00_L2PAD_SIZE; | ||
698 | else if (test_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags)) | ||
699 | rt2x00dev->hw->extra_tx_headroom += RT2X00_ALIGN_SIZE; | ||
690 | 700 | ||
691 | /* | 701 | /* |
692 | * Register HW. | 702 | * Register HW. |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 239afc7a9c0b..9915a09141ef 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -104,7 +104,7 @@ void rt2x00queue_map_txskb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb) | |||
104 | * is also mapped to the DMA so it can be used for transfering | 104 | * is also mapped to the DMA so it can be used for transfering |
105 | * additional descriptor information to the hardware. | 105 | * additional descriptor information to the hardware. |
106 | */ | 106 | */ |
107 | skb_push(skb, rt2x00dev->hw->extra_tx_headroom); | 107 | skb_push(skb, rt2x00dev->ops->extra_tx_headroom); |
108 | 108 | ||
109 | skbdesc->skb_dma = | 109 | skbdesc->skb_dma = |
110 | dma_map_single(rt2x00dev->dev, skb->data, skb->len, DMA_TO_DEVICE); | 110 | dma_map_single(rt2x00dev->dev, skb->data, skb->len, DMA_TO_DEVICE); |
@@ -112,7 +112,7 @@ void rt2x00queue_map_txskb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb) | |||
112 | /* | 112 | /* |
113 | * Restore data pointer to original location again. | 113 | * Restore data pointer to original location again. |
114 | */ | 114 | */ |
115 | skb_pull(skb, rt2x00dev->hw->extra_tx_headroom); | 115 | skb_pull(skb, rt2x00dev->ops->extra_tx_headroom); |
116 | 116 | ||
117 | skbdesc->flags |= SKBDESC_DMA_MAPPED_TX; | 117 | skbdesc->flags |= SKBDESC_DMA_MAPPED_TX; |
118 | } | 118 | } |
@@ -134,7 +134,7 @@ void rt2x00queue_unmap_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb) | |||
134 | * by the driver, but it was actually mapped to DMA. | 134 | * by the driver, but it was actually mapped to DMA. |
135 | */ | 135 | */ |
136 | dma_unmap_single(rt2x00dev->dev, skbdesc->skb_dma, | 136 | dma_unmap_single(rt2x00dev->dev, skbdesc->skb_dma, |
137 | skb->len + rt2x00dev->hw->extra_tx_headroom, | 137 | skb->len + rt2x00dev->ops->extra_tx_headroom, |
138 | DMA_TO_DEVICE); | 138 | DMA_TO_DEVICE); |
139 | skbdesc->flags &= ~SKBDESC_DMA_MAPPED_TX; | 139 | skbdesc->flags &= ~SKBDESC_DMA_MAPPED_TX; |
140 | } | 140 | } |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 8ebf5c33955d..f14deb0c8514 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -987,12 +987,13 @@ static void zd_op_configure_filter(struct ieee80211_hw *hw, | |||
987 | changed_flags &= SUPPORTED_FIF_FLAGS; | 987 | changed_flags &= SUPPORTED_FIF_FLAGS; |
988 | *new_flags &= SUPPORTED_FIF_FLAGS; | 988 | *new_flags &= SUPPORTED_FIF_FLAGS; |
989 | 989 | ||
990 | /* changed_flags is always populated but this driver | 990 | /* |
991 | * doesn't support all FIF flags so its possible we don't | 991 | * If multicast parameter (as returned by zd_op_prepare_multicast) |
992 | * need to do anything */ | 992 | * has changed, no bit in changed_flags is set. To handle this |
993 | if (!changed_flags) | 993 | * situation, we do not return if changed_flags is 0. If we do so, |
994 | return; | 994 | * we will have some issue with IPv6 which uses multicast for link |
995 | 995 | * layer address resolution. | |
996 | */ | ||
996 | if (*new_flags & (FIF_PROMISC_IN_BSS | FIF_ALLMULTI)) | 997 | if (*new_flags & (FIF_PROMISC_IN_BSS | FIF_ALLMULTI)) |
997 | zd_mc_add_all(&hash); | 998 | zd_mc_add_all(&hash); |
998 | 999 | ||