From: David S. Miller Date: Fri, 28 Mar 2008 01:48:56 +0000 (-0700) Subject: Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=8e8e43843ba3ced0c657cbc0fdb10644ec60f772;p=openwrt%2Fstaging%2Fblogic.git Merge branch 'master' of git://git./linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/usb/rndis_host.c drivers/net/wireless/b43/dma.c net/ipv6/ndisc.c --- 8e8e43843ba3ced0c657cbc0fdb10644ec60f772 diff --cc drivers/net/usb/rndis_host.c index 06ae1b2b3b34,369c731114b3..21a7785cb8b6 --- a/drivers/net/usb/rndis_host.c +++ b/drivers/net/usb/rndis_host.c @@@ -283,8 -283,7 +283,8 @@@ generic_rndis_bind(struct usbnet *dev, struct rndis_set_c *set_c; struct rndis_halt *halt; } u; - u32 tmp; - u32 tmp, phym_unspec, *phym; ++ u32 tmp, phym_unspec; + __le32 *phym; int reply_len; unsigned char *bp; diff --cc drivers/net/wireless/b43/dma.c index 663aed4e9e05,cfbc1a26f601..8a9776b52daf --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c @@@ -1307,38 -1344,7 +1314,39 @@@ out_unlock return err; } +static void b43_fill_txstatus_report(struct b43_dmaring *ring, + struct ieee80211_tx_status *report, + const struct b43_txstatus *status) +{ + bool frame_failed = 0; + + if (status->acked) { + /* The frame was ACKed. */ + report->flags |= IEEE80211_TX_STATUS_ACK; + } else { + /* The frame was not ACKed... */ + if (!(report->control.flags & IEEE80211_TXCTL_NO_ACK)) { + /* ...but we expected an ACK. */ + frame_failed = 1; + report->excessive_retries = 1; + } + } + if (status->frame_count == 0) { + /* The frame was not transmitted at all. */ + report->retry_count = 0; + } else { + report->retry_count = status->frame_count - 1; +#ifdef CONFIG_B43_DEBUG + if (frame_failed) + ring->nr_failed_tx_packets++; + else + ring->nr_succeed_tx_packets++; + ring->nr_total_packet_tries += status->frame_count; +#endif /* DEBUG */ + } +} + + /* Called with IRQs disabled. */ void b43_dma_handle_txstatus(struct b43_wldev *dev, const struct b43_txstatus *status) { diff --cc drivers/net/wireless/iwlwifi/iwl3945-base.c index ce8a31103eee,cbaeaf186494..ab635dcfd5d1 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c @@@ -5862,10 -6210,9 +5861,11 @@@ static void iwl3945_alive_start(struct iwl3945_reg_txpower_periodic(priv); IWL_DEBUG_INFO("ALIVE processing complete.\n"); + set_bit(STATUS_READY, &priv->status); wake_up_interruptible(&priv->wait_command_queue); + iwl3945_led_register(priv); + if (priv->error_recovering) iwl3945_error_recovery(priv); diff --cc drivers/net/wireless/iwlwifi/iwl4965-base.c index e487432ef56e,60ec29eab85a..cf56b95dd221 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c @@@ -5717,10 -6632,9 +5716,11 @@@ static void iwl4965_alive_start(struct iwl4965_rf_kill_ct_config(priv); IWL_DEBUG_INFO("ALIVE processing complete.\n"); + set_bit(STATUS_READY, &priv->status); wake_up_interruptible(&priv->wait_command_queue); + iwl_leds_register(priv); + if (priv->error_recovering) iwl4965_error_recovery(priv); @@@ -8186,9 -9282,9 +8186,9 @@@ static int iwl4965_pci_probe(struct pci return err; } - static void iwl4965_pci_remove(struct pci_dev *pdev) + static void __devexit iwl4965_pci_remove(struct pci_dev *pdev) { - struct iwl4965_priv *priv = pci_get_drvdata(pdev); + struct iwl_priv *priv = pci_get_drvdata(pdev); struct list_head *p, *q; int i; diff --cc include/net/neighbour.h index 8bec0d69b270,64a5f0120b52..dc420fecafb9 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h @@@ -233,18 -218,12 +233,22 @@@ extern unsigned long neigh_rand_reach_ extern void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p, struct sk_buff *skb); extern struct pneigh_entry *pneigh_lookup(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev, int creat); + extern struct pneigh_entry *__pneigh_lookup(struct neigh_table *tbl, + struct net *net, + const void *key, + struct net_device *dev); extern int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev); +static inline +struct net *pneigh_net(const struct pneigh_entry *pneigh) +{ +#ifdef CONFIG_NET_NS + return pneigh->net; +#else + return &init_net; +#endif +} + extern void neigh_app_ns(struct neighbour *n); extern void neigh_for_each(struct neigh_table *tbl, void (*cb)(struct neighbour *, void *), void *cookie); extern void __neigh_for_each_release(struct neigh_table *tbl, int (*cb)(struct neighbour *)); diff --cc net/core/neighbour.c index 857915a12c15,19b8e003f150..d8d0ca99c651 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@@ -466,6 -466,28 +466,28 @@@ out_neigh_release goto out; } + struct pneigh_entry *__pneigh_lookup(struct neigh_table *tbl, + struct net *net, const void *pkey, struct net_device *dev) + { + struct pneigh_entry *n; + int key_len = tbl->key_len; + u32 hash_val = *(u32 *)(pkey + key_len - 4); + + hash_val ^= (hash_val >> 16); + hash_val ^= hash_val >> 8; + hash_val ^= hash_val >> 4; + hash_val &= PNEIGH_HASHMASK; + + for (n = tbl->phash_buckets[hash_val]; n; n = n->next) { + if (!memcmp(n->key, pkey, key_len) && - (n->net == net) && ++ (pneigh_net(n) == net) && + (n->dev == dev || !n->dev)) + break; + } + + return n; + } + struct pneigh_entry * pneigh_lookup(struct neigh_table *tbl, struct net *net, const void *pkey, struct net_device *dev, int creat) diff --cc net/ipv6/ndisc.c index b4d8e331432e,452a2ac4eec8..e77b74edfd63 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@@ -661,6 -676,20 +661,20 @@@ static void ndisc_solicit(struct neighb } } + static struct pneigh_entry *pndisc_check_router(struct net_device *dev, + struct in6_addr *addr, int *is_router) + { + struct pneigh_entry *n; + + read_lock_bh(&nd_tbl.lock); - n = __pneigh_lookup(&nd_tbl, &init_net, addr, dev); ++ n = __pneigh_lookup(&nd_tbl, dev_net(dev), addr, dev); + if (n != NULL) + *is_router = (n->flags & NTF_ROUTER); + read_unlock_bh(&nd_tbl.lock); + + return n; + } + static void ndisc_recv_ns(struct sk_buff *skb) { struct nd_msg *msg = (struct nd_msg *)skb_transport_header(skb); @@@ -773,11 -801,11 +787,11 @@@ return; } - if (ipv6_chk_acast_addr(dev, &msg->target) || + if (ipv6_chk_acast_addr(dev_net(dev), dev, &msg->target) || (idev->cnf.forwarding && (ipv6_devconf.proxy_ndp || idev->cnf.proxy_ndp) && - (pneigh = pneigh_lookup(&nd_tbl, dev_net(dev), - &msg->target, dev, 0)) != NULL)) { + (pneigh = pndisc_check_router(dev, &msg->target, + &is_router)) != NULL)) { if (!(NEIGH_CB(skb)->flags & LOCALLY_ENQUEUED) && skb->pkt_type != PACKET_HOST && inc != 0 &&