Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless

Conflicts:
	drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
	drivers/net/wireless/iwlwifi/pcie/tx.c
This commit is contained in:
John W. Linville 2012-11-21 12:57:56 -05:00
commit b311749477
27 changed files with 148 additions and 52 deletions

View File

@ -67,6 +67,7 @@ static struct usb_device_id ath3k_table[] = {
{ USB_DEVICE(0x13d3, 0x3304) }, { USB_DEVICE(0x13d3, 0x3304) },
{ USB_DEVICE(0x0930, 0x0215) }, { USB_DEVICE(0x0930, 0x0215) },
{ USB_DEVICE(0x0489, 0xE03D) }, { USB_DEVICE(0x0489, 0xE03D) },
{ USB_DEVICE(0x0489, 0xE027) },
/* Atheros AR9285 Malbec with sflash firmware */ /* Atheros AR9285 Malbec with sflash firmware */
{ USB_DEVICE(0x03F0, 0x311D) }, { USB_DEVICE(0x03F0, 0x311D) },

View File

@ -124,6 +124,7 @@ static struct usb_device_id blacklist_table[] = {
{ USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE }, { USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE },
{ USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE }, { USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE },
{ USB_DEVICE(0x0489, 0xe03d), .driver_info = BTUSB_IGNORE }, { USB_DEVICE(0x0489, 0xe03d), .driver_info = BTUSB_IGNORE },
{ USB_DEVICE(0x0489, 0xe027), .driver_info = BTUSB_IGNORE },
/* Atheros AR9285 Malbec with sflash firmware */ /* Atheros AR9285 Malbec with sflash firmware */
{ USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE }, { USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE },

View File

@ -1456,7 +1456,7 @@ static bool ath9k_hw_set_reset_reg(struct ath_hw *ah, u32 type)
switch (type) { switch (type) {
case ATH9K_RESET_POWER_ON: case ATH9K_RESET_POWER_ON:
ret = ath9k_hw_set_reset_power_on(ah); ret = ath9k_hw_set_reset_power_on(ah);
if (!ret) if (ret)
ah->reset_power_on = true; ah->reset_power_on = true;
break; break;
case ATH9K_RESET_WARM: case ATH9K_RESET_WARM:

View File

@ -394,7 +394,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
u16 seq_st = 0, acked_cnt = 0, txfail_cnt = 0, seq_first; u16 seq_st = 0, acked_cnt = 0, txfail_cnt = 0, seq_first;
u32 ba[WME_BA_BMP_SIZE >> 5]; u32 ba[WME_BA_BMP_SIZE >> 5];
int isaggr, txfail, txpending, sendbar = 0, needreset = 0, nbad = 0; int isaggr, txfail, txpending, sendbar = 0, needreset = 0, nbad = 0;
bool rc_update = true; bool rc_update = true, isba;
struct ieee80211_tx_rate rates[4]; struct ieee80211_tx_rate rates[4];
struct ath_frame_info *fi; struct ath_frame_info *fi;
int nframes; int nframes;
@ -438,13 +438,17 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
tidno = ieee80211_get_qos_ctl(hdr)[0] & IEEE80211_QOS_CTL_TID_MASK; tidno = ieee80211_get_qos_ctl(hdr)[0] & IEEE80211_QOS_CTL_TID_MASK;
tid = ATH_AN_2_TID(an, tidno); tid = ATH_AN_2_TID(an, tidno);
seq_first = tid->seq_start; seq_first = tid->seq_start;
isba = ts->ts_flags & ATH9K_TX_BA;
/* /*
* The hardware occasionally sends a tx status for the wrong TID. * The hardware occasionally sends a tx status for the wrong TID.
* In this case, the BA status cannot be considered valid and all * In this case, the BA status cannot be considered valid and all
* subframes need to be retransmitted * subframes need to be retransmitted
*
* Only BlockAcks have a TID and therefore normal Acks cannot be
* checked
*/ */
if (tidno != ts->tid) if (isba && tidno != ts->tid)
txok = false; txok = false;
isaggr = bf_isaggr(bf); isaggr = bf_isaggr(bf);

View File

@ -519,7 +519,7 @@ static void iwlagn_mac_tx(struct ieee80211_hw *hw,
ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
if (iwlagn_tx_skb(priv, control->sta, skb)) if (iwlagn_tx_skb(priv, control->sta, skb))
dev_kfree_skb_any(skb); ieee80211_free_txskb(hw, skb);
} }
static void iwlagn_mac_update_tkip_key(struct ieee80211_hw *hw, static void iwlagn_mac_update_tkip_key(struct ieee80211_hw *hw,
@ -1352,6 +1352,20 @@ static int iwlagn_mac_add_interface(struct ieee80211_hw *hw,
vif_priv->ctx = ctx; vif_priv->ctx = ctx;
ctx->vif = vif; ctx->vif = vif;
/*
* In SNIFFER device type, the firmware reports the FCS to
* the host, rather than snipping it off. Unfortunately,
* mac80211 doesn't (yet) provide a per-packet flag for
* this, so that we have to set the hardware flag based
* on the interfaces added. As the monitor interface can
* only be present by itself, and will be removed before
* other interfaces are added, this is safe.
*/
if (vif->type == NL80211_IFTYPE_MONITOR)
priv->hw->flags |= IEEE80211_HW_RX_INCLUDES_FCS;
else
priv->hw->flags &= ~IEEE80211_HW_RX_INCLUDES_FCS;
err = iwl_setup_interface(priv, ctx); err = iwl_setup_interface(priv, ctx);
if (!err || reset) if (!err || reset)
goto out; goto out;

View File

@ -2107,7 +2107,7 @@ static void iwl_free_skb(struct iwl_op_mode *op_mode, struct sk_buff *skb)
info = IEEE80211_SKB_CB(skb); info = IEEE80211_SKB_CB(skb);
iwl_trans_free_tx_cmd(priv->trans, info->driver_data[1]); iwl_trans_free_tx_cmd(priv->trans, info->driver_data[1]);
dev_kfree_skb_any(skb); ieee80211_free_txskb(priv->hw, skb);
} }
static void iwl_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state) static void iwl_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state)

View File

@ -318,6 +318,14 @@ static void iwl_rx_allocate(struct iwl_trans *trans, gfp_t priority)
dma_map_page(trans->dev, page, 0, dma_map_page(trans->dev, page, 0,
PAGE_SIZE << trans_pcie->rx_page_order, PAGE_SIZE << trans_pcie->rx_page_order,
DMA_FROM_DEVICE); DMA_FROM_DEVICE);
if (dma_mapping_error(trans->dev, rxb->page_dma)) {
rxb->page = NULL;
spin_lock_irqsave(&rxq->lock, flags);
list_add(&rxb->list, &rxq->rx_used);
spin_unlock_irqrestore(&rxq->lock, flags);
__free_pages(page, trans_pcie->rx_page_order);
return;
}
/* dma address must be no more than 36 bits */ /* dma address must be no more than 36 bits */
BUG_ON(rxb->page_dma & ~DMA_BIT_MASK(36)); BUG_ON(rxb->page_dma & ~DMA_BIT_MASK(36));
/* and also 256 byte aligned! */ /* and also 256 byte aligned! */
@ -489,8 +497,19 @@ static void iwl_rx_handle_rxbuf(struct iwl_trans *trans,
dma_map_page(trans->dev, rxb->page, 0, dma_map_page(trans->dev, rxb->page, 0,
PAGE_SIZE << trans_pcie->rx_page_order, PAGE_SIZE << trans_pcie->rx_page_order,
DMA_FROM_DEVICE); DMA_FROM_DEVICE);
if (dma_mapping_error(trans->dev, rxb->page_dma)) {
/*
* free the page(s) as well to not break
* the invariant that the items on the used
* list have no page(s)
*/
__free_pages(rxb->page, trans_pcie->rx_page_order);
rxb->page = NULL;
list_add_tail(&rxb->list, &rxq->rx_used);
} else {
list_add_tail(&rxb->list, &rxq->rx_free); list_add_tail(&rxb->list, &rxq->rx_free);
rxq->free_count++; rxq->free_count++;
}
} else } else
list_add_tail(&rxb->list, &rxq->rx_used); list_add_tail(&rxb->list, &rxq->rx_used);
spin_unlock_irqrestore(&rxq->lock, flags); spin_unlock_irqrestore(&rxq->lock, flags);

View File

@ -890,9 +890,6 @@ mwifiex_cmd_timeout_func(unsigned long function_context)
return; return;
} }
cmd_node = adapter->curr_cmd; cmd_node = adapter->curr_cmd;
if (cmd_node->wait_q_enabled)
adapter->cmd_wait_q.status = -ETIMEDOUT;
if (cmd_node) { if (cmd_node) {
adapter->dbg.timeout_cmd_id = adapter->dbg.timeout_cmd_id =
adapter->dbg.last_cmd_id[adapter->dbg.last_cmd_index]; adapter->dbg.last_cmd_id[adapter->dbg.last_cmd_index];
@ -941,6 +938,14 @@ mwifiex_cmd_timeout_func(unsigned long function_context)
dev_err(adapter->dev, "ps_mode=%d ps_state=%d\n", dev_err(adapter->dev, "ps_mode=%d ps_state=%d\n",
adapter->ps_mode, adapter->ps_state); adapter->ps_mode, adapter->ps_state);
if (cmd_node->wait_q_enabled) {
adapter->cmd_wait_q.status = -ETIMEDOUT;
wake_up_interruptible(&adapter->cmd_wait_q.wait);
mwifiex_cancel_pending_ioctl(adapter);
/* reset cmd_sent flag to unblock new commands */
adapter->cmd_sent = false;
}
} }
if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING) if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING)
mwifiex_init_fw_complete(adapter); mwifiex_init_fw_complete(adapter);

