Commit 4144cb2a authored by David S. Miller's avatar David S. Miller
parents 59f608d8 604c4ef1
...@@ -1411,6 +1411,7 @@ F: net/ax25/ ...@@ -1411,6 +1411,7 @@ F: net/ax25/
B43 WIRELESS DRIVER B43 WIRELESS DRIVER
M: Stefano Brivio <stefano.brivio@polimi.it> M: Stefano Brivio <stefano.brivio@polimi.it>
L: linux-wireless@vger.kernel.org L: linux-wireless@vger.kernel.org
L: b43-dev@lists.infradead.org (moderated for non-subscribers)
W: http://linuxwireless.org/en/users/Drivers/b43 W: http://linuxwireless.org/en/users/Drivers/b43
S: Maintained S: Maintained
F: drivers/net/wireless/b43/ F: drivers/net/wireless/b43/
...@@ -1587,6 +1588,13 @@ L: linux-scsi@vger.kernel.org ...@@ -1587,6 +1588,13 @@ L: linux-scsi@vger.kernel.org
S: Supported S: Supported
F: drivers/scsi/bnx2fc/ F: drivers/scsi/bnx2fc/
BROADCOM SPECIFIC AMBA DRIVER (BCMA)
M: Rafał Miłecki <zajec5@gmail.com>
L: linux-wireless@vger.kernel.org
S: Maintained
F: drivers/bcma/
F: include/linux/bcma/
BROCADE BFA FC SCSI DRIVER BROCADE BFA FC SCSI DRIVER
M: Jing Huang <huangj@brocade.com> M: Jing Huang <huangj@brocade.com>
L: linux-scsi@vger.kernel.org L: linux-scsi@vger.kernel.org
...@@ -6099,13 +6107,6 @@ S: Maintained ...@@ -6099,13 +6107,6 @@ S: Maintained
F: drivers/ssb/ F: drivers/ssb/
F: include/linux/ssb/ F: include/linux/ssb/
BROADCOM SPECIFIC AMBA DRIVER (BCMA)
M: Rafał Miłecki <zajec5@gmail.com>
L: linux-wireless@vger.kernel.org
S: Maintained
F: drivers/bcma/
F: include/linux/bcma/
SONY VAIO CONTROL DEVICE DRIVER SONY VAIO CONTROL DEVICE DRIVER
M: Mattia Dongili <malattia@linux.it> M: Mattia Dongili <malattia@linux.it>
L: platform-driver-x86@vger.kernel.org L: platform-driver-x86@vger.kernel.org
......
...@@ -19,6 +19,7 @@ int __init bcma_bus_early_register(struct bcma_bus *bus, ...@@ -19,6 +19,7 @@ int __init bcma_bus_early_register(struct bcma_bus *bus,
struct bcma_device *core_cc, struct bcma_device *core_cc,
struct bcma_device *core_mips); struct bcma_device *core_mips);
#ifdef CONFIG_PM #ifdef CONFIG_PM
int bcma_bus_suspend(struct bcma_bus *bus);
int bcma_bus_resume(struct bcma_bus *bus); int bcma_bus_resume(struct bcma_bus *bus);
#endif #endif
......
...@@ -235,38 +235,32 @@ static void bcma_host_pci_remove(struct pci_dev *dev) ...@@ -235,38 +235,32 @@ static void bcma_host_pci_remove(struct pci_dev *dev)
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int bcma_host_pci_suspend(struct pci_dev *dev, pm_message_t state) static int bcma_host_pci_suspend(struct device *dev)
{ {
/* Host specific */ struct pci_dev *pdev = to_pci_dev(dev);
pci_save_state(dev); struct bcma_bus *bus = pci_get_drvdata(pdev);
pci_disable_device(dev);
pci_set_power_state(dev, pci_choose_state(dev, state));
return 0; bus->mapped_core = NULL;
return bcma_bus_suspend(bus);
} }
static int bcma_host_pci_resume(struct pci_dev *dev) static int bcma_host_pci_resume(struct device *dev)
{ {
struct bcma_bus *bus = pci_get_drvdata(dev); struct pci_dev *pdev = to_pci_dev(dev);
int err; struct bcma_bus *bus = pci_get_drvdata(pdev);
/* Host specific */ return bcma_bus_resume(bus);
pci_set_power_state(dev, 0); }
err = pci_enable_device(dev);
if (err)
return err;
pci_restore_state(dev);
/* Bus specific */ static SIMPLE_DEV_PM_OPS(bcma_pm_ops, bcma_host_pci_suspend,
err = bcma_bus_resume(bus); bcma_host_pci_resume);
if (err) #define BCMA_PM_OPS (&bcma_pm_ops)
return err;
return 0;
}
#else /* CONFIG_PM */ #else /* CONFIG_PM */
# define bcma_host_pci_suspend NULL
# define bcma_host_pci_resume NULL #define BCMA_PM_OPS NULL
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
static DEFINE_PCI_DEVICE_TABLE(bcma_pci_bridge_tbl) = { static DEFINE_PCI_DEVICE_TABLE(bcma_pci_bridge_tbl) = {
...@@ -284,8 +278,7 @@ static struct pci_driver bcma_pci_bridge_driver = { ...@@ -284,8 +278,7 @@ static struct pci_driver bcma_pci_bridge_driver = {
.id_table = bcma_pci_bridge_tbl, .id_table = bcma_pci_bridge_tbl,
.probe = bcma_host_pci_probe, .probe = bcma_host_pci_probe,
.remove = bcma_host_pci_remove, .remove = bcma_host_pci_remove,
.suspend = bcma_host_pci_suspend, .driver.pm = BCMA_PM_OPS,
.resume = bcma_host_pci_resume,
}; };
int __init bcma_host_pci_init(void) int __init bcma_host_pci_init(void)
......
...@@ -241,6 +241,21 @@ int __init bcma_bus_early_register(struct bcma_bus *bus, ...@@ -241,6 +241,21 @@ int __init bcma_bus_early_register(struct bcma_bus *bus,
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
int bcma_bus_suspend(struct bcma_bus *bus)
{
struct bcma_device *core;
list_for_each_entry(core, &bus->cores, list) {
struct device_driver *drv = core->dev.driver;
if (drv) {
struct bcma_driver *adrv = container_of(drv, struct bcma_driver, drv);
if (adrv->suspend)
adrv->suspend(core);
}
}
return 0;
}
int bcma_bus_resume(struct bcma_bus *bus) int bcma_bus_resume(struct bcma_bus *bus)
{ {
struct bcma_device *core; struct bcma_device *core;
...@@ -252,6 +267,15 @@ int bcma_bus_resume(struct bcma_bus *bus) ...@@ -252,6 +267,15 @@ int bcma_bus_resume(struct bcma_bus *bus)
bcma_core_chipcommon_init(&bus->drv_cc); bcma_core_chipcommon_init(&bus->drv_cc);
} }
list_for_each_entry(core, &bus->cores, list) {
struct device_driver *drv = core->dev.driver;
if (drv) {
struct bcma_driver *adrv = container_of(drv, struct bcma_driver, drv);
if (adrv->resume)
adrv->resume(core);
}
}
return 0; return 0;
} }
#endif #endif
......
...@@ -557,9 +557,10 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs, ...@@ -557,9 +557,10 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs,
rxs->rs_status |= ATH9K_RXERR_DECRYPT; rxs->rs_status |= ATH9K_RXERR_DECRYPT;
else if (rxsp->status11 & AR_MichaelErr) else if (rxsp->status11 & AR_MichaelErr)
rxs->rs_status |= ATH9K_RXERR_MIC; rxs->rs_status |= ATH9K_RXERR_MIC;
}
if (rxsp->status11 & AR_KeyMiss) if (rxsp->status11 & AR_KeyMiss)
rxs->rs_status |= ATH9K_RXERR_KEYMISS; rxs->rs_status |= ATH9K_RXERR_KEYMISS;
}
return 0; return 0;
} }
......
...@@ -618,9 +618,10 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds, ...@@ -618,9 +618,10 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,
rs->rs_status |= ATH9K_RXERR_DECRYPT; rs->rs_status |= ATH9K_RXERR_DECRYPT;
else if (ads.ds_rxstatus8 & AR_MichaelErr) else if (ads.ds_rxstatus8 & AR_MichaelErr)
rs->rs_status |= ATH9K_RXERR_MIC; rs->rs_status |= ATH9K_RXERR_MIC;
}
if (ads.ds_rxstatus8 & AR_KeyMiss) if (ads.ds_rxstatus8 & AR_KeyMiss)
rs->rs_status |= ATH9K_RXERR_KEYMISS; rs->rs_status |= ATH9K_RXERR_KEYMISS;
}
return 0; return 0;
} }
......
...@@ -4852,6 +4852,9 @@ static void b43_op_stop(struct ieee80211_hw *hw) ...@@ -4852,6 +4852,9 @@ static void b43_op_stop(struct ieee80211_hw *hw)
cancel_work_sync(&(wl->beacon_update_trigger)); cancel_work_sync(&(wl->beacon_update_trigger));
if (!dev)
goto out;
mutex_lock(&wl->mutex); mutex_lock(&wl->mutex);
if (b43_status(dev) >= B43_STAT_STARTED) { if (b43_status(dev) >= B43_STAT_STARTED) {
dev = b43_wireless_core_stop(dev); dev = b43_wireless_core_stop(dev);
...@@ -4863,7 +4866,7 @@ static void b43_op_stop(struct ieee80211_hw *hw) ...@@ -4863,7 +4866,7 @@ static void b43_op_stop(struct ieee80211_hw *hw)
out_unlock: out_unlock:
mutex_unlock(&wl->mutex); mutex_unlock(&wl->mutex);
out:
cancel_work_sync(&(wl->txpower_adjust_work)); cancel_work_sync(&(wl->txpower_adjust_work));
} }
......
...@@ -2475,7 +2475,7 @@ static s32 brcmf_init_iscan(struct brcmf_cfg80211_priv *cfg_priv) ...@@ -2475,7 +2475,7 @@ static s32 brcmf_init_iscan(struct brcmf_cfg80211_priv *cfg_priv)
return err; return err;
} }
static void brcmf_delay(u32 ms) static __always_inline void brcmf_delay(u32 ms)
{ {
if (ms < 1000 / HZ) { if (ms < 1000 / HZ) {
cond_resched(); cond_resched();
......
...@@ -1128,14 +1128,7 @@ static int __devinit brcms_bcma_probe(struct bcma_device *pdev) ...@@ -1128,14 +1128,7 @@ static int __devinit brcms_bcma_probe(struct bcma_device *pdev)
return 0; return 0;
} }
static int brcms_pci_suspend(struct pci_dev *pdev) static int brcms_suspend(struct bcma_device *pdev)
{
pci_save_state(pdev);
pci_disable_device(pdev);
return pci_set_power_state(pdev, PCI_D3hot);
}
static int brcms_suspend(struct bcma_device *pdev, pm_message_t state)
{ {
struct brcms_info *wl; struct brcms_info *wl;
struct ieee80211_hw *hw; struct ieee80211_hw *hw;
...@@ -1153,40 +1146,15 @@ static int brcms_suspend(struct bcma_device *pdev, pm_message_t state) ...@@ -1153,40 +1146,15 @@ static int brcms_suspend(struct bcma_device *pdev, pm_message_t state)
wl->pub->hw_up = false; wl->pub->hw_up = false;
spin_unlock_bh(&wl->lock); spin_unlock_bh(&wl->lock);
/* temporarily do suspend ourselves */ pr_debug("brcms_suspend ok\n");
return brcms_pci_suspend(pdev->bus->host_pci);
}
static int brcms_pci_resume(struct pci_dev *pdev)
{
int err = 0;
uint val;
err = pci_set_power_state(pdev, PCI_D0);
if (err)
return err;
pci_restore_state(pdev);
err = pci_enable_device(pdev);
if (err)
return err;
pci_set_master(pdev);
pci_read_config_dword(pdev, 0x40, &val);
if ((val & 0x0000ff00) != 0)
pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
return 0; return 0;
} }
static int brcms_resume(struct bcma_device *pdev) static int brcms_resume(struct bcma_device *pdev)
{ {
/* pr_debug("brcms_resume ok\n");
* just do pci resume for now until bcma supports it. return 0;
*/
return brcms_pci_resume(pdev->bus->host_pci);
} }
static struct bcma_driver brcms_bcma_driver = { static struct bcma_driver brcms_bcma_driver = {
......
...@@ -7848,7 +7848,7 @@ static void ipw_handle_data_packet_monitor(struct ipw_priv *priv, ...@@ -7848,7 +7848,7 @@ static void ipw_handle_data_packet_monitor(struct ipw_priv *priv,
* more efficiently than we can parse it. ORDER MATTERS HERE */ * more efficiently than we can parse it. ORDER MATTERS HERE */
struct ipw_rt_hdr *ipw_rt; struct ipw_rt_hdr *ipw_rt;
short len = le16_to_cpu(pkt->u.frame.length); unsigned short len = le16_to_cpu(pkt->u.frame.length);
/* We received data from the HW, so stop the watchdog */ /* We received data from the HW, so stop the watchdog */
dev->trans_start = jiffies; dev->trans_start = jiffies;
...@@ -8023,7 +8023,7 @@ static void ipw_handle_promiscuous_rx(struct ipw_priv *priv, ...@@ -8023,7 +8023,7 @@ static void ipw_handle_promiscuous_rx(struct ipw_priv *priv,
s8 signal = frame->rssi_dbm - IPW_RSSI_TO_DBM; s8 signal = frame->rssi_dbm - IPW_RSSI_TO_DBM;
s8 noise = (s8) le16_to_cpu(frame->noise); s8 noise = (s8) le16_to_cpu(frame->noise);
u8 rate = frame->rate; u8 rate = frame->rate;
short len = le16_to_cpu(pkt->u.frame.length); unsigned short len = le16_to_cpu(pkt->u.frame.length);
struct sk_buff *skb; struct sk_buff *skb;
int hdr_only = 0; int hdr_only = 0;
u16 filter = priv->prom_priv->filter; u16 filter = priv->prom_priv->filter;
......
...@@ -569,7 +569,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) ...@@ -569,7 +569,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
struct iwl_scan_cmd *scan; struct iwl_scan_cmd *scan;
struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
u32 rate_flags = 0; u32 rate_flags = 0;
u16 cmd_len; u16 cmd_len = 0;
u16 rx_chain = 0; u16 rx_chain = 0;
enum ieee80211_band band; enum ieee80211_band band;
u8 n_probes = 0; u8 n_probes = 0;
......
...@@ -2777,7 +2777,7 @@ static int mwl8k_cmd_tx_power(struct ieee80211_hw *hw, ...@@ -2777,7 +2777,7 @@ static int mwl8k_cmd_tx_power(struct ieee80211_hw *hw,
else if (channel->band == IEEE80211_BAND_5GHZ) else if (channel->band == IEEE80211_BAND_5GHZ)
cmd->band = cpu_to_le16(0x4); cmd->band = cpu_to_le16(0x4);
cmd->channel = channel->hw_value; cmd->channel = cpu_to_le16(channel->hw_value);
if (conf->channel_type == NL80211_CHAN_NO_HT || if (conf->channel_type == NL80211_CHAN_NO_HT ||
conf->channel_type == NL80211_CHAN_HT20) { conf->channel_type == NL80211_CHAN_HT20) {
...@@ -4066,7 +4066,7 @@ static int mwl8k_cmd_encryption_remove_key(struct ieee80211_hw *hw, ...@@ -4066,7 +4066,7 @@ static int mwl8k_cmd_encryption_remove_key(struct ieee80211_hw *hw,
goto done; goto done;
if (key->cipher == WLAN_CIPHER_SUITE_WEP40 || if (key->cipher == WLAN_CIPHER_SUITE_WEP40 ||
WLAN_CIPHER_SUITE_WEP104) key->cipher == WLAN_CIPHER_SUITE_WEP104)
mwl8k_vif->wep_key_conf[key->keyidx].enabled = 0; mwl8k_vif->wep_key_conf[key->keyidx].enabled = 0;
cmd->action = cpu_to_le32(MWL8K_ENCR_REMOVE_KEY); cmd->action = cpu_to_le32(MWL8K_ENCR_REMOVE_KEY);
......
...@@ -422,7 +422,6 @@ static int rt2800pci_init_queues(struct rt2x00_dev *rt2x00dev) ...@@ -422,7 +422,6 @@ static int rt2800pci_init_queues(struct rt2x00_dev *rt2x00dev)
static void rt2800pci_toggle_irq(struct rt2x00_dev *rt2x00dev, static void rt2800pci_toggle_irq(struct rt2x00_dev *rt2x00dev,
enum dev_state state) enum dev_state state)
{ {
int mask = (state == STATE_RADIO_IRQ_ON);
u32 reg; u32 reg;
unsigned long flags; unsigned long flags;
...@@ -436,25 +435,14 @@ static void rt2800pci_toggle_irq(struct rt2x00_dev *rt2x00dev, ...@@ -436,25 +435,14 @@ static void rt2800pci_toggle_irq(struct rt2x00_dev *rt2x00dev,
} }
spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags); spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags);
rt2x00pci_register_read(rt2x00dev, INT_MASK_CSR, &reg); reg = 0;
rt2x00_set_field32(&reg, INT_MASK_CSR_RXDELAYINT, 0); if (state == STATE_RADIO_IRQ_ON) {
rt2x00_set_field32(&reg, INT_MASK_CSR_TXDELAYINT, 0); rt2x00_set_field32(&reg, INT_MASK_CSR_RX_DONE, 1);
rt2x00_set_field32(&reg, INT_MASK_CSR_RX_DONE, mask); rt2x00_set_field32(&reg, INT_MASK_CSR_TBTT, 1);
rt2x00_set_field32(&reg, INT_MASK_CSR_AC0_DMA_DONE, 0); rt2x00_set_field32(&reg, INT_MASK_CSR_PRE_TBTT, 1);
rt2x00_set_field32(&reg, INT_MASK_CSR_AC1_DMA_DONE, 0); rt2x00_set_field32(&reg, INT_MASK_CSR_TX_FIFO_STATUS, 1);
rt2x00_set_field32(&reg, INT_MASK_CSR_AC2_DMA_DONE, 0); rt2x00_set_field32(&reg, INT_MASK_CSR_AUTO_WAKEUP, 1);
rt2x00_set_field32(&reg, INT_MASK_CSR_AC3_DMA_DONE, 0); }
rt2x00_set_field32(&reg, INT_MASK_CSR_HCCA_DMA_DONE, 0);
rt2x00_set_field32(&reg, INT_MASK_CSR_MGMT_DMA_DONE, 0);
rt2x00_set_field32(&reg, INT_MASK_CSR_MCU_COMMAND, 0);
rt2x00_set_field32(&reg, INT_MASK_CSR_RXTX_COHERENT, 0);
rt2x00_set_field32(&reg, INT_MASK_CSR_TBTT, mask);
rt2x00_set_field32(&reg, INT_MASK_CSR_PRE_TBTT, mask);
rt2x00_set_field32(&reg, INT_MASK_CSR_TX_FIFO_STATUS, mask);
rt2x00_set_field32(&reg, INT_MASK_CSR_AUTO_WAKEUP, mask);
rt2x00_set_field32(&reg, INT_MASK_CSR_GPTIMER, 0);
rt2x00_set_field32(&reg, INT_MASK_CSR_RX_COHERENT, 0);
rt2x00_set_field32(&reg, INT_MASK_CSR_TX_COHERENT, 0);
rt2x00pci_register_write(rt2x00dev, INT_MASK_CSR, reg); rt2x00pci_register_write(rt2x00dev, INT_MASK_CSR, reg);
spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags); spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags);
......
...@@ -162,7 +162,7 @@ struct bcma_driver { ...@@ -162,7 +162,7 @@ struct bcma_driver {
int (*probe)(struct bcma_device *dev); int (*probe)(struct bcma_device *dev);
void (*remove)(struct bcma_device *dev); void (*remove)(struct bcma_device *dev);
int (*suspend)(struct bcma_device *dev, pm_message_t state); int (*suspend)(struct bcma_device *dev);
int (*resume)(struct bcma_device *dev); int (*resume)(struct bcma_device *dev);
void (*shutdown)(struct bcma_device *dev); void (*shutdown)(struct bcma_device *dev);
......
...@@ -791,7 +791,7 @@ static int sta_apply_parameters(struct ieee80211_local *local, ...@@ -791,7 +791,7 @@ static int sta_apply_parameters(struct ieee80211_local *local,
if (set & BIT(NL80211_STA_FLAG_AUTHORIZED)) if (set & BIT(NL80211_STA_FLAG_AUTHORIZED))
ret = sta_info_move_state_checked(sta, ret = sta_info_move_state_checked(sta,
IEEE80211_STA_AUTHORIZED); IEEE80211_STA_AUTHORIZED);
else else if (test_sta_flag(sta, WLAN_STA_AUTHORIZED))
ret = sta_info_move_state_checked(sta, ret = sta_info_move_state_checked(sta,
IEEE80211_STA_ASSOC); IEEE80211_STA_ASSOC);
if (ret) if (ret)
......
...@@ -1979,6 +1979,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) ...@@ -1979,6 +1979,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
mesh_path_error_tx(ifmsh->mshcfg.element_ttl, fwd_hdr->addr3, mesh_path_error_tx(ifmsh->mshcfg.element_ttl, fwd_hdr->addr3,
0, reason, fwd_hdr->addr2, sdata); 0, reason, fwd_hdr->addr2, sdata);
IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_no_route); IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_no_route);
kfree_skb(fwd_skb);
return RX_DROP_MONITOR; return RX_DROP_MONITOR;
} }
......
...@@ -238,9 +238,11 @@ static void sta_unblock(struct work_struct *wk) ...@@ -238,9 +238,11 @@ static void sta_unblock(struct work_struct *wk)
if (sta->dead) if (sta->dead)
return; return;
if (!test_sta_flag(sta, WLAN_STA_PS_STA)) if (!test_sta_flag(sta, WLAN_STA_PS_STA)) {
local_bh_disable();
ieee80211_sta_ps_deliver_wakeup(sta); ieee80211_sta_ps_deliver_wakeup(sta);
else if (test_and_clear_sta_flag(sta, WLAN_STA_PSPOLL)) { local_bh_enable();
} else if (test_and_clear_sta_flag(sta, WLAN_STA_PSPOLL)) {
clear_sta_flag(sta, WLAN_STA_PS_DRIVER); clear_sta_flag(sta, WLAN_STA_PS_DRIVER);
local_bh_disable(); local_bh_disable();
......
...@@ -1001,8 +1001,6 @@ ieee80211_tx_h_stats(struct ieee80211_tx_data *tx) ...@@ -1001,8 +1001,6 @@ ieee80211_tx_h_stats(struct ieee80211_tx_data *tx)
static ieee80211_tx_result debug_noinline static ieee80211_tx_result debug_noinline
ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx) ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx)
{ {
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
if (!tx->key) if (!tx->key)
return TX_CONTINUE; return TX_CONTINUE;
...@@ -1017,13 +1015,7 @@ ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx) ...@@ -1017,13 +1015,7 @@ ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx)
case WLAN_CIPHER_SUITE_AES_CMAC: case WLAN_CIPHER_SUITE_AES_CMAC:
return ieee80211_crypto_aes_cmac_encrypt(tx); return ieee80211_crypto_aes_cmac_encrypt(tx);
default: default:
/* handle hw-only algorithm */ return ieee80211_crypto_hw_encrypt(tx);
if (info->control.hw_key) {
ieee80211_tx_set_protected(tx);
return TX_CONTINUE;
}
break;
} }
return TX_DROP; return TX_DROP;
......
...@@ -643,3 +643,22 @@ ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx) ...@@ -643,3 +643,22 @@ ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx)
return RX_CONTINUE; return RX_CONTINUE;
} }
ieee80211_tx_result
ieee80211_crypto_hw_encrypt(struct ieee80211_tx_data *tx)
{
struct sk_buff *skb;
struct ieee80211_tx_info *info = NULL;
skb_queue_walk(&tx->skbs, skb) {
info = IEEE80211_SKB_CB(skb);
/* handle hw-only algorithm */
if (!info->control.hw_key)
return TX_DROP;
}
ieee80211_tx_set_protected(tx);
return TX_CONTINUE;
}
...@@ -32,5 +32,7 @@ ieee80211_tx_result ...@@ -32,5 +32,7 @@ ieee80211_tx_result
ieee80211_crypto_aes_cmac_encrypt(struct ieee80211_tx_data *tx); ieee80211_crypto_aes_cmac_encrypt(struct ieee80211_tx_data *tx);
ieee80211_rx_result ieee80211_rx_result
ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx); ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx);
ieee80211_tx_result
ieee80211_crypto_hw_encrypt(struct ieee80211_tx_data *tx);
#endif /* WPA_H */ #endif /* WPA_H */
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