Commit 5d677670 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: (22 commits)
  be2net: set proper value to version field in req hdr
  xfrm: Fix xfrm_state_clone leak
  ipcomp: Avoid duplicate calls to ipcomp_destroy
  ethtool: allow non-admin user to read GRO settings.
  ixgbe: fix WOL register setup for 82599
  ixgbe: Fix - Do not allow Rx FC on 82598 at 1G due to errata
  sfc: Fix SFE4002 initialisation
  mac80211: fix handling of null-rate control in rate_control_get_rate
  inet: Remove bogus IGMPv3 report handling
  iwlwifi: fix AMSDU Rx after paged Rx patch
  tcp: fix ICMP-RTO war
  via-velocity: Fix races on shared interrupts
  via-velocity: Take spinlock on set coalesce
  via-velocity: Remove unused IRQ status parameter from rx_srv and tx_srv
  rtl8187: Add new device ID
  iwmc3200wifi: Test of wrong pointer after kzalloc in iwm_mlme_update_bss_table()
  ath9k: Fix sequence numbers for PAE frames
  mac80211: fix deferred hardware scan requests
  iwlwifi: Fix to set correct ht configuration
  mac80211: Fix probe request filtering in IBSS mode
  ...
parents 88626272 07793d33
...@@ -296,6 +296,7 @@ static void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr, ...@@ -296,6 +296,7 @@ static void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr,
req_hdr->opcode = opcode; req_hdr->opcode = opcode;
req_hdr->subsystem = subsystem; req_hdr->subsystem = subsystem;
req_hdr->request_length = cpu_to_le32(cmd_len - sizeof(*req_hdr)); req_hdr->request_length = cpu_to_le32(cmd_len - sizeof(*req_hdr));
req_hdr->version = 0;
} }
static void be_cmd_page_addrs_prepare(struct phys_addr *pages, u32 max_pages, static void be_cmd_page_addrs_prepare(struct phys_addr *pages, u32 max_pages,
......
...@@ -357,12 +357,34 @@ static s32 ixgbe_fc_enable_82598(struct ixgbe_hw *hw, s32 packetbuf_num) ...@@ -357,12 +357,34 @@ static s32 ixgbe_fc_enable_82598(struct ixgbe_hw *hw, s32 packetbuf_num)
u32 fctrl_reg; u32 fctrl_reg;
u32 rmcs_reg; u32 rmcs_reg;
u32 reg; u32 reg;
u32 link_speed = 0;
bool link_up;
#ifdef CONFIG_DCB #ifdef CONFIG_DCB
if (hw->fc.requested_mode == ixgbe_fc_pfc) if (hw->fc.requested_mode == ixgbe_fc_pfc)
goto out; goto out;
#endif /* CONFIG_DCB */ #endif /* CONFIG_DCB */
/*
* On 82598 having Rx FC on causes resets while doing 1G
* so if it's on turn it off once we know link_speed. For
* more details see 82598 Specification update.
*/
hw->mac.ops.check_link(hw, &link_speed, &link_up, false);
if (link_up && link_speed == IXGBE_LINK_SPEED_1GB_FULL) {
switch (hw->fc.requested_mode) {
case ixgbe_fc_full:
hw->fc.requested_mode = ixgbe_fc_tx_pause;
break;
case ixgbe_fc_rx_pause:
hw->fc.requested_mode = ixgbe_fc_none;
break;
default:
/* no change */
break;
}
}
/* Negotiate the fc mode to use */ /* Negotiate the fc mode to use */
ret_val = ixgbe_fc_autoneg(hw); ret_val = ixgbe_fc_autoneg(hw);
if (ret_val) if (ret_val)
......
...@@ -5763,6 +5763,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, ...@@ -5763,6 +5763,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
if (err) if (err)
goto err_sw_init; goto err_sw_init;
/* Make it possible the adapter to be woken up via WOL */
if (adapter->hw.mac.type == ixgbe_mac_82599EB)
IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0);
/* /*
* If there is a fan on this device and it has failed log the * If there is a fan on this device and it has failed log the
* failure. * failure.
......
...@@ -2284,6 +2284,7 @@ static int __devinit efx_pci_probe(struct pci_dev *pci_dev, ...@@ -2284,6 +2284,7 @@ static int __devinit efx_pci_probe(struct pci_dev *pci_dev,
fail2: fail2:
efx_fini_struct(efx); efx_fini_struct(efx);
fail1: fail1:
WARN_ON(rc > 0);
EFX_LOG(efx, "initialisation failed. rc=%d\n", rc); EFX_LOG(efx, "initialisation failed. rc=%d\n", rc);
free_netdev(net_dev); free_netdev(net_dev);
return rc; return rc;
......
...@@ -320,7 +320,7 @@ static int qt202x_reset_phy(struct efx_nic *efx) ...@@ -320,7 +320,7 @@ static int qt202x_reset_phy(struct efx_nic *efx)
falcon_board(efx)->type->init_phy(efx); falcon_board(efx)->type->init_phy(efx);
return rc; return 0;
fail: fail:
EFX_ERR(efx, "PHY reset timed out\n"); EFX_ERR(efx, "PHY reset timed out\n");
......
...@@ -1877,13 +1877,12 @@ static void velocity_error(struct velocity_info *vptr, int status) ...@@ -1877,13 +1877,12 @@ static void velocity_error(struct velocity_info *vptr, int status)
/** /**
* tx_srv - transmit interrupt service * tx_srv - transmit interrupt service
* @vptr; Velocity * @vptr; Velocity
* @status:
* *
* Scan the queues looking for transmitted packets that * Scan the queues looking for transmitted packets that
* we can complete and clean up. Update any statistics as * we can complete and clean up. Update any statistics as
* necessary/ * necessary/
*/ */
static int velocity_tx_srv(struct velocity_info *vptr, u32 status) static int velocity_tx_srv(struct velocity_info *vptr)
{ {
struct tx_desc *td; struct tx_desc *td;
int qnum; int qnum;
...@@ -2090,14 +2089,12 @@ static int velocity_receive_frame(struct velocity_info *vptr, int idx) ...@@ -2090,14 +2089,12 @@ static int velocity_receive_frame(struct velocity_info *vptr, int idx)
/** /**
* velocity_rx_srv - service RX interrupt * velocity_rx_srv - service RX interrupt
* @vptr: velocity * @vptr: velocity
* @status: adapter status (unused)
* *
* Walk the receive ring of the velocity adapter and remove * Walk the receive ring of the velocity adapter and remove
* any received packets from the receive queue. Hand the ring * any received packets from the receive queue. Hand the ring
* slots back to the adapter for reuse. * slots back to the adapter for reuse.
*/ */
static int velocity_rx_srv(struct velocity_info *vptr, int status, static int velocity_rx_srv(struct velocity_info *vptr, int budget_left)
int budget_left)
{ {
struct net_device_stats *stats = &vptr->dev->stats; struct net_device_stats *stats = &vptr->dev->stats;
int rd_curr = vptr->rx.curr; int rd_curr = vptr->rx.curr;
...@@ -2151,32 +2148,24 @@ static int velocity_poll(struct napi_struct *napi, int budget) ...@@ -2151,32 +2148,24 @@ static int velocity_poll(struct napi_struct *napi, int budget)
struct velocity_info *vptr = container_of(napi, struct velocity_info *vptr = container_of(napi,
struct velocity_info, napi); struct velocity_info, napi);
unsigned int rx_done; unsigned int rx_done;
u32 isr_status; unsigned long flags;
spin_lock(&vptr->lock);
isr_status = mac_read_isr(vptr->mac_regs);
/* Ack the interrupt */
mac_write_isr(vptr->mac_regs, isr_status);
if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI)))
velocity_error(vptr, isr_status);
spin_lock_irqsave(&vptr->lock, flags);
/* /*
* Do rx and tx twice for performance (taken from the VIA * Do rx and tx twice for performance (taken from the VIA
* out-of-tree driver). * out-of-tree driver).
*/ */
rx_done = velocity_rx_srv(vptr, isr_status, budget / 2); rx_done = velocity_rx_srv(vptr, budget / 2);
velocity_tx_srv(vptr, isr_status); velocity_tx_srv(vptr);
rx_done += velocity_rx_srv(vptr, isr_status, budget - rx_done); rx_done += velocity_rx_srv(vptr, budget - rx_done);
velocity_tx_srv(vptr, isr_status); velocity_tx_srv(vptr);
spin_unlock(&vptr->lock);
/* If budget not fully consumed, exit the polling mode */ /* If budget not fully consumed, exit the polling mode */
if (rx_done < budget) { if (rx_done < budget) {
napi_complete(napi); napi_complete(napi);
mac_enable_int(vptr->mac_regs); mac_enable_int(vptr->mac_regs);
} }
spin_unlock_irqrestore(&vptr->lock, flags);
return rx_done; return rx_done;
} }
...@@ -2206,10 +2195,17 @@ static irqreturn_t velocity_intr(int irq, void *dev_instance) ...@@ -2206,10 +2195,17 @@ static irqreturn_t velocity_intr(int irq, void *dev_instance)
return IRQ_NONE; return IRQ_NONE;
} }
/* Ack the interrupt */
mac_write_isr(vptr->mac_regs, isr_status);
if (likely(napi_schedule_prep(&vptr->napi))) { if (likely(napi_schedule_prep(&vptr->napi))) {
mac_disable_int(vptr->mac_regs); mac_disable_int(vptr->mac_regs);
__napi_schedule(&vptr->napi); __napi_schedule(&vptr->napi);
} }
if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI)))
velocity_error(vptr, isr_status);
spin_unlock(&vptr->lock); spin_unlock(&vptr->lock);
return IRQ_HANDLED; return IRQ_HANDLED;
...@@ -3100,7 +3096,7 @@ static int velocity_resume(struct pci_dev *pdev) ...@@ -3100,7 +3096,7 @@ static int velocity_resume(struct pci_dev *pdev)
velocity_init_registers(vptr, VELOCITY_INIT_WOL); velocity_init_registers(vptr, VELOCITY_INIT_WOL);
mac_disable_int(vptr->mac_regs); mac_disable_int(vptr->mac_regs);
velocity_tx_srv(vptr, 0); velocity_tx_srv(vptr);
for (i = 0; i < vptr->tx.numq; i++) { for (i = 0; i < vptr->tx.numq; i++) {
if (vptr->tx.used[i]) if (vptr->tx.used[i])
...@@ -3344,6 +3340,7 @@ static int velocity_set_coalesce(struct net_device *dev, ...@@ -3344,6 +3340,7 @@ static int velocity_set_coalesce(struct net_device *dev,
{ {
struct velocity_info *vptr = netdev_priv(dev); struct velocity_info *vptr = netdev_priv(dev);
int max_us = 0x3f * 64; int max_us = 0x3f * 64;
unsigned long flags;
/* 6 bits of */ /* 6 bits of */
if (ecmd->tx_coalesce_usecs > max_us) if (ecmd->tx_coalesce_usecs > max_us)
...@@ -3365,6 +3362,7 @@ static int velocity_set_coalesce(struct net_device *dev, ...@@ -3365,6 +3362,7 @@ static int velocity_set_coalesce(struct net_device *dev,
ecmd->tx_coalesce_usecs); ecmd->tx_coalesce_usecs);
/* Setup the interrupt suppression and queue timers */ /* Setup the interrupt suppression and queue timers */
spin_lock_irqsave(&vptr->lock, flags);
mac_disable_int(vptr->mac_regs); mac_disable_int(vptr->mac_regs);
setup_adaptive_interrupts(vptr); setup_adaptive_interrupts(vptr);
setup_queue_timers(vptr); setup_queue_timers(vptr);
...@@ -3372,6 +3370,7 @@ static int velocity_set_coalesce(struct net_device *dev, ...@@ -3372,6 +3370,7 @@ static int velocity_set_coalesce(struct net_device *dev,
mac_write_int_mask(vptr->int_mask, vptr->mac_regs); mac_write_int_mask(vptr->int_mask, vptr->mac_regs);
mac_clear_isr(vptr->mac_regs); mac_clear_isr(vptr->mac_regs);
mac_enable_int(vptr->mac_regs); mac_enable_int(vptr->mac_regs);
spin_unlock_irqrestore(&vptr->lock, flags);
return 0; return 0;
} }
......
...@@ -1615,7 +1615,7 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf, ...@@ -1615,7 +1615,7 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf,
bf->bf_frmlen -= padsize; bf->bf_frmlen -= padsize;
} }
if (conf_is_ht(&hw->conf) && !is_pae(skb)) if (conf_is_ht(&hw->conf))
bf->bf_state.bf_type |= BUF_HT; bf->bf_state.bf_type |= BUF_HT;
bf->bf_flags = setup_tx_flags(sc, skb, txctl->txq); bf->bf_flags = setup_tx_flags(sc, skb, txctl->txq);
...@@ -1701,7 +1701,7 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf, ...@@ -1701,7 +1701,7 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf,
goto tx_done; goto tx_done;
} }
if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) { if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && !is_pae(skb)) {
/* /*
* Try aggregation if it's a unicast data frame * Try aggregation if it's a unicast data frame
* and the destination is HT capable. * and the destination is HT capable.
......
...@@ -115,6 +115,7 @@ ...@@ -115,6 +115,7 @@
#define B43_MMIO_TSF_2 0x636 /* core rev < 3 only */ #define B43_MMIO_TSF_2 0x636 /* core rev < 3 only */
#define B43_MMIO_TSF_3 0x638 /* core rev < 3 only */ #define B43_MMIO_TSF_3 0x638 /* core rev < 3 only */
#define B43_MMIO_RNG 0x65A #define B43_MMIO_RNG 0x65A
#define B43_MMIO_IFSSLOT 0x684 /* Interframe slot time */
#define B43_MMIO_IFSCTL 0x688 /* Interframe space control */ #define B43_MMIO_IFSCTL 0x688 /* Interframe space control */
#define B43_MMIO_IFSCTL_USE_EDCF 0x0004 #define B43_MMIO_IFSCTL_USE_EDCF 0x0004
#define B43_MMIO_POWERUP_DELAY 0x6A8 #define B43_MMIO_POWERUP_DELAY 0x6A8
......
...@@ -628,10 +628,17 @@ static void b43_upload_card_macaddress(struct b43_wldev *dev) ...@@ -628,10 +628,17 @@ static void b43_upload_card_macaddress(struct b43_wldev *dev)
static void b43_set_slot_time(struct b43_wldev *dev, u16 slot_time) static void b43_set_slot_time(struct b43_wldev *dev, u16 slot_time)
{ {
/* slot_time is in usec. */ /* slot_time is in usec. */
if (dev->phy.type != B43_PHYTYPE_G) /* This test used to exit for all but a G PHY. */
if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ)
return; return;
b43_write16(dev, 0x684, 510 + slot_time); b43_write16(dev, B43_MMIO_IFSSLOT, 510 + slot_time);
b43_shm_write16(dev, B43_SHM_SHARED, 0x0010, slot_time); /* Shared memory location 0x0010 is the slot time and should be
* set to slot_time; however, this register is initially 0 and changing
* the value adversely affects the transmit rate for BCM4311
* devices. Until this behavior is unterstood, delete this step
*
* b43_shm_write16(dev, B43_SHM_SHARED, 0x0010, slot_time);
*/
} }
static void b43_short_slot_timing_enable(struct b43_wldev *dev) static void b43_short_slot_timing_enable(struct b43_wldev *dev)
......
...@@ -2744,6 +2744,7 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed) ...@@ -2744,6 +2744,7 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
if ((le16_to_cpu(priv->staging_rxon.channel) != ch)) if ((le16_to_cpu(priv->staging_rxon.channel) != ch))
priv->staging_rxon.flags = 0; priv->staging_rxon.flags = 0;
iwl_set_rxon_ht(priv, ht_conf);
iwl_set_rxon_channel(priv, conf->channel); iwl_set_rxon_channel(priv, conf->channel);
iwl_set_flags_for_band(priv, conf->channel->band); iwl_set_flags_for_band(priv, conf->channel->band);
......
...@@ -928,7 +928,10 @@ static void iwl_pass_packet_to_mac80211(struct iwl_priv *priv, ...@@ -928,7 +928,10 @@ static void iwl_pass_packet_to_mac80211(struct iwl_priv *priv,
if (ieee80211_is_mgmt(fc) || if (ieee80211_is_mgmt(fc) ||
ieee80211_has_protected(fc) || ieee80211_has_protected(fc) ||
ieee80211_has_morefrags(fc) || ieee80211_has_morefrags(fc) ||
le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG) le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG ||
(ieee80211_is_data_qos(fc) &&
*ieee80211_get_qos_ctl(hdr) &
IEEE80211_QOS_CONTROL_A_MSDU_PRESENT))
ret = skb_linearize(skb); ret = skb_linearize(skb);
else else
ret = __pskb_pull_tail(skb, min_t(u16, IWL_LINK_HDR_MAX, len)) ? ret = __pskb_pull_tail(skb, min_t(u16, IWL_LINK_HDR_MAX, len)) ?
......
...@@ -794,7 +794,7 @@ static int iwm_mlme_update_bss_table(struct iwm_priv *iwm, u8 *buf, ...@@ -794,7 +794,7 @@ static int iwm_mlme_update_bss_table(struct iwm_priv *iwm, u8 *buf,
} }
bss->bss = kzalloc(bss_len, GFP_KERNEL); bss->bss = kzalloc(bss_len, GFP_KERNEL);
if (!bss) { if (!bss->bss) {
kfree(bss); kfree(bss);
IWM_ERR(iwm, "Couldn't allocate bss\n"); IWM_ERR(iwm, "Couldn't allocate bss\n");
return -ENOMEM; return -ENOMEM;
......
...@@ -65,6 +65,7 @@ static struct usb_device_id rtl8187_table[] __devinitdata = { ...@@ -65,6 +65,7 @@ static struct usb_device_id rtl8187_table[] __devinitdata = {
/* Sitecom */ /* Sitecom */
{USB_DEVICE(0x0df6, 0x000d), .driver_info = DEVICE_RTL8187}, {USB_DEVICE(0x0df6, 0x000d), .driver_info = DEVICE_RTL8187},
{USB_DEVICE(0x0df6, 0x0028), .driver_info = DEVICE_RTL8187B}, {USB_DEVICE(0x0df6, 0x0028), .driver_info = DEVICE_RTL8187B},
{USB_DEVICE(0x0df6, 0x0029), .driver_info = DEVICE_RTL8187B},
/* Sphairon Access Systems GmbH */ /* Sphairon Access Systems GmbH */
{USB_DEVICE(0x114B, 0x0150), .driver_info = DEVICE_RTL8187}, {USB_DEVICE(0x114B, 0x0150), .driver_info = DEVICE_RTL8187},
/* Dick Smith Electronics */ /* Dick Smith Electronics */
......
...@@ -494,8 +494,7 @@ static int ssb_devices_register(struct ssb_bus *bus) ...@@ -494,8 +494,7 @@ static int ssb_devices_register(struct ssb_bus *bus)
#endif #endif
break; break;
case SSB_BUSTYPE_SDIO: case SSB_BUSTYPE_SDIO:
#ifdef CONFIG_SSB_SDIO #ifdef CONFIG_SSB_SDIOHOST
sdev->irq = bus->host_sdio->dev.irq;
dev->parent = &bus->host_sdio->dev; dev->parent = &bus->host_sdio->dev;
#endif #endif
break; break;
......
...@@ -927,6 +927,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr) ...@@ -927,6 +927,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)
case ETHTOOL_GPERMADDR: case ETHTOOL_GPERMADDR:
case ETHTOOL_GUFO: case ETHTOOL_GUFO:
case ETHTOOL_GGSO: case ETHTOOL_GGSO:
case ETHTOOL_GGRO:
case ETHTOOL_GFLAGS: case ETHTOOL_GFLAGS:
case ETHTOOL_GPFLAGS: case ETHTOOL_GPFLAGS:
case ETHTOOL_GRXFH: case ETHTOOL_GRXFH:
......
...@@ -946,7 +946,6 @@ int igmp_rcv(struct sk_buff *skb) ...@@ -946,7 +946,6 @@ int igmp_rcv(struct sk_buff *skb)
break; break;
case IGMP_HOST_MEMBERSHIP_REPORT: case IGMP_HOST_MEMBERSHIP_REPORT:
case IGMPV2_HOST_MEMBERSHIP_REPORT: case IGMPV2_HOST_MEMBERSHIP_REPORT:
case IGMPV3_HOST_MEMBERSHIP_REPORT:
/* Is it our report looped back? */ /* Is it our report looped back? */
if (skb_rtable(skb)->fl.iif == 0) if (skb_rtable(skb)->fl.iif == 0)
break; break;
...@@ -960,6 +959,7 @@ int igmp_rcv(struct sk_buff *skb) ...@@ -960,6 +959,7 @@ int igmp_rcv(struct sk_buff *skb)
in_dev_put(in_dev); in_dev_put(in_dev);
return pim_rcv_v1(skb); return pim_rcv_v1(skb);
#endif #endif
case IGMPV3_HOST_MEMBERSHIP_REPORT:
case IGMP_DVMRP: case IGMP_DVMRP:
case IGMP_TRACE: case IGMP_TRACE:
case IGMP_HOST_LEAVE_MESSAGE: case IGMP_HOST_LEAVE_MESSAGE:
......
...@@ -124,16 +124,12 @@ static int ipcomp4_init_state(struct xfrm_state *x) ...@@ -124,16 +124,12 @@ static int ipcomp4_init_state(struct xfrm_state *x)
if (x->props.mode == XFRM_MODE_TUNNEL) { if (x->props.mode == XFRM_MODE_TUNNEL) {
err = ipcomp_tunnel_attach(x); err = ipcomp_tunnel_attach(x);
if (err) if (err)
goto error_tunnel; goto out;
} }
err = 0; err = 0;
out: out:
return err; return err;
error_tunnel:
ipcomp_destroy(x);
goto out;
} }
static const struct xfrm_type ipcomp_type = { static const struct xfrm_type ipcomp_type = {
......
...@@ -5783,11 +5783,9 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, ...@@ -5783,11 +5783,9 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
/* tcp_ack considers this ACK as duplicate /* tcp_ack considers this ACK as duplicate
* and does not calculate rtt. * and does not calculate rtt.
* Fix it at least with timestamps. * Force it here.
*/ */
if (tp->rx_opt.saw_tstamp && tcp_ack_update_rtt(sk, 0, 0);
tp->rx_opt.rcv_tsecr && !tp->srtt)
tcp_ack_saw_tstamp(sk, 0);
if (tp->rx_opt.tstamp_ok) if (tp->rx_opt.tstamp_ok)
tp->advmss -= TCPOLEN_TSTAMP_ALIGNED; tp->advmss -= TCPOLEN_TSTAMP_ALIGNED;
......
...@@ -154,16 +154,12 @@ static int ipcomp6_init_state(struct xfrm_state *x) ...@@ -154,16 +154,12 @@ static int ipcomp6_init_state(struct xfrm_state *x)
if (x->props.mode == XFRM_MODE_TUNNEL) { if (x->props.mode == XFRM_MODE_TUNNEL) {
err = ipcomp6_tunnel_attach(x); err = ipcomp6_tunnel_attach(x);
if (err) if (err)
goto error_tunnel; goto out;
} }
err = 0; err = 0;
out: out:
return err; return err;
error_tunnel:
ipcomp_destroy(x);
goto out;
} }
static const struct xfrm_type ipcomp6_type = static const struct xfrm_type ipcomp6_type =
......
...@@ -647,7 +647,7 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, ...@@ -647,7 +647,7 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata,
} }
if (pos[1] != 0 && if (pos[1] != 0 &&
(pos[1] != ifibss->ssid_len || (pos[1] != ifibss->ssid_len ||
!memcmp(pos + 2, ifibss->ssid, ifibss->ssid_len))) { memcmp(pos + 2, ifibss->ssid, ifibss->ssid_len))) {
/* Ignore ProbeReq for foreign SSID */ /* Ignore ProbeReq for foreign SSID */
return; return;
} }
......
...@@ -245,6 +245,9 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata, ...@@ -245,6 +245,9 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata,
info->control.rates[i].count = 1; info->control.rates[i].count = 1;
} }
if (sdata->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
return;
if (sta && sdata->force_unicast_rateidx > -1) { if (sta && sdata->force_unicast_rateidx > -1) {
info->control.rates[0].idx = sdata->force_unicast_rateidx; info->control.rates[0].idx = sdata->force_unicast_rateidx;
} else { } else {
......
...@@ -439,6 +439,16 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, ...@@ -439,6 +439,16 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
if (local->scan_req) if (local->scan_req)
return -EBUSY; return -EBUSY;
if (req != local->int_scan_req &&
sdata->vif.type == NL80211_IFTYPE_STATION &&
!list_empty(&ifmgd->work_list)) {
/* actually wait for the work it's doing to finish/time out */
set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request);
local->scan_req = req;
local->scan_sdata = sdata;
return 0;
}
if (local->ops->hw_scan) { if (local->ops->hw_scan) {
u8 *ies; u8 *ies;
...@@ -463,14 +473,6 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, ...@@ -463,14 +473,6 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
local->scan_req = req; local->scan_req = req;
local->scan_sdata = sdata; local->scan_sdata = sdata;
if (req != local->int_scan_req &&
sdata->vif.type == NL80211_IFTYPE_STATION &&
!list_empty(&ifmgd->work_list)) {
/* actually wait for the work it's doing to finish/time out */
set_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request);
return 0;
}
if (local->ops->hw_scan) if (local->ops->hw_scan)
__set_bit(SCAN_HW_SCANNING, &local->scanning); __set_bit(SCAN_HW_SCANNING, &local->scanning);
else else
......
...@@ -1102,7 +1102,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig, int *errp) ...@@ -1102,7 +1102,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig, int *errp)
int err = -ENOMEM; int err = -ENOMEM;
struct xfrm_state *x = xfrm_state_alloc(net); struct xfrm_state *x = xfrm_state_alloc(net);
if (!x) if (!x)
goto error; goto out;
memcpy(&x->id, &orig->id, sizeof(x->id)); memcpy(&x->id, &orig->id, sizeof(x->id));
memcpy(&x->sel, &orig->sel, sizeof(x->sel)); memcpy(&x->sel, &orig->sel, sizeof(x->sel));
...@@ -1160,16 +1160,10 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig, int *errp) ...@@ -1160,16 +1160,10 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig, int *errp)
return x; return x;
error: error:
xfrm_state_put(x);
out:
if (errp) if (errp)
*errp = err; *errp = err;
if (x) {
kfree(x->aalg);
kfree(x->ealg);
kfree(x->calg);
kfree(x->encap);
kfree(x->coaddr);
}
kfree(x);
return NULL; return NULL;
} }
......
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