Commit e5a5816f authored by Linus Torvalds's avatar Linus Torvalds

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: (27 commits)
  tun: Persistent devices can get stuck in xoff state
  xfrm: Add a XFRM_STATE_AF_UNSPEC flag to xfrm_usersa_info
  ipv6: missed namespace context in ipv6_rthdr_rcv
  netlabel: netlink_unicast calls kfree_skb on error path by itself
  ipv4: fib_trie: Fix lookup error return
  tcp: correct kcalloc usage
  ip: sysctl documentation cleanup
  Documentation: clarify tcp_{r,w}mem sysctl docs
  netfilter: nf_nat_snmp_basic: fix a range check in NAT for SNMP
  netfilter: nf_conntrack_tcp: fix endless loop
  libertas: fix memory alignment problems on the blackfin
  zd1211rw: stop beacons on remove_interface
  rt2x00: Disable synchronization during initialization
  rc80211_pid: Fix fast_start parameter handling
  sctp: Add documentation for sctp sysctl variable
  ipv6: fix race between ipv6_del_addr and DAD timer
  irda: Fix netlink error path return value
  irda: New device ID for nsc-ircc
  irda: via-ircc proper dma freeing
  sctp: Mark the tsn as received after all allocations finish
  ...
parents bdb21928 e35259a9
This diff is collapsed.
...@@ -152,6 +152,7 @@ static chipio_t pnp_info; ...@@ -152,6 +152,7 @@ static chipio_t pnp_info;
static const struct pnp_device_id nsc_ircc_pnp_table[] = { static const struct pnp_device_id nsc_ircc_pnp_table[] = {
{ .id = "NSC6001", .driver_data = 0 }, { .id = "NSC6001", .driver_data = 0 },
{ .id = "IBM0071", .driver_data = 0 }, { .id = "IBM0071", .driver_data = 0 },
{ .id = "HWPC224", .driver_data = 0 },
{ } { }
}; };
......
...@@ -1546,6 +1546,7 @@ static int via_ircc_net_open(struct net_device *dev) ...@@ -1546,6 +1546,7 @@ static int via_ircc_net_open(struct net_device *dev)
IRDA_WARNING("%s, unable to allocate dma2=%d\n", IRDA_WARNING("%s, unable to allocate dma2=%d\n",
driver_name, self->io.dma2); driver_name, self->io.dma2);
free_irq(self->io.irq, self); free_irq(self->io.irq, self);
free_dma(self->io.dma);
return -EAGAIN; return -EAGAIN;
} }
} }
...@@ -1606,6 +1607,8 @@ static int via_ircc_net_close(struct net_device *dev) ...@@ -1606,6 +1607,8 @@ static int via_ircc_net_close(struct net_device *dev)
EnAllInt(iobase, OFF); EnAllInt(iobase, OFF);
free_irq(self->io.irq, dev); free_irq(self->io.irq, dev);
free_dma(self->io.dma); free_dma(self->io.dma);
if (self->io.dma2 != self->io.dma)
free_dma(self->io.dma2);
return 0; return 0;
} }
......
...@@ -602,6 +602,12 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) ...@@ -602,6 +602,12 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
tun->attached = 1; tun->attached = 1;
get_net(dev_net(tun->dev)); get_net(dev_net(tun->dev));
/* Make sure persistent devices do not get stuck in
* xoff state.
*/
if (netif_running(tun->dev))
netif_wake_queue(tun->dev);
strcpy(ifr->ifr_name, tun->dev->name); strcpy(ifr->ifr_name, tun->dev->name);
return 0; return 0;
......
...@@ -777,7 +777,9 @@ static int hostap_cs_suspend(struct pcmcia_device *link) ...@@ -777,7 +777,9 @@ static int hostap_cs_suspend(struct pcmcia_device *link)
int dev_open = 0; int dev_open = 0;
struct hostap_interface *iface = NULL; struct hostap_interface *iface = NULL;
if (dev) if (!dev)
return -ENODEV;
iface = netdev_priv(dev); iface = netdev_priv(dev);
PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_PM_SUSPEND\n", dev_info); PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_PM_SUSPEND\n", dev_info);
...@@ -798,7 +800,9 @@ static int hostap_cs_resume(struct pcmcia_device *link) ...@@ -798,7 +800,9 @@ static int hostap_cs_resume(struct pcmcia_device *link)
int dev_open = 0; int dev_open = 0;
struct hostap_interface *iface = NULL; struct hostap_interface *iface = NULL;
if (dev) if (!dev)
return -ENODEV;
iface = netdev_priv(dev); iface = netdev_priv(dev);
PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_PM_RESUME\n", dev_info); PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_PM_RESUME\n", dev_info);
......
...@@ -449,7 +449,7 @@ static void iwl3945_dbg_report_frame(struct iwl3945_priv *priv, ...@@ -449,7 +449,7 @@ static void iwl3945_dbg_report_frame(struct iwl3945_priv *priv,
if (print_summary) { if (print_summary) {
char *title; char *title;
u32 rate; int rate;
if (hundred) if (hundred)
title = "100Frames"; title = "100Frames";
...@@ -487,7 +487,7 @@ static void iwl3945_dbg_report_frame(struct iwl3945_priv *priv, ...@@ -487,7 +487,7 @@ static void iwl3945_dbg_report_frame(struct iwl3945_priv *priv,
* but you can hack it to show more, if you'd like to. */ * but you can hack it to show more, if you'd like to. */
if (dataframe) if (dataframe)
IWL_DEBUG_RX("%s: mhd=0x%04x, dst=0x%02x, " IWL_DEBUG_RX("%s: mhd=0x%04x, dst=0x%02x, "
"len=%u, rssi=%d, chnl=%d, rate=%u, \n", "len=%u, rssi=%d, chnl=%d, rate=%d, \n",
title, fc, header->addr1[5], title, fc, header->addr1[5],
length, rssi, channel, rate); length, rssi, channel, rate);
else { else {
......
...@@ -567,11 +567,11 @@ static int lbs_process_bss(struct bss_descriptor *bss, ...@@ -567,11 +567,11 @@ static int lbs_process_bss(struct bss_descriptor *bss,
pos += 8; pos += 8;
/* beacon interval is 2 bytes long */ /* beacon interval is 2 bytes long */
bss->beaconperiod = le16_to_cpup((void *) pos); bss->beaconperiod = get_unaligned_le16(pos);
pos += 2; pos += 2;
/* capability information is 2 bytes long */ /* capability information is 2 bytes long */
bss->capability = le16_to_cpup((void *) pos); bss->capability = get_unaligned_le16(pos);
lbs_deb_scan("process_bss: capabilities 0x%04x\n", bss->capability); lbs_deb_scan("process_bss: capabilities 0x%04x\n", bss->capability);
pos += 2; pos += 2;
......
...@@ -731,6 +731,17 @@ static int rt2400pci_init_registers(struct rt2x00_dev *rt2x00dev) ...@@ -731,6 +731,17 @@ static int rt2400pci_init_registers(struct rt2x00_dev *rt2x00dev)
(rt2x00dev->rx->data_size / 128)); (rt2x00dev->rx->data_size / 128));
rt2x00pci_register_write(rt2x00dev, CSR9, reg); rt2x00pci_register_write(rt2x00dev, CSR9, reg);
rt2x00pci_register_read(rt2x00dev, CSR14, &reg);
rt2x00_set_field32(&reg, CSR14_TSF_COUNT, 0);
rt2x00_set_field32(&reg, CSR14_TSF_SYNC, 0);
rt2x00_set_field32(&reg, CSR14_TBCN, 0);
rt2x00_set_field32(&reg, CSR14_TCFP, 0);
rt2x00_set_field32(&reg, CSR14_TATIMW, 0);
rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 0);
rt2x00_set_field32(&reg, CSR14_CFP_COUNT_PRELOAD, 0);
rt2x00_set_field32(&reg, CSR14_TBCM_PRELOAD, 0);
rt2x00pci_register_write(rt2x00dev, CSR14, reg);
rt2x00pci_register_write(rt2x00dev, CNT3, 0x3f080000); rt2x00pci_register_write(rt2x00dev, CNT3, 0x3f080000);
rt2x00pci_register_read(rt2x00dev, ARCSR0, &reg); rt2x00pci_register_read(rt2x00dev, ARCSR0, &reg);
......
...@@ -824,6 +824,17 @@ static int rt2500pci_init_registers(struct rt2x00_dev *rt2x00dev) ...@@ -824,6 +824,17 @@ static int rt2500pci_init_registers(struct rt2x00_dev *rt2x00dev)
rt2x00_set_field32(&reg, CSR11_CW_SELECT, 0); rt2x00_set_field32(&reg, CSR11_CW_SELECT, 0);
rt2x00pci_register_write(rt2x00dev, CSR11, reg); rt2x00pci_register_write(rt2x00dev, CSR11, reg);
rt2x00pci_register_read(rt2x00dev, CSR14, &reg);
rt2x00_set_field32(&reg, CSR14_TSF_COUNT, 0);
rt2x00_set_field32(&reg, CSR14_TSF_SYNC, 0);
rt2x00_set_field32(&reg, CSR14_TBCN, 0);
rt2x00_set_field32(&reg, CSR14_TCFP, 0);
rt2x00_set_field32(&reg, CSR14_TATIMW, 0);
rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 0);
rt2x00_set_field32(&reg, CSR14_CFP_COUNT_PRELOAD, 0);
rt2x00_set_field32(&reg, CSR14_TBCM_PRELOAD, 0);
rt2x00pci_register_write(rt2x00dev, CSR14, reg);
rt2x00pci_register_write(rt2x00dev, CNT3, 0); rt2x00pci_register_write(rt2x00dev, CNT3, 0);
rt2x00pci_register_read(rt2x00dev, TXCSR8, &reg); rt2x00pci_register_read(rt2x00dev, TXCSR8, &reg);
......
...@@ -801,6 +801,13 @@ static int rt2500usb_init_registers(struct rt2x00_dev *rt2x00dev) ...@@ -801,6 +801,13 @@ static int rt2500usb_init_registers(struct rt2x00_dev *rt2x00dev)
rt2x00_set_field16(&reg, TXRX_CSR8_BBP_ID1_VALID, 0); rt2x00_set_field16(&reg, TXRX_CSR8_BBP_ID1_VALID, 0);
rt2500usb_register_write(rt2x00dev, TXRX_CSR8, reg); rt2500usb_register_write(rt2x00dev, TXRX_CSR8, reg);
rt2500usb_register_read(rt2x00dev, TXRX_CSR19, &reg);
rt2x00_set_field16(&reg, TXRX_CSR19_TSF_COUNT, 0);
rt2x00_set_field16(&reg, TXRX_CSR19_TSF_SYNC, 0);
rt2x00_set_field16(&reg, TXRX_CSR19_TBCN, 0);
rt2x00_set_field16(&reg, TXRX_CSR19_BEACON_GEN, 0);
rt2500usb_register_write(rt2x00dev, TXRX_CSR19, reg);
rt2500usb_register_write(rt2x00dev, TXRX_CSR21, 0xe78f); rt2500usb_register_write(rt2x00dev, TXRX_CSR21, 0xe78f);
rt2500usb_register_write(rt2x00dev, MAC_CSR9, 0xff1d); rt2500usb_register_write(rt2x00dev, MAC_CSR9, 0xff1d);
......
...@@ -1201,6 +1201,15 @@ static int rt61pci_init_registers(struct rt2x00_dev *rt2x00dev) ...@@ -1201,6 +1201,15 @@ static int rt61pci_init_registers(struct rt2x00_dev *rt2x00dev)
rt2x00_set_field32(&reg, TXRX_CSR8_ACK_CTS_54MBS, 42); rt2x00_set_field32(&reg, TXRX_CSR8_ACK_CTS_54MBS, 42);
rt2x00pci_register_write(rt2x00dev, TXRX_CSR8, reg); rt2x00pci_register_write(rt2x00dev, TXRX_CSR8, reg);
rt2x00pci_register_read(rt2x00dev, TXRX_CSR9, &reg);
rt2x00_set_field32(&reg, TXRX_CSR9_BEACON_INTERVAL, 0);
rt2x00_set_field32(&reg, TXRX_CSR9_TSF_TICKING, 0);
rt2x00_set_field32(&reg, TXRX_CSR9_TSF_SYNC, 0);
rt2x00_set_field32(&reg, TXRX_CSR9_TBTT_ENABLE, 0);
rt2x00_set_field32(&reg, TXRX_CSR9_BEACON_GEN, 0);
rt2x00_set_field32(&reg, TXRX_CSR9_TIMESTAMP_COMPENSATE, 0);
rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg);
rt2x00pci_register_write(rt2x00dev, TXRX_CSR15, 0x0000000f); rt2x00pci_register_write(rt2x00dev, TXRX_CSR15, 0x0000000f);
rt2x00pci_register_write(rt2x00dev, MAC_CSR6, 0x00000fff); rt2x00pci_register_write(rt2x00dev, MAC_CSR6, 0x00000fff);
......
...@@ -1006,6 +1006,15 @@ static int rt73usb_init_registers(struct rt2x00_dev *rt2x00dev) ...@@ -1006,6 +1006,15 @@ static int rt73usb_init_registers(struct rt2x00_dev *rt2x00dev)
rt2x00_set_field32(&reg, TXRX_CSR8_ACK_CTS_54MBS, 42); rt2x00_set_field32(&reg, TXRX_CSR8_ACK_CTS_54MBS, 42);
rt73usb_register_write(rt2x00dev, TXRX_CSR8, reg); rt73usb_register_write(rt2x00dev, TXRX_CSR8, reg);
rt73usb_register_read(rt2x00dev, TXRX_CSR9, &reg);
rt2x00_set_field32(&reg, TXRX_CSR9_BEACON_INTERVAL, 0);
rt2x00_set_field32(&reg, TXRX_CSR9_TSF_TICKING, 0);
rt2x00_set_field32(&reg, TXRX_CSR9_TSF_SYNC, 0);
rt2x00_set_field32(&reg, TXRX_CSR9_TBTT_ENABLE, 0);
rt2x00_set_field32(&reg, TXRX_CSR9_BEACON_GEN, 0);
rt2x00_set_field32(&reg, TXRX_CSR9_TIMESTAMP_COMPENSATE, 0);
rt73usb_register_write(rt2x00dev, TXRX_CSR9, reg);
rt73usb_register_write(rt2x00dev, TXRX_CSR15, 0x0000000f); rt73usb_register_write(rt2x00dev, TXRX_CSR15, 0x0000000f);
rt73usb_register_read(rt2x00dev, MAC_CSR6, &reg); rt73usb_register_read(rt2x00dev, MAC_CSR6, &reg);
......
...@@ -765,6 +765,7 @@ static void zd_op_remove_interface(struct ieee80211_hw *hw, ...@@ -765,6 +765,7 @@ static void zd_op_remove_interface(struct ieee80211_hw *hw,
{ {
struct zd_mac *mac = zd_hw_mac(hw); struct zd_mac *mac = zd_hw_mac(hw);
mac->type = IEEE80211_IF_TYPE_INVALID; mac->type = IEEE80211_IF_TYPE_INVALID;
zd_set_beacon_interval(&mac->chip, 0);
zd_write_mac_addr(&mac->chip, NULL); zd_write_mac_addr(&mac->chip, NULL);
} }
......
...@@ -64,6 +64,7 @@ static struct usb_device_id usb_ids[] = { ...@@ -64,6 +64,7 @@ static struct usb_device_id usb_ids[] = {
{ USB_DEVICE(0x079b, 0x0062), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x079b, 0x0062), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x1582, 0x6003), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x1582, 0x6003), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x050d, 0x705c), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x050d, 0x705c), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x083a, 0xe506), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x083a, 0x4505), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x083a, 0x4505), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x0471, 0x1236), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x0471, 0x1236), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x13b1, 0x0024), .driver_info = DEVICE_ZD1211B }, { USB_DEVICE(0x13b1, 0x0024), .driver_info = DEVICE_ZD1211B },
......
...@@ -537,6 +537,13 @@ int ssb_pcicore_dev_irqvecs_enable(struct ssb_pcicore *pc, ...@@ -537,6 +537,13 @@ int ssb_pcicore_dev_irqvecs_enable(struct ssb_pcicore *pc,
int err = 0; int err = 0;
u32 tmp; u32 tmp;
if (dev->bus->bustype != SSB_BUSTYPE_PCI) {
/* This SSB device is not on a PCI host-bus. So the IRQs are
* not routed through the PCI core.
* So we must not enable routing through the PCI core. */
goto out;
}
if (!pdev) if (!pdev)
goto out; goto out;
bus = pdev->bus; bus = pdev->bus;
......
...@@ -339,6 +339,7 @@ struct xfrm_usersa_info { ...@@ -339,6 +339,7 @@ struct xfrm_usersa_info {
#define XFRM_STATE_NOPMTUDISC 4 #define XFRM_STATE_NOPMTUDISC 4
#define XFRM_STATE_WILDRECV 8 #define XFRM_STATE_WILDRECV 8
#define XFRM_STATE_ICMP 16 #define XFRM_STATE_ICMP 16
#define XFRM_STATE_AF_UNSPEC 32
}; };
struct xfrm_usersa_id { struct xfrm_usersa_id {
......
...@@ -1359,17 +1359,17 @@ static int check_leaf(struct trie *t, struct leaf *l, ...@@ -1359,17 +1359,17 @@ static int check_leaf(struct trie *t, struct leaf *l,
t->stats.semantic_match_miss++; t->stats.semantic_match_miss++;
#endif #endif
if (err <= 0) if (err <= 0)
return plen; return err;
} }
return -1; return 1;
} }
static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp,
struct fib_result *res) struct fib_result *res)
{ {
struct trie *t = (struct trie *) tb->tb_data; struct trie *t = (struct trie *) tb->tb_data;
int plen, ret = 0; int ret;
struct node *n; struct node *n;
struct tnode *pn; struct tnode *pn;
int pos, bits; int pos, bits;
...@@ -1393,10 +1393,7 @@ static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, ...@@ -1393,10 +1393,7 @@ static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp,
/* Just a leaf? */ /* Just a leaf? */
if (IS_LEAF(n)) { if (IS_LEAF(n)) {
plen = check_leaf(t, (struct leaf *)n, key, flp, res); ret = check_leaf(t, (struct leaf *)n, key, flp, res);
if (plen < 0)
goto failed;
ret = 0;
goto found; goto found;
} }
...@@ -1421,11 +1418,9 @@ static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, ...@@ -1421,11 +1418,9 @@ static int fn_trie_lookup(struct fib_table *tb, const struct flowi *flp,
} }
if (IS_LEAF(n)) { if (IS_LEAF(n)) {
plen = check_leaf(t, (struct leaf *)n, key, flp, res); ret = check_leaf(t, (struct leaf *)n, key, flp, res);
if (plen < 0) if (ret > 0)
goto backtrace; goto backtrace;
ret = 0;
goto found; goto found;
} }
......
...@@ -439,8 +439,8 @@ static unsigned char asn1_oid_decode(struct asn1_ctx *ctx, ...@@ -439,8 +439,8 @@ static unsigned char asn1_oid_decode(struct asn1_ctx *ctx,
unsigned int *len) unsigned int *len)
{ {
unsigned long subid; unsigned long subid;
unsigned int size;
unsigned long *optr; unsigned long *optr;
size_t size;
size = eoc - ctx->pointer + 1; size = eoc - ctx->pointer + 1;
......
...@@ -224,7 +224,7 @@ static __init int tcpprobe_init(void) ...@@ -224,7 +224,7 @@ static __init int tcpprobe_init(void)
if (bufsize < 0) if (bufsize < 0)
return -EINVAL; return -EINVAL;
tcp_probe.log = kcalloc(sizeof(struct tcp_log), bufsize, GFP_KERNEL); tcp_probe.log = kcalloc(bufsize, sizeof(struct tcp_log), GFP_KERNEL);
if (!tcp_probe.log) if (!tcp_probe.log)
goto err0; goto err0;
......
...@@ -749,12 +749,12 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp) ...@@ -749,12 +749,12 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
} }
write_unlock_bh(&idev->lock); write_unlock_bh(&idev->lock);
addrconf_del_timer(ifp);
ipv6_ifa_notify(RTM_DELADDR, ifp); ipv6_ifa_notify(RTM_DELADDR, ifp);
atomic_notifier_call_chain(&inet6addr_chain, NETDEV_DOWN, ifp); atomic_notifier_call_chain(&inet6addr_chain, NETDEV_DOWN, ifp);
addrconf_del_timer(ifp);
/* /*
* Purge or update corresponding prefix * Purge or update corresponding prefix
* *
......
...@@ -445,7 +445,7 @@ static int ipv6_rthdr_rcv(struct sk_buff *skb) ...@@ -445,7 +445,7 @@ static int ipv6_rthdr_rcv(struct sk_buff *skb)
kfree_skb(skb); kfree_skb(skb);
return -1; return -1;
} }
if (!ipv6_chk_home_addr(&init_net, addr)) { if (!ipv6_chk_home_addr(dev_net(skb->dst->dev), addr)) {
IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IP6_INC_STATS_BH(ip6_dst_idev(skb->dst),
IPSTATS_MIB_INADDRERRORS); IPSTATS_MIB_INADDRERRORS);
kfree_skb(skb); kfree_skb(skb);
......
...@@ -101,8 +101,8 @@ static int irda_nl_get_mode(struct sk_buff *skb, struct genl_info *info) ...@@ -101,8 +101,8 @@ static int irda_nl_get_mode(struct sk_buff *skb, struct genl_info *info)
hdr = genlmsg_put(msg, info->snd_pid, info->snd_seq, hdr = genlmsg_put(msg, info->snd_pid, info->snd_seq,
&irda_nl_family, 0, IRDA_NL_CMD_GET_MODE); &irda_nl_family, 0, IRDA_NL_CMD_GET_MODE);
if (IS_ERR(hdr)) { if (hdr == NULL) {
ret = PTR_ERR(hdr); ret = -EMSGSIZE;
goto err_out; goto err_out;
} }
......
...@@ -530,8 +530,6 @@ static int ieee80211_stop(struct net_device *dev) ...@@ -530,8 +530,6 @@ static int ieee80211_stop(struct net_device *dev)
local->sta_hw_scanning = 0; local->sta_hw_scanning = 0;
} }
flush_workqueue(local->hw.workqueue);
sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED; sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED;
kfree(sdata->u.sta.extra_ie); kfree(sdata->u.sta.extra_ie);
sdata->u.sta.extra_ie = NULL; sdata->u.sta.extra_ie = NULL;
...@@ -555,6 +553,8 @@ static int ieee80211_stop(struct net_device *dev) ...@@ -555,6 +553,8 @@ static int ieee80211_stop(struct net_device *dev)
ieee80211_led_radio(local, 0); ieee80211_led_radio(local, 0);
flush_workqueue(local->hw.workqueue);
tasklet_disable(&local->tx_pending_tasklet); tasklet_disable(&local->tx_pending_tasklet);
tasklet_disable(&local->tasklet); tasklet_disable(&local->tasklet);
} }
......
...@@ -547,15 +547,14 @@ static void ieee80211_set_associated(struct net_device *dev, ...@@ -547,15 +547,14 @@ static void ieee80211_set_associated(struct net_device *dev,
sdata->bss_conf.ht_bss_conf = &conf->ht_bss_conf; sdata->bss_conf.ht_bss_conf = &conf->ht_bss_conf;
} }
netif_carrier_on(dev);
ifsta->flags |= IEEE80211_STA_PREV_BSSID_SET; ifsta->flags |= IEEE80211_STA_PREV_BSSID_SET;
memcpy(ifsta->prev_bssid, sdata->u.sta.bssid, ETH_ALEN); memcpy(ifsta->prev_bssid, sdata->u.sta.bssid, ETH_ALEN);
memcpy(wrqu.ap_addr.sa_data, sdata->u.sta.bssid, ETH_ALEN); memcpy(wrqu.ap_addr.sa_data, sdata->u.sta.bssid, ETH_ALEN);
ieee80211_sta_send_associnfo(dev, ifsta); ieee80211_sta_send_associnfo(dev, ifsta);
} else { } else {
netif_carrier_off(dev);
ieee80211_sta_tear_down_BA_sessions(dev, ifsta->bssid); ieee80211_sta_tear_down_BA_sessions(dev, ifsta->bssid);
ifsta->flags &= ~IEEE80211_STA_ASSOCIATED; ifsta->flags &= ~IEEE80211_STA_ASSOCIATED;
netif_carrier_off(dev);
ieee80211_reset_erp_info(dev); ieee80211_reset_erp_info(dev);
sdata->bss_conf.assoc_ht = 0; sdata->bss_conf.assoc_ht = 0;
...@@ -569,6 +568,10 @@ static void ieee80211_set_associated(struct net_device *dev, ...@@ -569,6 +568,10 @@ static void ieee80211_set_associated(struct net_device *dev,
sdata->bss_conf.assoc = assoc; sdata->bss_conf.assoc = assoc;
ieee80211_bss_info_change_notify(sdata, changed); ieee80211_bss_info_change_notify(sdata, changed);
if (assoc)
netif_carrier_on(dev);
wrqu.ap_addr.sa_family = ARPHRD_ETHER; wrqu.ap_addr.sa_family = ARPHRD_ETHER;
wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL);
} }
...@@ -3611,8 +3614,10 @@ static int ieee80211_sta_find_ibss(struct net_device *dev, ...@@ -3611,8 +3614,10 @@ static int ieee80211_sta_find_ibss(struct net_device *dev,
spin_unlock_bh(&local->sta_bss_lock); spin_unlock_bh(&local->sta_bss_lock);
#ifdef CONFIG_MAC80211_IBSS_DEBUG #ifdef CONFIG_MAC80211_IBSS_DEBUG
if (found)
printk(KERN_DEBUG " sta_find_ibss: selected %s current " printk(KERN_DEBUG " sta_find_ibss: selected %s current "
"%s\n", print_mac(mac, bssid), print_mac(mac2, ifsta->bssid)); "%s\n", print_mac(mac, bssid),
print_mac(mac2, ifsta->bssid));
#endif /* CONFIG_MAC80211_IBSS_DEBUG */ #endif /* CONFIG_MAC80211_IBSS_DEBUG */
if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0 && if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0 &&
(bss = ieee80211_rx_bss_get(dev, bssid, (bss = ieee80211_rx_bss_get(dev, bssid,
......
...@@ -141,7 +141,6 @@ struct rc_pid_events_file_info { ...@@ -141,7 +141,6 @@ struct rc_pid_events_file_info {
* rate behaviour values (lower means we should trust more what we learnt * rate behaviour values (lower means we should trust more what we learnt
* about behaviour of rates, higher means we should trust more the natural * about behaviour of rates, higher means we should trust more the natural
* ordering of rates) * ordering of rates)
* @fast_start: if Y, push high rates right after initialization
*/ */
struct rc_pid_debugfs_entries { struct rc_pid_debugfs_entries {
struct dentry *dir; struct dentry *dir;
...@@ -154,7 +153,6 @@ struct rc_pid_debugfs_entries { ...@@ -154,7 +153,6 @@ struct rc_pid_debugfs_entries {
struct dentry *sharpen_factor; struct dentry *sharpen_factor;
struct dentry *sharpen_duration; struct dentry *sharpen_duration;
struct dentry *norm_offset; struct dentry *norm_offset;
struct dentry *fast_start;
}; };
void rate_control_pid_event_tx_status(struct rc_pid_event_buffer *buf, void rate_control_pid_event_tx_status(struct rc_pid_event_buffer *buf,
...@@ -267,9 +265,6 @@ struct rc_pid_info { ...@@ -267,9 +265,6 @@ struct rc_pid_info {
/* Normalization offset. */ /* Normalization offset. */
unsigned int norm_offset; unsigned int norm_offset;
/* Fast starst parameter. */
unsigned int fast_start;
/* Rates information. */ /* Rates information. */
struct rc_pid_rateinfo *rinfo; struct rc_pid_rateinfo *rinfo;
......
...@@ -398,13 +398,25 @@ static void *rate_control_pid_alloc(struct ieee80211_local *local) ...@@ -398,13 +398,25 @@ static void *rate_control_pid_alloc(struct ieee80211_local *local)
return NULL; return NULL;
} }
pinfo->target = RC_PID_TARGET_PF;
pinfo->sampling_period = RC_PID_INTERVAL;
pinfo->coeff_p = RC_PID_COEFF_P;
pinfo->coeff_i = RC_PID_COEFF_I;
pinfo->coeff_d = RC_PID_COEFF_D;
pinfo->smoothing_shift = RC_PID_SMOOTHING_SHIFT;
pinfo->sharpen_factor = RC_PID_SHARPENING_FACTOR;
pinfo->sharpen_duration = RC_PID_SHARPENING_DURATION;
pinfo->norm_offset = RC_PID_NORM_OFFSET;
pinfo->rinfo = rinfo;
pinfo->oldrate = 0;
/* Sort the rates. This is optimized for the most common case (i.e. /* Sort the rates. This is optimized for the most common case (i.e.
* almost-sorted CCK+OFDM rates). Kind of bubble-sort with reversed * almost-sorted CCK+OFDM rates). Kind of bubble-sort with reversed
* mapping too. */ * mapping too. */
for (i = 0; i < sband->n_bitrates; i++) { for (i = 0; i < sband->n_bitrates; i++) {
rinfo[i].index = i; rinfo[i].index = i;
rinfo[i].rev_index = i; rinfo[i].rev_index = i;
if (pinfo->fast_start) if (RC_PID_FAST_START)
rinfo[i].diff = 0; rinfo[i].diff = 0;
else else
rinfo[i].diff = i * pinfo->norm_offset; rinfo[i].diff = i * pinfo->norm_offset;
...@@ -425,19 +437,6 @@ static void *rate_control_pid_alloc(struct ieee80211_local *local) ...@@ -425,19 +437,6 @@ static void *rate_control_pid_alloc(struct ieee80211_local *local)
break; break;
} }
pinfo->target = RC_PID_TARGET_PF;
pinfo->sampling_period = RC_PID_INTERVAL;
pinfo->coeff_p = RC_PID_COEFF_P;
pinfo->coeff_i = RC_PID_COEFF_I;
pinfo->coeff_d = RC_PID_COEFF_D;
pinfo->smoothing_shift = RC_PID_SMOOTHING_SHIFT;
pinfo->sharpen_factor = RC_PID_SHARPENING_FACTOR;
pinfo->sharpen_duration = RC_PID_SHARPENING_DURATION;
pinfo->norm_offset = RC_PID_NORM_OFFSET;
pinfo->fast_start = RC_PID_FAST_START;
pinfo->rinfo = rinfo;
pinfo->oldrate = 0;
#ifdef CONFIG_MAC80211_DEBUGFS #ifdef CONFIG_MAC80211_DEBUGFS
de = &pinfo->dentries; de = &pinfo->dentries;
de->dir = debugfs_create_dir("rc80211_pid", de->dir = debugfs_create_dir("rc80211_pid",
...@@ -465,9 +464,6 @@ static void *rate_control_pid_alloc(struct ieee80211_local *local) ...@@ -465,9 +464,6 @@ static void *rate_control_pid_alloc(struct ieee80211_local *local)
de->norm_offset = debugfs_create_u32("norm_offset", de->norm_offset = debugfs_create_u32("norm_offset",
S_IRUSR | S_IWUSR, de->dir, S_IRUSR | S_IWUSR, de->dir,
&pinfo->norm_offset); &pinfo->norm_offset);
de->fast_start = debugfs_create_bool("fast_start",
S_IRUSR | S_IWUSR, de->dir,
&pinfo->fast_start);
#endif #endif
return pinfo; return pinfo;
...@@ -479,7 +475,6 @@ static void rate_control_pid_free(void *priv) ...@@ -479,7 +475,6 @@ static void rate_control_pid_free(void *priv)
#ifdef CONFIG_MAC80211_DEBUGFS #ifdef CONFIG_MAC80211_DEBUGFS
struct rc_pid_debugfs_entries *de = &pinfo->dentries; struct rc_pid_debugfs_entries *de = &pinfo->dentries;
debugfs_remove(de->fast_start);
debugfs_remove(de->norm_offset); debugfs_remove(de->norm_offset);
debugfs_remove(de->sharpen_duration); debugfs_remove(de->sharpen_duration);
debugfs_remove(de->sharpen_factor); debugfs_remove(de->sharpen_factor);
......
...@@ -844,10 +844,16 @@ static int tcp_packet(struct nf_conn *ct, ...@@ -844,10 +844,16 @@ static int tcp_packet(struct nf_conn *ct,
/* Attempt to reopen a closed/aborted connection. /* Attempt to reopen a closed/aborted connection.
* Delete this connection and look up again. */ * Delete this connection and look up again. */
write_unlock_bh(&tcp_lock); write_unlock_bh(&tcp_lock);
if (del_timer(&ct->timeout)) /* Only repeat if we can actually remove the timer.
* Destruction may already be in progress in process
* context and we must give it a chance to terminate.
*/
if (del_timer(&ct->timeout)) {
ct->timeout.function((unsigned long)ct); ct->timeout.function((unsigned long)ct);
return -NF_REPEAT; return -NF_REPEAT;
} }
return -NF_DROP;
}
/* Fall through */ /* Fall through */
case TCP_CONNTRACK_IGNORE: case TCP_CONNTRACK_IGNORE:
/* Ignored packets: /* Ignored packets:
......
...@@ -584,12 +584,7 @@ static int netlbl_cipsov4_list(struct sk_buff *skb, struct genl_info *info) ...@@ -584,12 +584,7 @@ static int netlbl_cipsov4_list(struct sk_buff *skb, struct genl_info *info)
rcu_read_unlock(); rcu_read_unlock();
genlmsg_end(ans_skb, data); genlmsg_end(ans_skb, data);
return genlmsg_reply(ans_skb, info);
ret_val = genlmsg_reply(ans_skb, info);
if (ret_val != 0)
goto list_failure;
return 0;
list_retry: list_retry:
/* XXX - this limit is a guesstimate */ /* XXX - this limit is a guesstimate */
......
...@@ -386,11 +386,7 @@ static int netlbl_mgmt_listdef(struct sk_buff *skb, struct genl_info *info) ...@@ -386,11 +386,7 @@ static int netlbl_mgmt_listdef(struct sk_buff *skb, struct genl_info *info)
rcu_read_unlock(); rcu_read_unlock();
genlmsg_end(ans_skb, data); genlmsg_end(ans_skb, data);
return genlmsg_reply(ans_skb, info);
ret_val = genlmsg_reply(ans_skb, info);
if (ret_val != 0)
goto listdef_failure;
return 0;
listdef_failure_lock: listdef_failure_lock:
rcu_read_unlock(); rcu_read_unlock();
...@@ -501,11 +497,7 @@ static int netlbl_mgmt_version(struct sk_buff *skb, struct genl_info *info) ...@@ -501,11 +497,7 @@ static int netlbl_mgmt_version(struct sk_buff *skb, struct genl_info *info)
goto version_failure; goto version_failure;
genlmsg_end(ans_skb, data); genlmsg_end(ans_skb, data);
return genlmsg_reply(ans_skb, info);
ret_val = genlmsg_reply(ans_skb, info);
if (ret_val != 0)
goto version_failure;
return 0;
version_failure: version_failure:
kfree_skb(ans_skb); kfree_skb(ans_skb);
......
...@@ -1107,11 +1107,7 @@ static int netlbl_unlabel_list(struct sk_buff *skb, struct genl_info *info) ...@@ -1107,11 +1107,7 @@ static int netlbl_unlabel_list(struct sk_buff *skb, struct genl_info *info)
goto list_failure; goto list_failure;
genlmsg_end(ans_skb, data); genlmsg_end(ans_skb, data);
return genlmsg_reply(ans_skb, info);
ret_val = genlmsg_reply(ans_skb, info);
if (ret_val != 0)
goto list_failure;
return 0;
list_failure: list_failure:
kfree_skb(ans_skb); kfree_skb(ans_skb);
......
...@@ -5899,12 +5899,6 @@ static int sctp_eat_data(const struct sctp_association *asoc, ...@@ -5899,12 +5899,6 @@ static int sctp_eat_data(const struct sctp_association *asoc,
return SCTP_IERROR_NO_DATA; return SCTP_IERROR_NO_DATA;
} }
/* If definately accepting the DATA chunk, record its TSN, otherwise
* wait for renege processing.
*/
if (SCTP_CMD_CHUNK_ULP == deliver)
sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_TSN, SCTP_U32(tsn));
chunk->data_accepted = 1; chunk->data_accepted = 1;
/* Note: Some chunks may get overcounted (if we drop) or overcounted /* Note: Some chunks may get overcounted (if we drop) or overcounted
...@@ -5924,6 +5918,9 @@ static int sctp_eat_data(const struct sctp_association *asoc, ...@@ -5924,6 +5918,9 @@ static int sctp_eat_data(const struct sctp_association *asoc,
* and discard the DATA chunk. * and discard the DATA chunk.
*/ */
if (ntohs(data_hdr->stream) >= asoc->c.sinit_max_instreams) { if (ntohs(data_hdr->stream) >= asoc->c.sinit_max_instreams) {
/* Mark tsn as received even though we drop it */
sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_TSN, SCTP_U32(tsn));
err = sctp_make_op_error(asoc, chunk, SCTP_ERROR_INV_STRM, err = sctp_make_op_error(asoc, chunk, SCTP_ERROR_INV_STRM,
&data_hdr->stream, &data_hdr->stream,
sizeof(data_hdr->stream)); sizeof(data_hdr->stream));
......
...@@ -710,6 +710,11 @@ struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc, ...@@ -710,6 +710,11 @@ struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc,
if (!skb) if (!skb)
goto fail; goto fail;
/* Now that all memory allocations for this chunk succeeded, we
* can mark it as received so the tsn_map is updated correctly.
*/
sctp_tsnmap_mark(&asoc->peer.tsn_map, ntohl(chunk->subh.data_hdr->tsn));
/* First calculate the padding, so we don't inadvertently /* First calculate the padding, so we don't inadvertently
* pass up the wrong length to the user. * pass up the wrong length to the user.
* *
......
...@@ -277,9 +277,8 @@ static void copy_from_user_state(struct xfrm_state *x, struct xfrm_usersa_info * ...@@ -277,9 +277,8 @@ static void copy_from_user_state(struct xfrm_state *x, struct xfrm_usersa_info *
memcpy(&x->props.saddr, &p->saddr, sizeof(x->props.saddr)); memcpy(&x->props.saddr, &p->saddr, sizeof(x->props.saddr));
x->props.flags = p->flags; x->props.flags = p->flags;
if (!x->sel.family) if (!x->sel.family && !(p->flags & XFRM_STATE_AF_UNSPEC))
x->sel.family = p->family; x->sel.family = p->family;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment