Commit e7ab5f1c authored by John W. Linville's avatar John W. Linville

Merge branch 'master' of...

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
parents 1af32f0f 329456d1
...@@ -188,7 +188,7 @@ config BT_MRVL ...@@ -188,7 +188,7 @@ config BT_MRVL
The core driver to support Marvell Bluetooth devices. The core driver to support Marvell Bluetooth devices.
This driver is required if you want to support This driver is required if you want to support
Marvell Bluetooth devices, such as 8688/8787. Marvell Bluetooth devices, such as 8688/8787/8797.
Say Y here to compile Marvell Bluetooth driver Say Y here to compile Marvell Bluetooth driver
into the kernel or say M to compile it as module. into the kernel or say M to compile it as module.
...@@ -201,8 +201,8 @@ config BT_MRVL_SDIO ...@@ -201,8 +201,8 @@ config BT_MRVL_SDIO
The driver for Marvell Bluetooth chipsets with SDIO interface. The driver for Marvell Bluetooth chipsets with SDIO interface.
This driver is required if you want to use Marvell Bluetooth This driver is required if you want to use Marvell Bluetooth
devices with SDIO interface. Currently SD8688/SD8787 chipsets are devices with SDIO interface. Currently SD8688/SD8787/SD8797
supported. chipsets are supported.
Say Y here to compile support for Marvell BT-over-SDIO driver Say Y here to compile support for Marvell BT-over-SDIO driver
into the kernel or say M to compile it as module. into the kernel or say M to compile it as module.
......
...@@ -65,7 +65,7 @@ static const struct btmrvl_sdio_card_reg btmrvl_reg_8688 = { ...@@ -65,7 +65,7 @@ static const struct btmrvl_sdio_card_reg btmrvl_reg_8688 = {
.io_port_1 = 0x01, .io_port_1 = 0x01,
.io_port_2 = 0x02, .io_port_2 = 0x02,
}; };
static const struct btmrvl_sdio_card_reg btmrvl_reg_8787 = { static const struct btmrvl_sdio_card_reg btmrvl_reg_87xx = {
.cfg = 0x00, .cfg = 0x00,
.host_int_mask = 0x02, .host_int_mask = 0x02,
.host_intstatus = 0x03, .host_intstatus = 0x03,
...@@ -92,7 +92,14 @@ static const struct btmrvl_sdio_device btmrvl_sdio_sd8688 = { ...@@ -92,7 +92,14 @@ static const struct btmrvl_sdio_device btmrvl_sdio_sd8688 = {
static const struct btmrvl_sdio_device btmrvl_sdio_sd8787 = { static const struct btmrvl_sdio_device btmrvl_sdio_sd8787 = {
.helper = NULL, .helper = NULL,
.firmware = "mrvl/sd8787_uapsta.bin", .firmware = "mrvl/sd8787_uapsta.bin",
.reg = &btmrvl_reg_8787, .reg = &btmrvl_reg_87xx,
.sd_blksz_fw_dl = 256,
};
static const struct btmrvl_sdio_device btmrvl_sdio_sd8797 = {
.helper = NULL,
.firmware = "mrvl/sd8797_uapsta.bin",
.reg = &btmrvl_reg_87xx,
.sd_blksz_fw_dl = 256, .sd_blksz_fw_dl = 256,
}; };
...@@ -103,6 +110,9 @@ static const struct sdio_device_id btmrvl_sdio_ids[] = { ...@@ -103,6 +110,9 @@ static const struct sdio_device_id btmrvl_sdio_ids[] = {
/* Marvell SD8787 Bluetooth device */ /* Marvell SD8787 Bluetooth device */
{ SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x911A), { SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x911A),
.driver_data = (unsigned long) &btmrvl_sdio_sd8787 }, .driver_data = (unsigned long) &btmrvl_sdio_sd8787 },
/* Marvell SD8797 Bluetooth device */
{ SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, 0x912A),
.driver_data = (unsigned long) &btmrvl_sdio_sd8797 },
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
...@@ -1076,3 +1086,4 @@ MODULE_LICENSE("GPL v2"); ...@@ -1076,3 +1086,4 @@ MODULE_LICENSE("GPL v2");
MODULE_FIRMWARE("sd8688_helper.bin"); MODULE_FIRMWARE("sd8688_helper.bin");
MODULE_FIRMWARE("sd8688.bin"); MODULE_FIRMWARE("sd8688.bin");
MODULE_FIRMWARE("mrvl/sd8787_uapsta.bin"); MODULE_FIRMWARE("mrvl/sd8787_uapsta.bin");
MODULE_FIRMWARE("mrvl/sd8797_uapsta.bin");
...@@ -777,9 +777,8 @@ static int btusb_send_frame(struct sk_buff *skb) ...@@ -777,9 +777,8 @@ static int btusb_send_frame(struct sk_buff *skb)
usb_mark_last_busy(data->udev); usb_mark_last_busy(data->udev);
} }
usb_free_urb(urb);
done: done:
usb_free_urb(urb);
return err; return err;
} }
......
...@@ -286,7 +286,7 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start) ...@@ -286,7 +286,7 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start)
ath_start_ani(common); ath_start_ani(common);
} }
if (ath9k_hw_ops(ah)->antdiv_comb_conf_get && sc->ant_rx != 3) { if ((ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB) && sc->ant_rx != 3) {
struct ath_hw_antcomb_conf div_ant_conf; struct ath_hw_antcomb_conf div_ant_conf;
u8 lna_conf; u8 lna_conf;
......
...@@ -569,7 +569,7 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw, ...@@ -569,7 +569,7 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw,
} }
case ERFSLEEP:{ case ERFSLEEP:{
if (ppsc->rfpwr_state == ERFOFF) if (ppsc->rfpwr_state == ERFOFF)
break; return false;
for (queue_id = 0, i = 0; for (queue_id = 0, i = 0;
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) { queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
ring = &pcipriv->dev.tx_ring[queue_id]; ring = &pcipriv->dev.tx_ring[queue_id];
......
...@@ -548,7 +548,7 @@ static bool _rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw, ...@@ -548,7 +548,7 @@ static bool _rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw,
break; break;
case ERFSLEEP: case ERFSLEEP:
if (ppsc->rfpwr_state == ERFOFF) if (ppsc->rfpwr_state == ERFOFF)
break; return false;
for (queue_id = 0, i = 0; for (queue_id = 0, i = 0;
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) { queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
ring = &pcipriv->dev.tx_ring[queue_id]; ring = &pcipriv->dev.tx_ring[queue_id];
......
...@@ -3374,7 +3374,7 @@ bool rtl92d_phy_set_rf_power_state(struct ieee80211_hw *hw, ...@@ -3374,7 +3374,7 @@ bool rtl92d_phy_set_rf_power_state(struct ieee80211_hw *hw,
break; break;
case ERFSLEEP: case ERFSLEEP:
if (ppsc->rfpwr_state == ERFOFF) if (ppsc->rfpwr_state == ERFOFF)
break; return false;
for (queue_id = 0, i = 0; for (queue_id = 0, i = 0;
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) { queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
......
...@@ -602,7 +602,7 @@ bool rtl92s_phy_set_rf_power_state(struct ieee80211_hw *hw, ...@@ -602,7 +602,7 @@ bool rtl92s_phy_set_rf_power_state(struct ieee80211_hw *hw,
} }
case ERFSLEEP: case ERFSLEEP:
if (ppsc->rfpwr_state == ERFOFF) if (ppsc->rfpwr_state == ERFOFF)
break; return false;
for (queue_id = 0, i = 0; for (queue_id = 0, i = 0;
queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) { queue_id < RTL_PCI_MAX_TX_QUEUE_COUNT;) {
......
...@@ -517,10 +517,14 @@ static void ssb_pcicore_pcie_setup_workarounds(struct ssb_pcicore *pc) ...@@ -517,10 +517,14 @@ static void ssb_pcicore_pcie_setup_workarounds(struct ssb_pcicore *pc)
static void __devinit ssb_pcicore_init_clientmode(struct ssb_pcicore *pc) static void __devinit ssb_pcicore_init_clientmode(struct ssb_pcicore *pc)
{ {
ssb_pcicore_fix_sprom_core_index(pc); struct ssb_device *pdev = pc->dev;
struct ssb_bus *bus = pdev->bus;
if (bus->bustype == SSB_BUSTYPE_PCI)
ssb_pcicore_fix_sprom_core_index(pc);
/* Disable PCI interrupts. */ /* Disable PCI interrupts. */
ssb_write32(pc->dev, SSB_INTVEC, 0); ssb_write32(pdev, SSB_INTVEC, 0);
/* Additional PCIe always once-executed workarounds */ /* Additional PCIe always once-executed workarounds */
if (pc->dev->id.coreid == SSB_DEV_PCIE) { if (pc->dev->id.coreid == SSB_DEV_PCIE) {
......
...@@ -79,17 +79,12 @@ static struct bnep_session *__bnep_get_session(u8 *dst) ...@@ -79,17 +79,12 @@ static struct bnep_session *__bnep_get_session(u8 *dst)
static void __bnep_link_session(struct bnep_session *s) static void __bnep_link_session(struct bnep_session *s)
{ {
/* It's safe to call __module_get() here because sessions are added
by the socket layer which has to hold the reference to this module.
*/
__module_get(THIS_MODULE);
list_add(&s->list, &bnep_session_list); list_add(&s->list, &bnep_session_list);
} }
static void __bnep_unlink_session(struct bnep_session *s) static void __bnep_unlink_session(struct bnep_session *s)
{ {
list_del(&s->list); list_del(&s->list);
module_put(THIS_MODULE);
} }
static int bnep_send(struct bnep_session *s, void *data, size_t len) static int bnep_send(struct bnep_session *s, void *data, size_t len)
...@@ -530,6 +525,7 @@ static int bnep_session(void *arg) ...@@ -530,6 +525,7 @@ static int bnep_session(void *arg)
up_write(&bnep_session_sem); up_write(&bnep_session_sem);
free_netdev(dev); free_netdev(dev);
module_put_and_exit(0);
return 0; return 0;
} }
...@@ -616,9 +612,11 @@ int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock) ...@@ -616,9 +612,11 @@ int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock)
__bnep_link_session(s); __bnep_link_session(s);
__module_get(THIS_MODULE);
s->task = kthread_run(bnep_session, s, "kbnepd %s", dev->name); s->task = kthread_run(bnep_session, s, "kbnepd %s", dev->name);
if (IS_ERR(s->task)) { if (IS_ERR(s->task)) {
/* Session thread start failed, gotta cleanup. */ /* Session thread start failed, gotta cleanup. */
module_put(THIS_MODULE);
unregister_netdev(dev); unregister_netdev(dev);
__bnep_unlink_session(s); __bnep_unlink_session(s);
err = PTR_ERR(s->task); err = PTR_ERR(s->task);
......
...@@ -67,14 +67,12 @@ static struct cmtp_session *__cmtp_get_session(bdaddr_t *bdaddr) ...@@ -67,14 +67,12 @@ static struct cmtp_session *__cmtp_get_session(bdaddr_t *bdaddr)
static void __cmtp_link_session(struct cmtp_session *session) static void __cmtp_link_session(struct cmtp_session *session)
{ {
__module_get(THIS_MODULE);
list_add(&session->list, &cmtp_session_list); list_add(&session->list, &cmtp_session_list);
} }
static void __cmtp_unlink_session(struct cmtp_session *session) static void __cmtp_unlink_session(struct cmtp_session *session)
{ {
list_del(&session->list); list_del(&session->list);
module_put(THIS_MODULE);
} }
static void __cmtp_copy_session(struct cmtp_session *session, struct cmtp_conninfo *ci) static void __cmtp_copy_session(struct cmtp_session *session, struct cmtp_conninfo *ci)
...@@ -327,6 +325,7 @@ static int cmtp_session(void *arg) ...@@ -327,6 +325,7 @@ static int cmtp_session(void *arg)
up_write(&cmtp_session_sem); up_write(&cmtp_session_sem);
kfree(session); kfree(session);
module_put_and_exit(0);
return 0; return 0;
} }
...@@ -376,9 +375,11 @@ int cmtp_add_connection(struct cmtp_connadd_req *req, struct socket *sock) ...@@ -376,9 +375,11 @@ int cmtp_add_connection(struct cmtp_connadd_req *req, struct socket *sock)
__cmtp_link_session(session); __cmtp_link_session(session);
__module_get(THIS_MODULE);
session->task = kthread_run(cmtp_session, session, "kcmtpd_ctr_%d", session->task = kthread_run(cmtp_session, session, "kcmtpd_ctr_%d",
session->num); session->num);
if (IS_ERR(session->task)) { if (IS_ERR(session->task)) {
module_put(THIS_MODULE);
err = PTR_ERR(session->task); err = PTR_ERR(session->task);
goto unlink; goto unlink;
} }
......
...@@ -545,7 +545,7 @@ static void hci_setup(struct hci_dev *hdev) ...@@ -545,7 +545,7 @@ static void hci_setup(struct hci_dev *hdev)
{ {
hci_setup_event_mask(hdev); hci_setup_event_mask(hdev);
if (hdev->lmp_ver > 1) if (hdev->hci_ver > 1)
hci_send_cmd(hdev, HCI_OP_READ_LOCAL_COMMANDS, 0, NULL); hci_send_cmd(hdev, HCI_OP_READ_LOCAL_COMMANDS, 0, NULL);
if (hdev->features[6] & LMP_SIMPLE_PAIR) { if (hdev->features[6] & LMP_SIMPLE_PAIR) {
......
...@@ -303,6 +303,38 @@ ieee80211_wake_queue_agg(struct ieee80211_local *local, int tid) ...@@ -303,6 +303,38 @@ ieee80211_wake_queue_agg(struct ieee80211_local *local, int tid)
__release(agg_queue); __release(agg_queue);
} }
/*
* splice packets from the STA's pending to the local pending,
* requires a call to ieee80211_agg_splice_finish later
*/
static void __acquires(agg_queue)
ieee80211_agg_splice_packets(struct ieee80211_local *local,
struct tid_ampdu_tx *tid_tx, u16 tid)
{
int queue = ieee80211_ac_from_tid(tid);
unsigned long flags;
ieee80211_stop_queue_agg(local, tid);
if (WARN(!tid_tx, "TID %d gone but expected when splicing aggregates"
" from the pending queue\n", tid))
return;
if (!skb_queue_empty(&tid_tx->pending)) {
spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
/* copy over remaining packets */
skb_queue_splice_tail_init(&tid_tx->pending,
&local->pending[queue]);
spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
}
}
static void __releases(agg_queue)
ieee80211_agg_splice_finish(struct ieee80211_local *local, u16 tid)
{
ieee80211_wake_queue_agg(local, tid);
}
void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid) void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
{ {
struct tid_ampdu_tx *tid_tx; struct tid_ampdu_tx *tid_tx;
...@@ -314,19 +346,17 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid) ...@@ -314,19 +346,17 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
tid_tx = rcu_dereference_protected_tid_tx(sta, tid); tid_tx = rcu_dereference_protected_tid_tx(sta, tid);
/* /*
* While we're asking the driver about the aggregation, * Start queuing up packets for this aggregation session.
* stop the AC queue so that we don't have to worry * We're going to release them once the driver is OK with
* about frames that came in while we were doing that, * that.
* which would require us to put them to the AC pending
* afterwards which just makes the code more complex.
*/ */
ieee80211_stop_queue_agg(local, tid);
clear_bit(HT_AGG_STATE_WANT_START, &tid_tx->state); clear_bit(HT_AGG_STATE_WANT_START, &tid_tx->state);
/* /*
* make sure no packets are being processed to get * Make sure no packets are being processed. This ensures that
* valid starting sequence number * we have a valid starting sequence number and that in-flight
* packets have been flushed out and no packets for this TID
* will go into the driver during the ampdu_action call.
*/ */
synchronize_net(); synchronize_net();
...@@ -340,17 +370,15 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid) ...@@ -340,17 +370,15 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
" tid %d\n", tid); " tid %d\n", tid);
#endif #endif
spin_lock_bh(&sta->lock); spin_lock_bh(&sta->lock);
ieee80211_agg_splice_packets(local, tid_tx, tid);
ieee80211_assign_tid_tx(sta, tid, NULL); ieee80211_assign_tid_tx(sta, tid, NULL);
ieee80211_agg_splice_finish(local, tid);
spin_unlock_bh(&sta->lock); spin_unlock_bh(&sta->lock);
ieee80211_wake_queue_agg(local, tid);
kfree_rcu(tid_tx, rcu_head); kfree_rcu(tid_tx, rcu_head);
return; return;
} }
/* we can take packets again now */
ieee80211_wake_queue_agg(local, tid);
/* activate the timer for the recipient's addBA response */ /* activate the timer for the recipient's addBA response */
mod_timer(&tid_tx->addba_resp_timer, jiffies + ADDBA_RESP_INTERVAL); mod_timer(&tid_tx->addba_resp_timer, jiffies + ADDBA_RESP_INTERVAL);
#ifdef CONFIG_MAC80211_HT_DEBUG #ifdef CONFIG_MAC80211_HT_DEBUG
...@@ -466,38 +494,6 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid, ...@@ -466,38 +494,6 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
} }
EXPORT_SYMBOL(ieee80211_start_tx_ba_session); EXPORT_SYMBOL(ieee80211_start_tx_ba_session);
/*
* splice packets from the STA's pending to the local pending,
* requires a call to ieee80211_agg_splice_finish later
*/
static void __acquires(agg_queue)
ieee80211_agg_splice_packets(struct ieee80211_local *local,
struct tid_ampdu_tx *tid_tx, u16 tid)
{
int queue = ieee80211_ac_from_tid(tid);
unsigned long flags;
ieee80211_stop_queue_agg(local, tid);
if (WARN(!tid_tx, "TID %d gone but expected when splicing aggregates"
" from the pending queue\n", tid))
return;
if (!skb_queue_empty(&tid_tx->pending)) {
spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
/* copy over remaining packets */
skb_queue_splice_tail_init(&tid_tx->pending,
&local->pending[queue]);
spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
}
}
static void __releases(agg_queue)
ieee80211_agg_splice_finish(struct ieee80211_local *local, u16 tid)
{
ieee80211_wake_queue_agg(local, tid);
}
static void ieee80211_agg_tx_operational(struct ieee80211_local *local, static void ieee80211_agg_tx_operational(struct ieee80211_local *local,
struct sta_info *sta, u16 tid) struct sta_info *sta, u16 tid)
{ {
......
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