Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+109 -113
+8 -7
MAINTAINERS
··· 1411 1411 B43 WIRELESS DRIVER 1412 1412 M: Stefano Brivio <stefano.brivio@polimi.it> 1413 1413 L: linux-wireless@vger.kernel.org 1414 + L: b43-dev@lists.infradead.org (moderated for non-subscribers) 1414 1415 W: http://linuxwireless.org/en/users/Drivers/b43 1415 1416 S: Maintained 1416 1417 F: drivers/net/wireless/b43/ ··· 1587 1586 L: linux-scsi@vger.kernel.org 1588 1587 S: Supported 1589 1588 F: drivers/scsi/bnx2fc/ 1589 + 1590 + BROADCOM SPECIFIC AMBA DRIVER (BCMA) 1591 + M: Rafał Miłecki <zajec5@gmail.com> 1592 + L: linux-wireless@vger.kernel.org 1593 + S: Maintained 1594 + F: drivers/bcma/ 1595 + F: include/linux/bcma/ 1590 1596 1591 1597 BROCADE BFA FC SCSI DRIVER 1592 1598 M: Jing Huang <huangj@brocade.com> ··· 6106 6098 S: Maintained 6107 6099 F: drivers/ssb/ 6108 6100 F: include/linux/ssb/ 6109 - 6110 - BROADCOM SPECIFIC AMBA DRIVER (BCMA) 6111 - M: Rafał Miłecki <zajec5@gmail.com> 6112 - L: linux-wireless@vger.kernel.org 6113 - S: Maintained 6114 - F: drivers/bcma/ 6115 - F: include/linux/bcma/ 6116 6101 6117 6102 SONY VAIO CONTROL DEVICE DRIVER 6118 6103 M: Mattia Dongili <malattia@linux.it>
+1
drivers/bcma/bcma_private.h
··· 19 19 struct bcma_device *core_cc, 20 20 struct bcma_device *core_mips); 21 21 #ifdef CONFIG_PM 22 + int bcma_bus_suspend(struct bcma_bus *bus); 22 23 int bcma_bus_resume(struct bcma_bus *bus); 23 24 #endif 24 25
+19 -26
drivers/bcma/host_pci.c
··· 235 235 } 236 236 237 237 #ifdef CONFIG_PM 238 - static int bcma_host_pci_suspend(struct pci_dev *dev, pm_message_t state) 238 + static int bcma_host_pci_suspend(struct device *dev) 239 239 { 240 - /* Host specific */ 241 - pci_save_state(dev); 242 - pci_disable_device(dev); 243 - pci_set_power_state(dev, pci_choose_state(dev, state)); 240 + struct pci_dev *pdev = to_pci_dev(dev); 241 + struct bcma_bus *bus = pci_get_drvdata(pdev); 244 242 245 - return 0; 243 + bus->mapped_core = NULL; 244 + 245 + return bcma_bus_suspend(bus); 246 246 } 247 247 248 - static int bcma_host_pci_resume(struct pci_dev *dev) 248 + static int bcma_host_pci_resume(struct device *dev) 249 249 { 250 - struct bcma_bus *bus = pci_get_drvdata(dev); 251 - int err; 250 + struct pci_dev *pdev = to_pci_dev(dev); 251 + struct bcma_bus *bus = pci_get_drvdata(pdev); 252 252 253 - /* Host specific */ 254 - pci_set_power_state(dev, 0); 255 - err = pci_enable_device(dev); 256 - if (err) 257 - return err; 258 - pci_restore_state(dev); 259 - 260 - /* Bus specific */ 261 - err = bcma_bus_resume(bus); 262 - if (err) 263 - return err; 264 - 265 - return 0; 253 + return bcma_bus_resume(bus); 266 254 } 255 + 256 + static SIMPLE_DEV_PM_OPS(bcma_pm_ops, bcma_host_pci_suspend, 257 + bcma_host_pci_resume); 258 + #define BCMA_PM_OPS (&bcma_pm_ops) 259 + 267 260 #else /* CONFIG_PM */ 268 - # define bcma_host_pci_suspend NULL 269 - # define bcma_host_pci_resume NULL 261 + 262 + #define BCMA_PM_OPS NULL 263 + 270 264 #endif /* CONFIG_PM */ 271 265 272 266 static DEFINE_PCI_DEVICE_TABLE(bcma_pci_bridge_tbl) = { ··· 278 284 .id_table = bcma_pci_bridge_tbl, 279 285 .probe = bcma_host_pci_probe, 280 286 .remove = bcma_host_pci_remove, 281 - .suspend = bcma_host_pci_suspend, 282 - .resume = bcma_host_pci_resume, 287 + .driver.pm = BCMA_PM_OPS, 283 288 }; 284 289 285 290 int __init bcma_host_pci_init(void)
+24
drivers/bcma/main.c
··· 241 241 } 242 242 243 243 #ifdef CONFIG_PM 244 + int bcma_bus_suspend(struct bcma_bus *bus) 245 + { 246 + struct bcma_device *core; 247 + 248 + list_for_each_entry(core, &bus->cores, list) { 249 + struct device_driver *drv = core->dev.driver; 250 + if (drv) { 251 + struct bcma_driver *adrv = container_of(drv, struct bcma_driver, drv); 252 + if (adrv->suspend) 253 + adrv->suspend(core); 254 + } 255 + } 256 + return 0; 257 + } 258 + 244 259 int bcma_bus_resume(struct bcma_bus *bus) 245 260 { 246 261 struct bcma_device *core; ··· 265 250 if (core) { 266 251 bus->drv_cc.setup_done = false; 267 252 bcma_core_chipcommon_init(&bus->drv_cc); 253 + } 254 + 255 + list_for_each_entry(core, &bus->cores, list) { 256 + struct device_driver *drv = core->dev.driver; 257 + if (drv) { 258 + struct bcma_driver *adrv = container_of(drv, struct bcma_driver, drv); 259 + if (adrv->resume) 260 + adrv->resume(core); 261 + } 268 262 } 269 263 270 264 return 0;
+3 -2
drivers/net/wireless/ath/ath9k/ar9003_mac.c
··· 557 557 rxs->rs_status |= ATH9K_RXERR_DECRYPT; 558 558 else if (rxsp->status11 & AR_MichaelErr) 559 559 rxs->rs_status |= ATH9K_RXERR_MIC; 560 - if (rxsp->status11 & AR_KeyMiss) 561 - rxs->rs_status |= ATH9K_RXERR_KEYMISS; 562 560 } 561 + 562 + if (rxsp->status11 & AR_KeyMiss) 563 + rxs->rs_status |= ATH9K_RXERR_KEYMISS; 563 564 564 565 return 0; 565 566 }
+3 -2
drivers/net/wireless/ath/ath9k/mac.c
··· 618 618 rs->rs_status |= ATH9K_RXERR_DECRYPT; 619 619 else if (ads.ds_rxstatus8 & AR_MichaelErr) 620 620 rs->rs_status |= ATH9K_RXERR_MIC; 621 - if (ads.ds_rxstatus8 & AR_KeyMiss) 622 - rs->rs_status |= ATH9K_RXERR_KEYMISS; 623 621 } 622 + 623 + if (ads.ds_rxstatus8 & AR_KeyMiss) 624 + rs->rs_status |= ATH9K_RXERR_KEYMISS; 624 625 625 626 return 0; 626 627 }
+4 -1
drivers/net/wireless/b43/main.c
··· 4852 4852 4853 4853 cancel_work_sync(&(wl->beacon_update_trigger)); 4854 4854 4855 + if (!dev) 4856 + goto out; 4857 + 4855 4858 mutex_lock(&wl->mutex); 4856 4859 if (b43_status(dev) >= B43_STAT_STARTED) { 4857 4860 dev = b43_wireless_core_stop(dev); ··· 4866 4863 4867 4864 out_unlock: 4868 4865 mutex_unlock(&wl->mutex); 4869 - 4866 + out: 4870 4867 cancel_work_sync(&(wl->txpower_adjust_work)); 4871 4868 } 4872 4869
+1 -1
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
··· 2475 2475 return err; 2476 2476 } 2477 2477 2478 - static void brcmf_delay(u32 ms) 2478 + static __always_inline void brcmf_delay(u32 ms) 2479 2479 { 2480 2480 if (ms < 1000 / HZ) { 2481 2481 cond_resched();
+4 -36
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
··· 1128 1128 return 0; 1129 1129 } 1130 1130 1131 - static int brcms_pci_suspend(struct pci_dev *pdev) 1132 - { 1133 - pci_save_state(pdev); 1134 - pci_disable_device(pdev); 1135 - return pci_set_power_state(pdev, PCI_D3hot); 1136 - } 1137 - 1138 - static int brcms_suspend(struct bcma_device *pdev, pm_message_t state) 1131 + static int brcms_suspend(struct bcma_device *pdev) 1139 1132 { 1140 1133 struct brcms_info *wl; 1141 1134 struct ieee80211_hw *hw; ··· 1146 1153 wl->pub->hw_up = false; 1147 1154 spin_unlock_bh(&wl->lock); 1148 1155 1149 - /* temporarily do suspend ourselves */ 1150 - return brcms_pci_suspend(pdev->bus->host_pci); 1151 - } 1152 - 1153 - static int brcms_pci_resume(struct pci_dev *pdev) 1154 - { 1155 - int err = 0; 1156 - uint val; 1157 - 1158 - err = pci_set_power_state(pdev, PCI_D0); 1159 - if (err) 1160 - return err; 1161 - 1162 - pci_restore_state(pdev); 1163 - 1164 - err = pci_enable_device(pdev); 1165 - if (err) 1166 - return err; 1167 - 1168 - pci_set_master(pdev); 1169 - 1170 - pci_read_config_dword(pdev, 0x40, &val); 1171 - if ((val & 0x0000ff00) != 0) 1172 - pci_write_config_dword(pdev, 0x40, val & 0xffff00ff); 1156 + pr_debug("brcms_suspend ok\n"); 1173 1157 1174 1158 return 0; 1175 1159 } 1176 1160 1177 1161 static int brcms_resume(struct bcma_device *pdev) 1178 1162 { 1179 - /* 1180 - * just do pci resume for now until bcma supports it. 1181 - */ 1182 - return brcms_pci_resume(pdev->bus->host_pci); 1163 + pr_debug("brcms_resume ok\n"); 1164 + return 0; 1183 1165 } 1184 1166 1185 1167 static struct bcma_driver brcms_bcma_driver = {
+2 -2
drivers/net/wireless/ipw2x00/ipw2200.c
··· 7848 7848 * more efficiently than we can parse it. ORDER MATTERS HERE */ 7849 7849 struct ipw_rt_hdr *ipw_rt; 7850 7850 7851 - short len = le16_to_cpu(pkt->u.frame.length); 7851 + unsigned short len = le16_to_cpu(pkt->u.frame.length); 7852 7852 7853 7853 /* We received data from the HW, so stop the watchdog */ 7854 7854 dev->trans_start = jiffies; ··· 8023 8023 s8 signal = frame->rssi_dbm - IPW_RSSI_TO_DBM; 8024 8024 s8 noise = (s8) le16_to_cpu(frame->noise); 8025 8025 u8 rate = frame->rate; 8026 - short len = le16_to_cpu(pkt->u.frame.length); 8026 + unsigned short len = le16_to_cpu(pkt->u.frame.length); 8027 8027 struct sk_buff *skb; 8028 8028 int hdr_only = 0; 8029 8029 u16 filter = priv->prom_priv->filter;
+1 -1
drivers/net/wireless/iwlwifi/iwl-scan.c
··· 569 569 struct iwl_scan_cmd *scan; 570 570 struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; 571 571 u32 rate_flags = 0; 572 - u16 cmd_len; 572 + u16 cmd_len = 0; 573 573 u16 rx_chain = 0; 574 574 enum ieee80211_band band; 575 575 u8 n_probes = 0;
+2 -2
drivers/net/wireless/mwl8k.c
··· 2777 2777 else if (channel->band == IEEE80211_BAND_5GHZ) 2778 2778 cmd->band = cpu_to_le16(0x4); 2779 2779 2780 - cmd->channel = channel->hw_value; 2780 + cmd->channel = cpu_to_le16(channel->hw_value); 2781 2781 2782 2782 if (conf->channel_type == NL80211_CHAN_NO_HT || 2783 2783 conf->channel_type == NL80211_CHAN_HT20) { ··· 4066 4066 goto done; 4067 4067 4068 4068 if (key->cipher == WLAN_CIPHER_SUITE_WEP40 || 4069 - WLAN_CIPHER_SUITE_WEP104) 4069 + key->cipher == WLAN_CIPHER_SUITE_WEP104) 4070 4070 mwl8k_vif->wep_key_conf[key->keyidx].enabled = 0; 4071 4071 4072 4072 cmd->action = cpu_to_le32(MWL8K_ENCR_REMOVE_KEY);
+8 -20
drivers/net/wireless/rt2x00/rt2800pci.c
··· 422 422 static void rt2800pci_toggle_irq(struct rt2x00_dev *rt2x00dev, 423 423 enum dev_state state) 424 424 { 425 - int mask = (state == STATE_RADIO_IRQ_ON); 426 425 u32 reg; 427 426 unsigned long flags; 428 427 ··· 435 436 } 436 437 437 438 spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags); 438 - rt2x00pci_register_read(rt2x00dev, INT_MASK_CSR, &reg); 439 - rt2x00_set_field32(&reg, INT_MASK_CSR_RXDELAYINT, 0); 440 - rt2x00_set_field32(&reg, INT_MASK_CSR_TXDELAYINT, 0); 441 - rt2x00_set_field32(&reg, INT_MASK_CSR_RX_DONE, mask); 442 - rt2x00_set_field32(&reg, INT_MASK_CSR_AC0_DMA_DONE, 0); 443 - rt2x00_set_field32(&reg, INT_MASK_CSR_AC1_DMA_DONE, 0); 444 - rt2x00_set_field32(&reg, INT_MASK_CSR_AC2_DMA_DONE, 0); 445 - rt2x00_set_field32(&reg, INT_MASK_CSR_AC3_DMA_DONE, 0); 446 - rt2x00_set_field32(&reg, INT_MASK_CSR_HCCA_DMA_DONE, 0); 447 - rt2x00_set_field32(&reg, INT_MASK_CSR_MGMT_DMA_DONE, 0); 448 - rt2x00_set_field32(&reg, INT_MASK_CSR_MCU_COMMAND, 0); 449 - rt2x00_set_field32(&reg, INT_MASK_CSR_RXTX_COHERENT, 0); 450 - rt2x00_set_field32(&reg, INT_MASK_CSR_TBTT, mask); 451 - rt2x00_set_field32(&reg, INT_MASK_CSR_PRE_TBTT, mask); 452 - rt2x00_set_field32(&reg, INT_MASK_CSR_TX_FIFO_STATUS, mask); 453 - rt2x00_set_field32(&reg, INT_MASK_CSR_AUTO_WAKEUP, mask); 454 - rt2x00_set_field32(&reg, INT_MASK_CSR_GPTIMER, 0); 455 - rt2x00_set_field32(&reg, INT_MASK_CSR_RX_COHERENT, 0); 456 - rt2x00_set_field32(&reg, INT_MASK_CSR_TX_COHERENT, 0); 439 + reg = 0; 440 + if (state == STATE_RADIO_IRQ_ON) { 441 + rt2x00_set_field32(&reg, INT_MASK_CSR_RX_DONE, 1); 442 + rt2x00_set_field32(&reg, INT_MASK_CSR_TBTT, 1); 443 + rt2x00_set_field32(&reg, INT_MASK_CSR_PRE_TBTT, 1); 444 + rt2x00_set_field32(&reg, INT_MASK_CSR_TX_FIFO_STATUS, 1); 445 + rt2x00_set_field32(&reg, INT_MASK_CSR_AUTO_WAKEUP, 1); 446 + } 457 447 rt2x00pci_register_write(rt2x00dev, INT_MASK_CSR, reg); 458 448 spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags); 459 449
+1 -1
include/linux/bcma/bcma.h
··· 162 162 163 163 int (*probe)(struct bcma_device *dev); 164 164 void (*remove)(struct bcma_device *dev); 165 - int (*suspend)(struct bcma_device *dev, pm_message_t state); 165 + int (*suspend)(struct bcma_device *dev); 166 166 int (*resume)(struct bcma_device *dev); 167 167 void (*shutdown)(struct bcma_device *dev); 168 168
+1 -1
net/mac80211/cfg.c
··· 791 791 if (set & BIT(NL80211_STA_FLAG_AUTHORIZED)) 792 792 ret = sta_info_move_state_checked(sta, 793 793 IEEE80211_STA_AUTHORIZED); 794 - else 794 + else if (test_sta_flag(sta, WLAN_STA_AUTHORIZED)) 795 795 ret = sta_info_move_state_checked(sta, 796 796 IEEE80211_STA_ASSOC); 797 797 if (ret)
+1
net/mac80211/rx.c
··· 1979 1979 mesh_path_error_tx(ifmsh->mshcfg.element_ttl, fwd_hdr->addr3, 1980 1980 0, reason, fwd_hdr->addr2, sdata); 1981 1981 IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_no_route); 1982 + kfree_skb(fwd_skb); 1982 1983 return RX_DROP_MONITOR; 1983 1984 } 1984 1985
+4 -2
net/mac80211/sta_info.c
··· 238 238 if (sta->dead) 239 239 return; 240 240 241 - if (!test_sta_flag(sta, WLAN_STA_PS_STA)) 241 + if (!test_sta_flag(sta, WLAN_STA_PS_STA)) { 242 + local_bh_disable(); 242 243 ieee80211_sta_ps_deliver_wakeup(sta); 243 - else if (test_and_clear_sta_flag(sta, WLAN_STA_PSPOLL)) { 244 + local_bh_enable(); 245 + } else if (test_and_clear_sta_flag(sta, WLAN_STA_PSPOLL)) { 244 246 clear_sta_flag(sta, WLAN_STA_PS_DRIVER); 245 247 246 248 local_bh_disable();
+1 -9
net/mac80211/tx.c
··· 1001 1001 static ieee80211_tx_result debug_noinline 1002 1002 ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx) 1003 1003 { 1004 - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); 1005 - 1006 1004 if (!tx->key) 1007 1005 return TX_CONTINUE; 1008 1006 ··· 1015 1017 case WLAN_CIPHER_SUITE_AES_CMAC: 1016 1018 return ieee80211_crypto_aes_cmac_encrypt(tx); 1017 1019 default: 1018 - /* handle hw-only algorithm */ 1019 - if (info->control.hw_key) { 1020 - ieee80211_tx_set_protected(tx); 1021 - return TX_CONTINUE; 1022 - } 1023 - break; 1024 - 1020 + return ieee80211_crypto_hw_encrypt(tx); 1025 1021 } 1026 1022 1027 1023 return TX_DROP;
+19
net/mac80211/wpa.c
··· 643 643 644 644 return RX_CONTINUE; 645 645 } 646 + 647 + ieee80211_tx_result 648 + ieee80211_crypto_hw_encrypt(struct ieee80211_tx_data *tx) 649 + { 650 + struct sk_buff *skb; 651 + struct ieee80211_tx_info *info = NULL; 652 + 653 + skb_queue_walk(&tx->skbs, skb) { 654 + info = IEEE80211_SKB_CB(skb); 655 + 656 + /* handle hw-only algorithm */ 657 + if (!info->control.hw_key) 658 + return TX_DROP; 659 + } 660 + 661 + ieee80211_tx_set_protected(tx); 662 + 663 + return TX_CONTINUE; 664 + }
+2
net/mac80211/wpa.h
··· 32 32 ieee80211_crypto_aes_cmac_encrypt(struct ieee80211_tx_data *tx); 33 33 ieee80211_rx_result 34 34 ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx); 35 + ieee80211_tx_result 36 + ieee80211_crypto_hw_encrypt(struct ieee80211_tx_data *tx); 35 37 36 38 #endif /* WPA_H */