Skip to content

Commit

Permalink
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/linville/wireless

Conflicts:
	drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
	drivers/net/wireless/iwlwifi/pcie/tx.c
  • Loading branch information
linvjw committed Nov 21, 2012
2 parents e2ff049 + 400e020 commit b311749
Show file tree
Hide file tree
Showing 27 changed files with 148 additions and 52 deletions.
1 change: 1 addition & 0 deletions drivers/bluetooth/ath3k.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ static struct usb_device_id ath3k_table[] = {
{ USB_DEVICE(0x13d3, 0x3304) },
{ USB_DEVICE(0x0930, 0x0215) },
{ USB_DEVICE(0x0489, 0xE03D) },
{ USB_DEVICE(0x0489, 0xE027) },

/* Atheros AR9285 Malbec with sflash firmware */
{ USB_DEVICE(0x03F0, 0x311D) },
Expand Down
1 change: 1 addition & 0 deletions drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ static struct usb_device_id blacklist_table[] = {
{ USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE },
{ USB_DEVICE(0x0930, 0x0215), .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 */
{ USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE },
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1456,7 +1456,7 @@ static bool ath9k_hw_set_reset_reg(struct ath_hw *ah, u32 type)
switch (type) {
case ATH9K_RESET_POWER_ON:
ret = ath9k_hw_set_reset_power_on(ah);
if (!ret)
if (ret)
ah->reset_power_on = true;
break;
case ATH9K_RESET_WARM:
Expand Down
8 changes: 6 additions & 2 deletions drivers/net/wireless/ath/ath9k/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
u32 ba[WME_BA_BMP_SIZE >> 5];
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 ath_frame_info *fi;
int nframes;
Expand Down Expand Up @@ -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;
tid = ATH_AN_2_TID(an, tidno);
seq_first = tid->seq_start;
isba = ts->ts_flags & ATH9K_TX_BA;

/*
* The hardware occasionally sends a tx status for the wrong TID.
* In this case, the BA status cannot be considered valid and all
* 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;

isaggr = bf_isaggr(bf);
Expand Down
16 changes: 15 additions & 1 deletion drivers/net/wireless/iwlwifi/dvm/mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ static void iwlagn_mac_tx(struct ieee80211_hw *hw,
ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);

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,
Expand Down Expand Up @@ -1352,6 +1352,20 @@ static int iwlagn_mac_add_interface(struct ieee80211_hw *hw,
vif_priv->ctx = ctx;
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);
if (!err || reset)
goto out;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlwifi/dvm/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2107,7 +2107,7 @@ static void iwl_free_skb(struct iwl_op_mode *op_mode, struct sk_buff *skb)

info = IEEE80211_SKB_CB(skb);
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)
Expand Down
23 changes: 21 additions & 2 deletions drivers/net/wireless/iwlwifi/pcie/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,14 @@ static void iwl_rx_allocate(struct iwl_trans *trans, gfp_t priority)
dma_map_page(trans->dev, page, 0,
PAGE_SIZE << trans_pcie->rx_page_order,
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 */
BUG_ON(rxb->page_dma & ~DMA_BIT_MASK(36));
/* and also 256 byte aligned! */
Expand Down Expand Up @@ -489,8 +497,19 @@ static void iwl_rx_handle_rxbuf(struct iwl_trans *trans,
dma_map_page(trans->dev, rxb->page, 0,
PAGE_SIZE << trans_pcie->rx_page_order,
DMA_FROM_DEVICE);
list_add_tail(&rxb->list, &rxq->rx_free);
rxq->free_count++;
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);
rxq->free_count++;
}
} else
list_add_tail(&rxb->list, &rxq->rx_used);
spin_unlock_irqrestore(&rxq->lock, flags);
Expand Down
11 changes: 8 additions & 3 deletions drivers/net/wireless/mwifiex/cmdevt.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,9 +890,6 @@ mwifiex_cmd_timeout_func(unsigned long function_context)
return;
}
cmd_node = adapter->curr_cmd;
if (cmd_node->wait_q_enabled)
adapter->cmd_wait_q.status = -ETIMEDOUT;

if (cmd_node) {
adapter->dbg.timeout_cmd_id =
adapter->dbg.last_cmd_id[adapter->dbg.last_cmd_index];
Expand Down Expand Up @@ -941,6 +938,14 @@ mwifiex_cmd_timeout_func(unsigned long function_context)

dev_err(adapter->dev, "ps_mode=%d ps_state=%d\n",
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)
mwifiex_init_fw_complete(adapter);
Expand Down
11 changes: 6 additions & 5 deletions drivers/net/wireless/mwifiex/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ static int mwifiex_sdio_suspend(struct device *dev)
struct sdio_mmc_card *card;
struct mwifiex_adapter *adapter;
mmc_pm_flag_t pm_flag = 0;
int hs_actived = 0;
int i;
int ret = 0;

Expand All @@ -188,12 +187,14 @@ static int mwifiex_sdio_suspend(struct device *dev)
adapter = card->adapter;

/* Enable the Host Sleep */
hs_actived = mwifiex_enable_hs(adapter);
if (hs_actived) {
pr_debug("cmd: suspend with MMC_PM_KEEP_POWER\n");
ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER);
if (!mwifiex_enable_hs(adapter)) {
dev_err(adapter->dev, "cmd: failed to suspend\n");
return -EFAULT;
}

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 */
adapter->is_suspended = true;

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/rt2x00/rt2800lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2449,7 +2449,7 @@ static int rt2800_get_gain_calibration_delta(struct rt2x00_dev *rt2x00dev)
/*
* Check if temperature compensation is supported.
*/
if (tssi_bounds[4] == 0xff)
if (tssi_bounds[4] == 0xff || step == 0xff)
return 0;

/*
Expand Down
1 change: 1 addition & 0 deletions drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ static struct usb_device_id rtl8192c_usb_ids[] = {
/*=== Customer ID ===*/
/****** 8188CU ********/
{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(0x07b8, 0x8188, rtl92cu_hal_cfg)}, /*Abocom - Abocom*/
{RTL_USB_DEVICE(0x07b8, 0x8189, rtl92cu_hal_cfg)}, /*Funai - Abocom*/
Expand Down
25 changes: 14 additions & 11 deletions drivers/nfc/pn533.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,13 +702,14 @@ static void pn533_wq_cmd(struct work_struct *work)

cmd = list_first_entry(&dev->cmd_queue, struct pn533_cmd, queue);

list_del(&cmd->queue);

mutex_unlock(&dev->cmd_lock);

__pn533_send_cmd_frame_async(dev, cmd->out_frame, cmd->in_frame,
cmd->in_frame_len, cmd->cmd_complete,
cmd->arg, cmd->flags);

list_del(&cmd->queue);
kfree(cmd);
}

Expand Down Expand Up @@ -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,
u8 *params, int params_len)
{
struct pn533_cmd_jump_dep *cmd;
struct pn533_cmd_jump_dep_response *resp;
struct nfc_target nfc_target;
u8 target_gt_len;
int rc;
struct pn533_cmd_jump_dep *cmd = (struct pn533_cmd_jump_dep *)arg;
u8 active = cmd->active;

kfree(arg);

if (params_len == -ENOENT) {
nfc_dev_dbg(&dev->interface->dev, "");
Expand All @@ -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;
cmd = (struct pn533_cmd_jump_dep *) arg;
rc = resp->status & PN533_CMD_RET_MASK;
if (rc != PN533_CMD_RET_SUCCESS) {
nfc_dev_err(&dev->interface->dev,
Expand Down Expand Up @@ -1736,7 +1739,7 @@ static int pn533_in_dep_link_up_complete(struct pn533 *dev, void *arg,
if (rc == 0)
rc = nfc_dep_link_is_up(dev->nfc_dev,
dev->nfc_dev->targets[0].idx,
!cmd->active, NFC_RF_INITIATOR);
!active, NFC_RF_INITIATOR);

return 0;
}
Expand Down Expand Up @@ -1821,12 +1824,8 @@ 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,
dev->in_maxlen, pn533_in_dep_link_up_complete,
cmd, GFP_KERNEL);
if (rc)
goto out;


out:
kfree(cmd);
if (rc < 0)
kfree(cmd);

return rc;
}
Expand Down Expand Up @@ -2080,8 +2079,12 @@ static int pn533_transceive(struct nfc_dev *nfc_dev,
static int pn533_tm_send_complete(struct pn533 *dev, void *arg,
u8 *params, int params_len)
{
struct sk_buff *skb_out = arg;

nfc_dev_dbg(&dev->interface->dev, "%s", __func__);

dev_kfree_skb(skb_out);

if (params_len < 0) {
nfc_dev_err(&dev->interface->dev,
"Error %d when sending data",
Expand Down Expand Up @@ -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,
dev->in_maxlen, pn533_tm_send_complete,
NULL, GFP_KERNEL);
skb, GFP_KERNEL);
if (rc) {
nfc_dev_err(&dev->interface->dev,
"Error %d when trying to send data", rc);
Expand Down
4 changes: 2 additions & 2 deletions net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1717,11 +1717,11 @@ int hci_register_dev(struct hci_dev *hdev)
if (hdev->dev_type != HCI_AMP)
set_bit(HCI_AUTO_OFF, &hdev->dev_flags);

schedule_work(&hdev->power_on);

hci_notify(hdev, HCI_DEV_REG);
hci_dev_hold(hdev);

schedule_work(&hdev->power_on);

return id;

err_wqueue:
Expand Down
12 changes: 7 additions & 5 deletions net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data,
struct hci_dev *d;
size_t rp_len;
u16 count;
int i, err;
int err;

BT_DBG("sock %p", sk);

Expand All @@ -347,20 +347,21 @@ static int read_index_list(struct sock *sk, struct hci_dev *hdev, void *data,
return -ENOMEM;
}

rp->num_controllers = cpu_to_le16(count);

i = 0;
count = 0;
list_for_each_entry(d, &hci_dev_list, list) {
if (test_bit(HCI_SETUP, &d->dev_flags))
continue;

if (!mgmt_valid_hdev(d))
continue;

rp->index[i++] = cpu_to_le16(d->id);
rp->index[count++] = cpu_to_le16(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);

err = cmd_complete(sk, MGMT_INDEX_NONE, MGMT_OP_READ_INDEX_LIST, 0, rp,
Expand Down Expand Up @@ -1378,6 +1379,7 @@ static int remove_uuid(struct sock *sk, struct hci_dev *hdev, void *data,
continue;

list_del(&match->list);
kfree(match);
found++;
}

Expand Down
2 changes: 1 addition & 1 deletion net/bluetooth/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
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);

Expand Down
20 changes: 20 additions & 0 deletions net/core/net-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,17 @@ static struct attribute_group netstat_group = {
.name = "statistics",
.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 */

#ifdef CONFIG_RPS
Expand Down Expand Up @@ -1409,6 +1420,15 @@ int netdev_register_kobject(struct net_device *net)
groups++;

*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 */

error = device_add(dev);
Expand Down
3 changes: 3 additions & 0 deletions net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2673,6 +2673,9 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy,
else
local->probe_req_reg--;

if (!local->open_count)
break;

ieee80211_queue_work(&local->hw, &local->reconfig_filter);
break;
default:
Expand Down
Loading

0 comments on commit b311749

Please sign in to comment.