View File

@ -161,7 +161,6 @@ static int mwifiex_sdio_suspend(struct device *dev)
struct sdio_mmc_card *card; struct sdio_mmc_card *card;
struct mwifiex_adapter *adapter; struct mwifiex_adapter *adapter;
mmc_pm_flag_t pm_flag = 0; mmc_pm_flag_t pm_flag = 0;
int hs_actived = 0;
int i; int i;
int ret = 0; int ret = 0;
@ -188,12 +187,14 @@ static int mwifiex_sdio_suspend(struct device *dev)
adapter = card->adapter; adapter = card->adapter;
/* Enable the Host Sleep */ /* Enable the Host Sleep */
hs_actived = mwifiex_enable_hs(adapter); if (!mwifiex_enable_hs(adapter)) {
if (hs_actived) { dev_err(adapter->dev, "cmd: failed to suspend\n");
pr_debug("cmd: suspend with MMC_PM_KEEP_POWER\n"); return -EFAULT;
ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER);
} }
dev_dbg(adapter->dev, "cmd: suspend with MMC_PM_KEEP_POWER\n");
ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER);
/* Indicate device suspended */ /* Indicate device suspended */
adapter->is_suspended = true; adapter->is_suspended = true;

View File

@ -2449,7 +2449,7 @@ static int rt2800_get_gain_calibration_delta(struct rt2x00_dev *rt2x00dev)
/* /*
* Check if temperature compensation is supported. * Check if temperature compensation is supported.
*/ */
if (tssi_bounds[4] == 0xff) if (tssi_bounds[4] == 0xff || step == 0xff)
return 0; return 0;
/* /*

View File

@ -297,6 +297,7 @@ static struct usb_device_id rtl8192c_usb_ids[] = {
/*=== Customer ID ===*/ /*=== Customer ID ===*/
/****** 8188CU ********/ /****** 8188CU ********/
{RTL_USB_DEVICE(0x050d, 0x1102, rtl92cu_hal_cfg)}, /*Belkin - Edimax*/ {RTL_USB_DEVICE(0x050d, 0x1102, rtl92cu_hal_cfg)}, /*Belkin - Edimax*/
{RTL_USB_DEVICE(0x050d, 0x11f2, rtl92cu_hal_cfg)}, /*Belkin - ISY*/
{RTL_USB_DEVICE(0x06f8, 0xe033, rtl92cu_hal_cfg)}, /*Hercules - Edimax*/ {RTL_USB_DEVICE(0x06f8, 0xe033, rtl92cu_hal_cfg)}, /*Hercules - Edimax*/
{RTL_USB_DEVICE(0x07b8, 0x8188, rtl92cu_hal_cfg)}, /*Abocom - Abocom*/ {RTL_USB_DEVICE(0x07b8, 0x8188, rtl92cu_hal_cfg)}, /*Abocom - Abocom*/
{RTL_USB_DEVICE(0x07b8, 0x8189, rtl92cu_hal_cfg)}, /*Funai - Abocom*/ {RTL_USB_DEVICE(0x07b8, 0x8189, rtl92cu_hal_cfg)}, /*Funai - Abocom*/

