Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
[PATCH] Kconfig: remove redundant NETDEVICES depends
[PATCH] ehea: 64K page support fix
[PATCH] ehea: Removed redundant define
[PATCH] ehea: Nullpointer dereferencation fix
[PATCH] bcm43xx: fix unexpected LED control values in BCM4303 sprom
[PATCH] bcm43xx: Fix low-traffic netdev watchdog TX timeouts
[PATCH] hostap_plx: fix CIS verification
[PATCH] ieee80211: don't flood log with errors

+66 -41
+2 -2
drivers/net/Kconfig
··· 486 486 487 487 config MIPS_SIM_NET 488 488 tristate "MIPS simulator Network device (EXPERIMENTAL)" 489 - depends on NETDEVICES && MIPS_SIM && EXPERIMENTAL 489 + depends on MIPS_SIM && EXPERIMENTAL 490 490 help 491 491 The MIPSNET device is a simple Ethernet network device which is 492 492 emulated by the MIPS Simulator. ··· 2467 2467 2468 2468 config RIONET 2469 2469 tristate "RapidIO Ethernet over messaging driver support" 2470 - depends on NETDEVICES && RAPIDIO 2470 + depends on RAPIDIO 2471 2471 2472 2472 config RIONET_TX_SIZE 2473 2473 int "Number of outbound queue entries"
+1 -4
drivers/net/ehea/ehea.h
··· 39 39 #include <asm/io.h> 40 40 41 41 #define DRV_NAME "ehea" 42 - #define DRV_VERSION "EHEA_0034" 42 + #define DRV_VERSION "EHEA_0043" 43 43 44 44 #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ 45 45 | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) ··· 104 104 #define EHEA_BCMC_TAGGED 0x00 105 105 #define EHEA_BCMC_VLANID_ALL 0x01 106 106 #define EHEA_BCMC_VLANID_SINGLE 0x00 107 - 108 - /* Use this define to kmallocate pHYP control blocks */ 109 - #define H_CB_ALIGNMENT 4096 110 107 111 108 #define EHEA_CACHE_LINE 128 112 109
+1 -1
drivers/net/ehea/ehea_ethtool.c
··· 238 238 data[i++] = port->port_res[0].swqe_refill_th; 239 239 data[i++] = port->resets; 240 240 241 - cb6 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); 241 + cb6 = kzalloc(PAGE_SIZE, GFP_KERNEL); 242 242 if (!cb6) { 243 243 ehea_error("no mem for cb6"); 244 244 return;
+13 -13
drivers/net/ehea/ehea_main.c
··· 92 92 93 93 memset(stats, 0, sizeof(*stats)); 94 94 95 - cb2 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); 95 + cb2 = kzalloc(PAGE_SIZE, GFP_KERNEL); 96 96 if (!cb2) { 97 97 ehea_error("no mem for cb2"); 98 98 goto out; ··· 586 586 u64 hret; 587 587 struct hcp_ehea_port_cb0 *cb0; 588 588 589 - cb0 = kzalloc(H_CB_ALIGNMENT, GFP_ATOMIC); /* May be called via */ 590 - if (!cb0) { /* ehea_neq_tasklet() */ 589 + cb0 = kzalloc(PAGE_SIZE, GFP_ATOMIC); /* May be called via */ 590 + if (!cb0) { /* ehea_neq_tasklet() */ 591 591 ehea_error("no mem for cb0"); 592 592 ret = -ENOMEM; 593 593 goto out; ··· 670 670 u64 hret; 671 671 int ret = 0; 672 672 673 - cb4 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); 673 + cb4 = kzalloc(PAGE_SIZE, GFP_KERNEL); 674 674 if (!cb4) { 675 675 ehea_error("no mem for cb4"); 676 676 ret = -ENOMEM; ··· 985 985 struct hcp_ehea_port_cb0 *cb0; 986 986 987 987 ret = -ENOMEM; 988 - cb0 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); 988 + cb0 = kzalloc(PAGE_SIZE, GFP_KERNEL); 989 989 if (!cb0) 990 990 goto out; 991 991 ··· 1443 1443 goto out; 1444 1444 } 1445 1445 1446 - cb0 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); 1446 + cb0 = kzalloc(PAGE_SIZE, GFP_KERNEL); 1447 1447 if (!cb0) { 1448 1448 ehea_error("no mem for cb0"); 1449 1449 ret = -ENOMEM; ··· 1501 1501 if ((enable && port->promisc) || (!enable && !port->promisc)) 1502 1502 return; 1503 1503 1504 - cb7 = kzalloc(H_CB_ALIGNMENT, GFP_ATOMIC); 1504 + cb7 = kzalloc(PAGE_SIZE, GFP_ATOMIC); 1505 1505 if (!cb7) { 1506 1506 ehea_error("no mem for cb7"); 1507 1507 goto out; ··· 1870 1870 1871 1871 port->vgrp = grp; 1872 1872 1873 - cb1 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); 1873 + cb1 = kzalloc(PAGE_SIZE, GFP_KERNEL); 1874 1874 if (!cb1) { 1875 1875 ehea_error("no mem for cb1"); 1876 1876 goto out; ··· 1899 1899 int index; 1900 1900 u64 hret; 1901 1901 1902 - cb1 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); 1902 + cb1 = kzalloc(PAGE_SIZE, GFP_KERNEL); 1903 1903 if (!cb1) { 1904 1904 ehea_error("no mem for cb1"); 1905 1905 goto out; ··· 1935 1935 if (port->vgrp) 1936 1936 port->vgrp->vlan_devices[vid] = NULL; 1937 1937 1938 - cb1 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); 1938 + cb1 = kzalloc(PAGE_SIZE, GFP_KERNEL); 1939 1939 if (!cb1) { 1940 1940 ehea_error("no mem for cb1"); 1941 1941 goto out; ··· 1968 1968 u64 dummy64 = 0; 1969 1969 struct hcp_modify_qp_cb0* cb0; 1970 1970 1971 - cb0 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); 1971 + cb0 = kzalloc(PAGE_SIZE, GFP_KERNEL); 1972 1972 if (!cb0) { 1973 1973 ret = -ENOMEM; 1974 1974 goto out; ··· 2269 2269 u64 hret; 2270 2270 int ret; 2271 2271 2272 - cb = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); 2272 + cb = kzalloc(PAGE_SIZE, GFP_KERNEL); 2273 2273 if (!cb) { 2274 2274 ret = -ENOMEM; 2275 2275 goto out; ··· 2340 2340 goto out; 2341 2341 2342 2342 /* Enable Jumbo frames */ 2343 - cb4 = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); 2343 + cb4 = kzalloc(PAGE_SIZE, GFP_KERNEL); 2344 2344 if (!cb4) { 2345 2345 ehea_error("no mem for cb4"); 2346 2346 } else {
+1 -1
drivers/net/ehea/ehea_phyp.c
··· 506 506 const u8 pagesize, const u8 queue_type, 507 507 const u64 log_pageaddr, const u64 count) 508 508 { 509 - if ((count > 1) && (log_pageaddr & 0xfff)) { 509 + if ((count > 1) && (log_pageaddr & ~PAGE_MASK)) { 510 510 ehea_error("not on pageboundary"); 511 511 return H_PARAMETER; 512 512 }
+4 -2
drivers/net/ehea/ehea_phyp.h
··· 81 81 static inline void hcp_epas_ctor(struct h_epas *epas, u64 paddr_kernel, 82 82 u64 paddr_user) 83 83 { 84 - epas->kernel.addr = ioremap(paddr_kernel, PAGE_SIZE); 84 + /* To support 64k pages we must round to 64k page boundary */ 85 + epas->kernel.addr = ioremap((paddr_kernel & PAGE_MASK), PAGE_SIZE) + 86 + (paddr_kernel & ~PAGE_MASK); 85 87 epas->user.addr = paddr_user; 86 88 } 87 89 88 90 static inline void hcp_epas_dtor(struct h_epas *epas) 89 91 { 90 92 if (epas->kernel.addr) 91 - iounmap(epas->kernel.addr); 93 + iounmap((void __iomem*)((u64)epas->kernel.addr & PAGE_MASK)); 92 94 93 95 epas->user.addr = 0; 94 96 epas->kernel.addr = 0;
+9 -8
drivers/net/ehea/ehea_qmr.c
··· 209 209 { 210 210 u64 adapter_handle, hret; 211 211 212 - adapter_handle = cq->adapter->handle; 213 - 214 212 if (!cq) 215 213 return 0; 214 + 215 + adapter_handle = cq->adapter->handle; 216 216 217 217 /* deregister all previous registered pages */ 218 218 hret = ehea_h_free_resource(adapter_handle, cq->fw_handle); ··· 512 512 513 513 start = KERNELBASE; 514 514 end = (u64)high_memory; 515 - nr_pages = (end - start) / PAGE_SIZE; 515 + nr_pages = (end - start) / EHEA_PAGESIZE; 516 516 517 517 pt = kzalloc(PAGE_SIZE, GFP_KERNEL); 518 518 if (!pt) { ··· 538 538 if (nr_pages > 1) { 539 539 u64 num_pages = min(nr_pages, (u64)512); 540 540 for (i = 0; i < num_pages; i++) 541 - pt[i] = virt_to_abs((void*)(((u64)start) 542 - + ((k++) * 543 - PAGE_SIZE))); 541 + pt[i] = virt_to_abs((void*)(((u64)start) + 542 + ((k++) * 543 + EHEA_PAGESIZE))); 544 544 545 545 hret = ehea_h_register_rpage_mr(adapter->handle, 546 546 adapter->mr.handle, 0, ··· 548 548 num_pages); 549 549 nr_pages -= num_pages; 550 550 } else { 551 - u64 abs_adr = virt_to_abs((void*)(((u64)start) 552 - + (k * PAGE_SIZE))); 551 + u64 abs_adr = virt_to_abs((void*)(((u64)start) + 552 + (k * EHEA_PAGESIZE))); 553 + 553 554 hret = ehea_h_register_rpage_mr(adapter->handle, 554 555 adapter->mr.handle, 0, 555 556 0, abs_adr,1);
+6 -1
drivers/net/wireless/bcm43xx/bcm43xx_leds.c
··· 189 189 case BCM43xx_LED_INACTIVE: 190 190 continue; 191 191 case BCM43xx_LED_OFF: 192 + case BCM43xx_LED_BCM4303_3: 192 193 break; 193 194 case BCM43xx_LED_ON: 194 195 turn_on = 1; 195 196 break; 196 197 case BCM43xx_LED_ACTIVITY: 198 + case BCM43xx_LED_BCM4303_0: 197 199 turn_on = activity; 198 200 break; 199 201 case BCM43xx_LED_RADIO_ALL: 200 202 turn_on = radio->enabled; 201 203 break; 202 204 case BCM43xx_LED_RADIO_A: 205 + case BCM43xx_LED_BCM4303_2: 203 206 turn_on = (radio->enabled && phy->type == BCM43xx_PHYTYPE_A); 204 207 break; 205 208 case BCM43xx_LED_RADIO_B: 209 + case BCM43xx_LED_BCM4303_1: 206 210 turn_on = (radio->enabled && 207 211 (phy->type == BCM43xx_PHYTYPE_B || 208 212 phy->type == BCM43xx_PHYTYPE_G)); ··· 261 257 continue; 262 258 #endif /* CONFIG_BCM43XX_DEBUG */ 263 259 default: 264 - assert(0); 260 + dprintkl(KERN_INFO PFX "Bad value in leds_update," 261 + " led->behaviour: 0x%x\n", led->behaviour); 265 262 }; 266 263 267 264 if (led->activelow)
+6
drivers/net/wireless/bcm43xx/bcm43xx_leds.h
··· 46 46 BCM43xx_LED_TEST_BLINKSLOW, 47 47 BCM43xx_LED_TEST_BLINKMEDIUM, 48 48 BCM43xx_LED_TEST_BLINKFAST, 49 + 50 + /* Misc values for BCM4303 */ 51 + BCM43xx_LED_BCM4303_0 = 0x2B, 52 + BCM43xx_LED_BCM4303_1 = 0x78, 53 + BCM43xx_LED_BCM4303_2 = 0x2E, 54 + BCM43xx_LED_BCM4303_3 = 0x19, 49 55 }; 50 56 51 57 int bcm43xx_leds_init(struct bcm43xx_private *bcm);
+15 -1
drivers/net/wireless/bcm43xx/bcm43xx_main.c
··· 3163 3163 static void bcm43xx_periodic_work_handler(void *d) 3164 3164 { 3165 3165 struct bcm43xx_private *bcm = d; 3166 + struct net_device *net_dev = bcm->net_dev; 3166 3167 unsigned long flags; 3167 3168 u32 savedirqs = 0; 3168 3169 int badness; 3170 + unsigned long orig_trans_start = 0; 3169 3171 3170 3172 mutex_lock(&bcm->mutex); 3171 3173 badness = estimate_periodic_work_badness(bcm->periodic_state); ··· 3175 3173 /* Periodic work will take a long time, so we want it to 3176 3174 * be preemtible. 3177 3175 */ 3178 - netif_tx_disable(bcm->net_dev); 3176 + 3177 + netif_tx_lock_bh(net_dev); 3178 + /* We must fake a started transmission here, as we are going to 3179 + * disable TX. If we wouldn't fake a TX, it would be possible to 3180 + * trigger the netdev watchdog, if the last real TX is already 3181 + * some time on the past (slightly less than 5secs) 3182 + */ 3183 + orig_trans_start = net_dev->trans_start; 3184 + net_dev->trans_start = jiffies; 3185 + netif_stop_queue(net_dev); 3186 + netif_tx_unlock_bh(net_dev); 3187 + 3179 3188 spin_lock_irqsave(&bcm->irq_lock, flags); 3180 3189 bcm43xx_mac_suspend(bcm); 3181 3190 if (bcm43xx_using_pio(bcm)) ··· 3211 3198 bcm43xx_pio_thaw_txqueues(bcm); 3212 3199 bcm43xx_mac_enable(bcm); 3213 3200 netif_wake_queue(bcm->net_dev); 3201 + net_dev->trans_start = orig_trans_start; 3214 3202 } 3215 3203 mmiowb(); 3216 3204 spin_unlock_irqrestore(&bcm->irq_lock, flags);
+2 -2
drivers/net/wireless/hostap/hostap_plx.c
··· 364 364 365 365 pos = 0; 366 366 while (pos < CIS_MAX_LEN - 1 && cis[pos] != CISTPL_END) { 367 - if (pos + cis[pos + 1] >= CIS_MAX_LEN) 367 + if (pos + 2 + cis[pos + 1] > CIS_MAX_LEN) 368 368 goto cis_error; 369 369 370 370 switch (cis[pos]) { ··· 391 391 break; 392 392 393 393 case CISTPL_MANFID: 394 - if (cis[pos + 1] < 5) 394 + if (cis[pos + 1] < 4) 395 395 goto cis_error; 396 396 manfid1 = cis[pos + 2] + (cis[pos + 3] << 8); 397 397 manfid2 = cis[pos + 4] + (cis[pos + 5] << 8);
+6 -6
net/ieee80211/ieee80211_rx.c
··· 1078 1078 1079 1079 while (length >= sizeof(*info_element)) { 1080 1080 if (sizeof(*info_element) + info_element->len > length) { 1081 - IEEE80211_ERROR("Info elem: parse failed: " 1082 - "info_element->len + 2 > left : " 1083 - "info_element->len+2=%zd left=%d, id=%d.\n", 1084 - info_element->len + 1085 - sizeof(*info_element), 1086 - length, info_element->id); 1081 + IEEE80211_DEBUG_MGMT("Info elem: parse failed: " 1082 + "info_element->len + 2 > left : " 1083 + "info_element->len+2=%zd left=%d, id=%d.\n", 1084 + info_element->len + 1085 + sizeof(*info_element), 1086 + length, info_element->id); 1087 1087 /* We stop processing but don't return an error here 1088 1088 * because some misbehaviour APs break this rule. ie. 1089 1089 * Orinoco AP1000. */