mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
This commit is contained in:
commit
f3a3440063
8 changed files with 108 additions and 76 deletions
|
|
@ -1117,10 +1117,9 @@ mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv,
|
|||
adhoc_join->bss_descriptor.bssid,
|
||||
adhoc_join->bss_descriptor.ssid);
|
||||
|
||||
for (i = 0; bss_desc->supported_rates[i] &&
|
||||
i < MWIFIEX_SUPPORTED_RATES;
|
||||
i++)
|
||||
;
|
||||
for (i = 0; i < MWIFIEX_SUPPORTED_RATES &&
|
||||
bss_desc->supported_rates[i]; i++)
|
||||
;
|
||||
rates_size = i;
|
||||
|
||||
/* Copy Data Rates from the Rates recorded in scan response */
|
||||
|
|
|
|||
|
|
@ -55,10 +55,10 @@ config RT61PCI
|
|||
|
||||
config RT2800PCI
|
||||
tristate "Ralink rt27xx/rt28xx/rt30xx (PCI/PCIe/PCMCIA) support"
|
||||
depends on PCI || RALINK_RT288X || RALINK_RT305X
|
||||
depends on PCI || SOC_RT288X || SOC_RT305X
|
||||
select RT2800_LIB
|
||||
select RT2X00_LIB_PCI if PCI
|
||||
select RT2X00_LIB_SOC if RALINK_RT288X || RALINK_RT305X
|
||||
select RT2X00_LIB_SOC if SOC_RT288X || SOC_RT305X
|
||||
select RT2X00_LIB_FIRMWARE
|
||||
select RT2X00_LIB_CRYPTO
|
||||
select CRC_CCITT
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ static void rt2800pci_mcu_status(struct rt2x00_dev *rt2x00dev, const u8 token)
|
|||
rt2x00pci_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_RALINK_RT288X) || defined(CONFIG_RALINK_RT305X)
|
||||
#if defined(CONFIG_SOC_RT288X) || defined(CONFIG_SOC_RT305X)
|
||||
static int rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev)
|
||||
{
|
||||
void __iomem *base_addr = ioremap(0x1F040000, EEPROM_SIZE);
|
||||
|
|
@ -107,7 +107,7 @@ static inline int rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev)
|
|||
{
|
||||
return -ENOMEM;
|
||||
}
|
||||
#endif /* CONFIG_RALINK_RT288X || CONFIG_RALINK_RT305X */
|
||||
#endif /* CONFIG_SOC_RT288X || CONFIG_SOC_RT305X */
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
static void rt2800pci_eepromregister_read(struct eeprom_93cx6 *eeprom)
|
||||
|
|
@ -1177,7 +1177,7 @@ MODULE_DEVICE_TABLE(pci, rt2800pci_device_table);
|
|||
#endif /* CONFIG_PCI */
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
#if defined(CONFIG_RALINK_RT288X) || defined(CONFIG_RALINK_RT305X)
|
||||
#if defined(CONFIG_SOC_RT288X) || defined(CONFIG_SOC_RT305X)
|
||||
static int rt2800soc_probe(struct platform_device *pdev)
|
||||
{
|
||||
return rt2x00soc_probe(pdev, &rt2800pci_ops);
|
||||
|
|
@ -1194,7 +1194,7 @@ static struct platform_driver rt2800soc_driver = {
|
|||
.suspend = rt2x00soc_suspend,
|
||||
.resume = rt2x00soc_resume,
|
||||
};
|
||||
#endif /* CONFIG_RALINK_RT288X || CONFIG_RALINK_RT305X */
|
||||
#endif /* CONFIG_SOC_RT288X || CONFIG_SOC_RT305X */
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
static int rt2800pci_probe(struct pci_dev *pci_dev,
|
||||
|
|
@ -1217,7 +1217,7 @@ static int __init rt2800pci_init(void)
|
|||
{
|
||||
int ret = 0;
|
||||
|
||||
#if defined(CONFIG_RALINK_RT288X) || defined(CONFIG_RALINK_RT305X)
|
||||
#if defined(CONFIG_SOC_RT288X) || defined(CONFIG_SOC_RT305X)
|
||||
ret = platform_driver_register(&rt2800soc_driver);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
@ -1225,7 +1225,7 @@ static int __init rt2800pci_init(void)
|
|||
#ifdef CONFIG_PCI
|
||||
ret = pci_register_driver(&rt2800pci_driver);
|
||||
if (ret) {
|
||||
#if defined(CONFIG_RALINK_RT288X) || defined(CONFIG_RALINK_RT305X)
|
||||
#if defined(CONFIG_SOC_RT288X) || defined(CONFIG_SOC_RT305X)
|
||||
platform_driver_unregister(&rt2800soc_driver);
|
||||
#endif
|
||||
return ret;
|
||||
|
|
@ -1240,7 +1240,7 @@ static void __exit rt2800pci_exit(void)
|
|||
#ifdef CONFIG_PCI
|
||||
pci_unregister_driver(&rt2800pci_driver);
|
||||
#endif
|
||||
#if defined(CONFIG_RALINK_RT288X) || defined(CONFIG_RALINK_RT305X)
|
||||
#if defined(CONFIG_SOC_RT288X) || defined(CONFIG_SOC_RT305X)
|
||||
platform_driver_unregister(&rt2800soc_driver);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1377,74 +1377,57 @@ void rtl92cu_card_disable(struct ieee80211_hw *hw)
|
|||
|
||||
void rtl92cu_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
|
||||
{
|
||||
/* dummy routine needed for callback from rtl_op_configure_filter() */
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
|
||||
u32 reg_rcr = rtl_read_dword(rtlpriv, REG_RCR);
|
||||
|
||||
if (rtlpriv->psc.rfpwr_state != ERFON)
|
||||
return;
|
||||
|
||||
if (check_bssid) {
|
||||
u8 tmp;
|
||||
if (IS_NORMAL_CHIP(rtlhal->version)) {
|
||||
reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN);
|
||||
tmp = BIT(4);
|
||||
} else {
|
||||
reg_rcr |= RCR_CBSSID;
|
||||
tmp = BIT(4) | BIT(5);
|
||||
}
|
||||
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR,
|
||||
(u8 *) (®_rcr));
|
||||
_rtl92cu_set_bcn_ctrl_reg(hw, 0, tmp);
|
||||
} else {
|
||||
u8 tmp;
|
||||
if (IS_NORMAL_CHIP(rtlhal->version)) {
|
||||
reg_rcr &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN);
|
||||
tmp = BIT(4);
|
||||
} else {
|
||||
reg_rcr &= ~RCR_CBSSID;
|
||||
tmp = BIT(4) | BIT(5);
|
||||
}
|
||||
reg_rcr &= (~(RCR_CBSSID_DATA | RCR_CBSSID_BCN));
|
||||
rtlpriv->cfg->ops->set_hw_reg(hw,
|
||||
HW_VAR_RCR, (u8 *) (®_rcr));
|
||||
_rtl92cu_set_bcn_ctrl_reg(hw, tmp, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/*========================================================================== */
|
||||
|
||||
static void _rtl92cu_set_check_bssid(struct ieee80211_hw *hw,
|
||||
enum nl80211_iftype type)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
u32 reg_rcr = rtl_read_dword(rtlpriv, REG_RCR);
|
||||
struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
|
||||
struct rtl_phy *rtlphy = &(rtlpriv->phy);
|
||||
u8 filterout_non_associated_bssid = false;
|
||||
|
||||
switch (type) {
|
||||
case NL80211_IFTYPE_ADHOC:
|
||||
case NL80211_IFTYPE_STATION:
|
||||
filterout_non_associated_bssid = true;
|
||||
break;
|
||||
case NL80211_IFTYPE_UNSPECIFIED:
|
||||
case NL80211_IFTYPE_AP:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (filterout_non_associated_bssid) {
|
||||
if (IS_NORMAL_CHIP(rtlhal->version)) {
|
||||
switch (rtlphy->current_io_type) {
|
||||
case IO_CMD_RESUME_DM_BY_SCAN:
|
||||
reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN);
|
||||
rtlpriv->cfg->ops->set_hw_reg(hw,
|
||||
HW_VAR_RCR, (u8 *)(®_rcr));
|
||||
/* enable update TSF */
|
||||
_rtl92cu_set_bcn_ctrl_reg(hw, 0, BIT(4));
|
||||
break;
|
||||
case IO_CMD_PAUSE_DM_BY_SCAN:
|
||||
reg_rcr &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN);
|
||||
rtlpriv->cfg->ops->set_hw_reg(hw,
|
||||
HW_VAR_RCR, (u8 *)(®_rcr));
|
||||
/* disable update TSF */
|
||||
_rtl92cu_set_bcn_ctrl_reg(hw, BIT(4), 0);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
reg_rcr |= (RCR_CBSSID);
|
||||
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR,
|
||||
(u8 *)(®_rcr));
|
||||
_rtl92cu_set_bcn_ctrl_reg(hw, 0, (BIT(4)|BIT(5)));
|
||||
}
|
||||
} else if (filterout_non_associated_bssid == false) {
|
||||
if (IS_NORMAL_CHIP(rtlhal->version)) {
|
||||
reg_rcr &= (~(RCR_CBSSID_DATA | RCR_CBSSID_BCN));
|
||||
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR,
|
||||
(u8 *)(®_rcr));
|
||||
_rtl92cu_set_bcn_ctrl_reg(hw, BIT(4), 0);
|
||||
} else {
|
||||
reg_rcr &= (~RCR_CBSSID);
|
||||
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR,
|
||||
(u8 *)(®_rcr));
|
||||
_rtl92cu_set_bcn_ctrl_reg(hw, (BIT(4)|BIT(5)), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int rtl92cu_set_network_type(struct ieee80211_hw *hw, enum nl80211_iftype type)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
|
||||
if (_rtl92cu_set_media_status(hw, type))
|
||||
return -EOPNOTSUPP;
|
||||
_rtl92cu_set_check_bssid(hw, type);
|
||||
|
||||
if (rtlpriv->mac80211.link_state == MAC80211_LINKED) {
|
||||
if (type != NL80211_IFTYPE_AP)
|
||||
rtl92cu_set_check_bssid(hw, true);
|
||||
} else {
|
||||
rtl92cu_set_check_bssid(hw, false);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2058,8 +2041,6 @@ void rtl92cu_update_hal_rate_table(struct ieee80211_hw *hw,
|
|||
(shortgi_rate << 4) | (shortgi_rate);
|
||||
}
|
||||
rtl_write_dword(rtlpriv, REG_ARFR0 + ratr_index * 4, ratr_value);
|
||||
RT_TRACE(rtlpriv, COMP_RATR, DBG_DMESG, "%x\n",
|
||||
rtl_read_dword(rtlpriv, REG_ARFR0));
|
||||
}
|
||||
|
||||
void rtl92cu_update_hal_rate_mask(struct ieee80211_hw *hw, u8 rssi_level)
|
||||
|
|
|
|||
Loading…
Reference in a new issue