View File

@ -702,13 +702,14 @@ static void pn533_wq_cmd(struct work_struct *work)
cmd = list_first_entry(&dev->cmd_queue, struct pn533_cmd, queue); cmd = list_first_entry(&dev->cmd_queue, struct pn533_cmd, queue);
list_del(&cmd->queue);
mutex_unlock(&dev->cmd_lock); mutex_unlock(&dev->cmd_lock);
__pn533_send_cmd_frame_async(dev, cmd->out_frame, cmd->in_frame, __pn533_send_cmd_frame_async(dev, cmd->out_frame, cmd->in_frame,
cmd->in_frame_len, cmd->cmd_complete, cmd->in_frame_len, cmd->cmd_complete,
cmd->arg, cmd->flags); cmd->arg, cmd->flags);
list_del(&cmd->queue);
kfree(cmd); kfree(cmd);
} }
@ -1680,11 +1681,14 @@ static void pn533_deactivate_target(struct nfc_dev *nfc_dev,
static int pn533_in_dep_link_up_complete(struct pn533 *dev, void *arg, static int pn533_in_dep_link_up_complete(struct pn533 *dev, void *arg,
u8 *params, int params_len) u8 *params, int params_len)
{ {
struct pn533_cmd_jump_dep *cmd;
struct pn533_cmd_jump_dep_response *resp; struct pn533_cmd_jump_dep_response *resp;
struct nfc_target nfc_target; struct nfc_target nfc_target;
u8 target_gt_len; u8 target_gt_len;
int rc; int rc;
struct pn533_cmd_jump_dep *cmd = (struct pn533_cmd_jump_dep *)arg;
u8 active = cmd->active;
kfree(arg);
if (params_len == -ENOENT) { if (params_len == -ENOENT) {
nfc_dev_dbg(&dev->interface->dev, ""); nfc_dev_dbg(&dev->interface->dev, "");
@ -1706,7 +1710,6 @@ static int pn533_in_dep_link_up_complete(struct pn533 *dev, void *arg,
} }
resp = (struct pn533_cmd_jump_dep_response *) params; resp = (struct pn533_cmd_jump_dep_response *) params;
cmd = (struct pn533_cmd_jump_dep *) arg;
rc = resp->status & PN533_CMD_RET_MASK; rc = resp->status & PN533_CMD_RET_MASK;
if (rc != PN533_CMD_RET_SUCCESS) { if (rc != PN533_CMD_RET_SUCCESS) {
nfc_dev_err(&dev->interface->dev, nfc_dev_err(&dev->interface->dev,
@ -1736,7 +1739,7 @@ static int pn533_in_dep_link_up_complete(struct pn533 *dev, void *arg,
if (rc == 0) if (rc == 0)
rc = nfc_dep_link_is_up(dev->nfc_dev, rc = nfc_dep_link_is_up(dev->nfc_dev,
dev->nfc_dev->targets[0].idx, dev->nfc_dev->targets[0].idx,
!cmd->active, NFC_RF_INITIATOR); !active, NFC_RF_INITIATOR);
return 0; return 0;
} }
@ -1821,11 +1824,7 @@ static int pn533_dep_link_up(struct nfc_dev *nfc_dev, struct nfc_target *target,
rc = pn533_send_cmd_frame_async(dev, dev->out_frame, dev->in_frame, rc = pn533_send_cmd_frame_async(dev, dev->out_frame, dev->in_frame,
dev->in_maxlen, pn533_in_dep_link_up_complete, dev->in_maxlen, pn533_in_dep_link_up_complete,
cmd, GFP_KERNEL); cmd, GFP_KERNEL);
if (rc) if (rc < 0)
goto out;
out:
kfree(cmd); kfree(cmd);
return rc; return rc;
@ -2080,8 +2079,12 @@ error:
static int pn533_tm_send_complete(struct pn533 *dev, void *arg, static int pn533_tm_send_complete(struct pn533 *dev, void *arg,
u8 *params, int params_len) u8 *params, int params_len)
{ {
struct sk_buff *skb_out = arg;
nfc_dev_dbg(&dev->interface->dev, "%s", __func__); nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
dev_kfree_skb(skb_out);
if (params_len < 0) { if (params_len < 0) {
nfc_dev_err(&dev->interface->dev, nfc_dev_err(&dev->interface->dev,
"Error %d when sending data", "Error %d when sending data",
@ -2119,7 +2122,7 @@ static int pn533_tm_send(struct nfc_dev *nfc_dev, struct sk_buff *skb)
rc = pn533_send_cmd_frame_async(dev, out_frame, dev->in_frame, rc = pn533_send_cmd_frame_async(dev, out_frame, dev->in_frame,
dev->in_maxlen, pn533_tm_send_complete, dev->in_maxlen, pn533_tm_send_complete,
NULL, GFP_KERNEL); skb, GFP_KERNEL);
if (rc) { if (rc) {
nfc_dev_err(&dev->interface->dev, nfc_dev_err(&dev->interface->dev,
"Error %d when trying to send data", rc); "Error %d when trying to send data", rc);

View File

@ -1717,11 +1717,11 @@ int hci_register_dev(struct hci_dev *hdev)
if (hdev->dev_type != HCI_AMP) if (hdev->dev_type != HCI_AMP)
set_bit(HCI_AUTO_OFF, &hdev->dev_flags); set_bit(HCI_AUTO_OFF, &hdev->dev_flags);
schedule_work(&hdev->power_on);
hci_notify(hdev, HCI_DEV_REG); hci_notify(hdev, HCI_DEV_REG);
hci_dev_hold(hdev); hci_dev_hold(hdev);
schedule_work(&hdev->power_on);
return id; return id;
err_wqueue: err_wqueue:

View File

@ -326,7 +326,7 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data,
struct hci_dev *d; struct hci_dev *d;
size_t rp_len; size_t rp_len;
u16 count; u16 count;
int i, err; int err;
BT_DBG("sock %p", sk); BT_DBG("sock %p", sk);
@ -347,9 +347,7 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data,
return -ENOMEM; return -ENOMEM;
} }
rp->num_controllers = cpu_to_le16(count); count = 0;
i = 0;
list_for_each_entry(d, &hci_dev_list, list) { list_for_each_entry(d, &hci_dev_list, list) {
if (test_bit(HCI_SETUP, &d->dev_flags)) if (test_bit(HCI_SETUP, &d->dev_flags))
continue; continue;
@ -357,10 +355,13 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data,
if (!mgmt_valid_hdev(d)) if (!mgmt_valid_hdev(d))
continue; continue;
rp->index[i++] = cpu_to_le16(d->id); rp->index[count++] = cpu_to_le16(d->id);
BT_DBG("Added hci%u", d->id); BT_DBG("Added hci%u", d->id);
} }
rp->num_controllers = cpu_to_le16(count);
rp_len = sizeof(*rp) + (2 * count);
read_unlock(&hci_dev_list_lock); read_unlock(&hci_dev_list_lock);
err = cmd_complete(sk, MGMT_INDEX_NONE, MGMT_OP_READ_INDEX_LIST, 0, rp, err = cmd_complete(sk, MGMT_INDEX_NONE, MGMT_OP_READ_INDEX_LIST, 0, rp,
@ -1378,6 +1379,7 @@ static int remove_uuid(struct sock *sk, struct hci_dev *hdev, void *data,
continue; continue;
list_del(&match->list); list_del(&match->list);
kfree(match);
found++; found++;
} }

View File

@ -267,7 +267,7 @@ static void smp_failure(struct l2cap_conn *conn, u8 reason, u8 send)
clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->hcon->flags); clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->hcon->flags);
mgmt_auth_failed(conn->hcon->hdev, conn->dst, hcon->type, mgmt_auth_failed(conn->hcon->hdev, conn->dst, hcon->type,
hcon->dst_type, reason); hcon->dst_type, HCI_ERROR_AUTH_FAILURE);
cancel_delayed_work_sync(&conn->security_timer); cancel_delayed_work_sync(&conn->security_timer);

View File

@ -429,6 +429,17 @@ static struct attribute_group netstat_group = {
.name = "statistics", .name = "statistics",
.attrs = netstat_attrs, .attrs = netstat_attrs,
}; };
#if IS_ENABLED(CONFIG_WIRELESS_EXT) || IS_ENABLED(CONFIG_CFG80211)
static struct attribute *wireless_attrs[] = {
NULL
};
static struct attribute_group wireless_group = {
.name = "wireless",
.attrs = wireless_attrs,
};
#endif
#endif /* CONFIG_SYSFS */ #endif /* CONFIG_SYSFS */
#ifdef CONFIG_RPS #ifdef CONFIG_RPS
@ -1409,6 +1420,15 @@ int netdev_register_kobject(struct net_device *net)
groups++; groups++;
*groups++ = &netstat_group; *groups++ = &netstat_group;
#if IS_ENABLED(CONFIG_WIRELESS_EXT) || IS_ENABLED(CONFIG_CFG80211)
if (net->ieee80211_ptr)
*groups++ = &wireless_group;
#if IS_ENABLED(CONFIG_WIRELESS_EXT)
else if (net->wireless_handlers)
*groups++ = &wireless_group;
#endif
#endif
#endif /* CONFIG_SYSFS */ #endif /* CONFIG_SYSFS */
error = device_add(dev); error = device_add(dev);

View File

@ -2673,6 +2673,9 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy,
else else
local->probe_req_reg--; local->probe_req_reg--;
if (!local->open_count)
break;
ieee80211_queue_work(&local->hw, &local->reconfig_filter); ieee80211_queue_work(&local->hw, &local->reconfig_filter);
break; break;
default: default:

View File

@ -1156,10 +1156,6 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
mutex_lock(&sdata->u.ibss.mtx); mutex_lock(&sdata->u.ibss.mtx);
sdata->u.ibss.state = IEEE80211_IBSS_MLME_SEARCH;
memset(sdata->u.ibss.bssid, 0, ETH_ALEN);
sdata->u.ibss.ssid_len = 0;
active_ibss = ieee80211_sta_active_ibss(sdata); active_ibss = ieee80211_sta_active_ibss(sdata);
if (!active_ibss && !is_zero_ether_addr(ifibss->bssid)) { if (!active_ibss && !is_zero_ether_addr(ifibss->bssid)) {
@ -1180,6 +1176,10 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
} }
} }
ifibss->state = IEEE80211_IBSS_MLME_SEARCH;
memset(ifibss->bssid, 0, ETH_ALEN);
ifibss->ssid_len = 0;
sta_info_flush(sdata->local, sdata); sta_info_flush(sdata->local, sdata);
spin_lock_bh(&ifibss->incomplete_lock); spin_lock_bh(&ifibss->incomplete_lock);

View File

@ -1388,6 +1388,8 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
struct net_device *dev); struct net_device *dev);
netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
struct net_device *dev); struct net_device *dev);
void ieee80211_purge_tx_queue(struct ieee80211_hw *hw,
struct sk_buff_head *skbs);
/* HT */ /* HT */
void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata,

View File

@ -925,8 +925,10 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
local->hw.wiphy->cipher_suites, local->hw.wiphy->cipher_suites,
sizeof(u32) * local->hw.wiphy->n_cipher_suites, sizeof(u32) * local->hw.wiphy->n_cipher_suites,
GFP_KERNEL); GFP_KERNEL);
if (!suites) if (!suites) {
return -ENOMEM; result = -ENOMEM;
goto fail_wiphy_register;
}
for (r = 0; r < local->hw.wiphy->n_cipher_suites; r++) { for (r = 0; r < local->hw.wiphy->n_cipher_suites; r++) {
u32 suite = local->hw.wiphy->cipher_suites[r]; u32 suite = local->hw.wiphy->cipher_suites[r];
if (suite == WLAN_CIPHER_SUITE_WEP40 || if (suite == WLAN_CIPHER_SUITE_WEP40 ||

View File

@ -934,7 +934,7 @@ int ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata,
struct cfg80211_sched_scan_request *req) struct cfg80211_sched_scan_request *req)
{ {
struct ieee80211_local *local = sdata->local; struct ieee80211_local *local = sdata->local;
struct ieee80211_sched_scan_ies sched_scan_ies; struct ieee80211_sched_scan_ies sched_scan_ies = {};
int ret, i; int ret, i;
mutex_lock(&local->mtx); mutex_lock(&local->mtx);

View File

@ -122,8 +122,8 @@ static void free_sta_work(struct work_struct *wk)
for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
local->total_ps_buffered -= skb_queue_len(&sta->ps_tx_buf[ac]); local->total_ps_buffered -= skb_queue_len(&sta->ps_tx_buf[ac]);
__skb_queue_purge(&sta->ps_tx_buf[ac]); ieee80211_purge_tx_queue(&local->hw, &sta->ps_tx_buf[ac]);
__skb_queue_purge(&sta->tx_filtered[ac]); ieee80211_purge_tx_queue(&local->hw, &sta->tx_filtered[ac]);
} }
#ifdef CONFIG_MAC80211_MESH #ifdef CONFIG_MAC80211_MESH
@ -146,7 +146,7 @@ static void free_sta_work(struct work_struct *wk)
tid_tx = rcu_dereference_raw(sta->ampdu_mlme.tid_tx[i]); tid_tx = rcu_dereference_raw(sta->ampdu_mlme.tid_tx[i]);
if (!tid_tx) if (!tid_tx)
continue; continue;
__skb_queue_purge(&tid_tx->pending); ieee80211_purge_tx_queue(&local->hw, &tid_tx->pending);
kfree(tid_tx); kfree(tid_tx);
} }
@ -982,6 +982,7 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta)
struct ieee80211_local *local = sdata->local; struct ieee80211_local *local = sdata->local;
struct sk_buff_head pending; struct sk_buff_head pending;
int filtered = 0, buffered = 0, ac; int filtered = 0, buffered = 0, ac;
unsigned long flags;
clear_sta_flag(sta, WLAN_STA_SP); clear_sta_flag(sta, WLAN_STA_SP);
@ -997,12 +998,16 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta)
for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
int count = skb_queue_len(&pending), tmp; int count = skb_queue_len(&pending), tmp;
spin_lock_irqsave(&sta->tx_filtered[ac].lock, flags);
skb_queue_splice_tail_init(&sta->tx_filtered[ac], &pending); skb_queue_splice_tail_init(&sta->tx_filtered[ac], &pending);
spin_unlock_irqrestore(&sta->tx_filtered[ac].lock, flags);
tmp = skb_queue_len(&pending); tmp = skb_queue_len(&pending);
filtered += tmp - count; filtered += tmp - count;
count = tmp; count = tmp;
spin_lock_irqsave(&sta->ps_tx_buf[ac].lock, flags);
skb_queue_splice_tail_init(&sta->ps_tx_buf[ac], &pending); skb_queue_splice_tail_init(&sta->ps_tx_buf[ac], &pending);
spin_unlock_irqrestore(&sta->ps_tx_buf[ac].lock, flags);
tmp = skb_queue_len(&pending); tmp = skb_queue_len(&pending);
buffered += tmp - count; buffered += tmp - count;
} }

View File

@ -666,3 +666,12 @@ void ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb)
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
} }
EXPORT_SYMBOL(ieee80211_free_txskb); EXPORT_SYMBOL(ieee80211_free_txskb);
void ieee80211_purge_tx_queue(struct ieee80211_hw *hw,
struct sk_buff_head *skbs)
{
struct sk_buff *skb;
while ((skb = __skb_dequeue(skbs)))
ieee80211_free_txskb(hw, skb);
}

View File

@ -1361,7 +1361,7 @@ static int invoke_tx_handlers(struct ieee80211_tx_data *tx)
if (tx->skb) if (tx->skb)
ieee80211_free_txskb(&tx->local->hw, tx->skb); ieee80211_free_txskb(&tx->local->hw, tx->skb);
else else
__skb_queue_purge(&tx->skbs); ieee80211_purge_tx_queue(&tx->local->hw, &tx->skbs);
return -1; return -1;
} else if (unlikely(res == TX_QUEUED)) { } else if (unlikely(res == TX_QUEUED)) {
I802_DEBUG_INC(tx->local->tx_handlers_queued); I802_DEBUG_INC(tx->local->tx_handlers_queued);
@ -2161,10 +2161,13 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
*/ */
void ieee80211_clear_tx_pending(struct ieee80211_local *local) void ieee80211_clear_tx_pending(struct ieee80211_local *local)
{ {
struct sk_buff *skb;
int i; int i;
for (i = 0; i < local->hw.queues; i++) for (i = 0; i < local->hw.queues; i++) {
skb_queue_purge(&local->pending[i]); while ((skb = skb_dequeue(&local->pending[i])) != NULL)
ieee80211_free_txskb(&local->hw, skb);
}
} }
/* /*

View File

@ -1555,6 +1555,8 @@ int ieee80211_reconfig(struct ieee80211_local *local)
list_for_each_entry(sdata, &local->interfaces, list) { list_for_each_entry(sdata, &local->interfaces, list) {
if (sdata->vif.type != NL80211_IFTYPE_STATION) if (sdata->vif.type != NL80211_IFTYPE_STATION)
continue; continue;
if (!sdata->u.mgd.associated)
continue;
ieee80211_send_nullfunc(local, sdata, 0); ieee80211_send_nullfunc(local, sdata, 0);
} }

View File

@ -1397,7 +1397,7 @@ int nfc_llcp_register_device(struct nfc_dev *ndev)
local->remote_miu = LLCP_DEFAULT_MIU; local->remote_miu = LLCP_DEFAULT_MIU;
local->remote_lto = LLCP_DEFAULT_LTO; local->remote_lto = LLCP_DEFAULT_LTO;
list_add(&llcp_devices, &local->list); list_add(&local->list, &llcp_devices);
return 0; return 0;
} }

View File

@ -141,9 +141,8 @@ static const struct ieee80211_regdomain world_regdom = {
.reg_rules = { .reg_rules = {
/* IEEE 802.11b/g, channels 1..11 */ /* IEEE 802.11b/g, channels 1..11 */
REG_RULE(2412-10, 2462+10, 40, 6, 20, 0), REG_RULE(2412-10, 2462+10, 40, 6, 20, 0),
/* IEEE 802.11b/g, channels 12..13. No HT40 /* IEEE 802.11b/g, channels 12..13. */
* channel fits here. */ REG_RULE(2467-10, 2472+10, 40, 6, 20,
REG_RULE(2467-10, 2472+10, 20, 6, 20,
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_PASSIVE_SCAN |
NL80211_RRF_NO_IBSS), NL80211_RRF_NO_IBSS),
/* IEEE 802.11 channel 14 - Only JP enables /* IEEE 802.11 channel 14 - Only JP enables