mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-19 11:04:00 +08:00
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
This commit is contained in:
commit
81c412600f
@ -1000,9 +1000,8 @@ void ath9k_calculate_iter_data(struct ath_softc *sc,
|
|||||||
struct ath_vif *avp;
|
struct ath_vif *avp;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Pick the MAC address of the first interface as the new hardware
|
* The hardware will use primary station addr together with the
|
||||||
* MAC address. The hardware will use it together with the BSSID mask
|
* BSSID mask when matching addresses.
|
||||||
* when matching addresses.
|
|
||||||
*/
|
*/
|
||||||
memset(iter_data, 0, sizeof(*iter_data));
|
memset(iter_data, 0, sizeof(*iter_data));
|
||||||
memset(&iter_data->mask, 0xff, ETH_ALEN);
|
memset(&iter_data->mask, 0xff, ETH_ALEN);
|
||||||
@ -1232,6 +1231,8 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
|
|||||||
list_add_tail(&avp->list, &avp->chanctx->vifs);
|
list_add_tail(&avp->list, &avp->chanctx->vifs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ath9k_calculate_summary_state(sc, avp->chanctx);
|
||||||
|
|
||||||
ath9k_assign_hw_queues(hw, vif);
|
ath9k_assign_hw_queues(hw, vif);
|
||||||
|
|
||||||
an->sc = sc;
|
an->sc = sc;
|
||||||
@ -1301,6 +1302,8 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
|
|||||||
|
|
||||||
ath_tx_node_cleanup(sc, &avp->mcast_node);
|
ath_tx_node_cleanup(sc, &avp->mcast_node);
|
||||||
|
|
||||||
|
ath9k_calculate_summary_state(sc, avp->chanctx);
|
||||||
|
|
||||||
mutex_unlock(&sc->mutex);
|
mutex_unlock(&sc->mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,8 +40,8 @@ void brcmf_of_probe(struct brcmf_sdio_dev *sdiodev)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
irq = irq_of_parse_and_map(np, 0);
|
irq = irq_of_parse_and_map(np, 0);
|
||||||
if (irq < 0) {
|
if (!irq) {
|
||||||
brcmf_err("interrupt could not be mapped: err=%d\n", irq);
|
brcmf_err("interrupt could not be mapped\n");
|
||||||
devm_kfree(dev, sdiodev->pdata);
|
devm_kfree(dev, sdiodev->pdata);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
#include <linux/vmalloc.h>
|
#include <linux/vmalloc.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/unaligned/access_ok.h>
|
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/bcma/bcma.h>
|
#include <linux/bcma/bcma.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
|
#include <asm/unaligned.h>
|
||||||
|
|
||||||
#include <soc.h>
|
#include <soc.h>
|
||||||
#include <chipcommon.h>
|
#include <chipcommon.h>
|
||||||
|
@ -738,10 +738,12 @@ static int brcmf_usb_dl_cmd(struct brcmf_usbdev_info *devinfo, u8 cmd,
|
|||||||
goto finalize;
|
goto finalize;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!brcmf_usb_ioctl_resp_wait(devinfo))
|
if (!brcmf_usb_ioctl_resp_wait(devinfo)) {
|
||||||
|
usb_kill_urb(devinfo->ctl_urb);
|
||||||
ret = -ETIMEDOUT;
|
ret = -ETIMEDOUT;
|
||||||
else
|
} else {
|
||||||
memcpy(buffer, tmpbuf, buflen);
|
memcpy(buffer, tmpbuf, buflen);
|
||||||
|
}
|
||||||
|
|
||||||
finalize:
|
finalize:
|
||||||
kfree(tmpbuf);
|
kfree(tmpbuf);
|
||||||
|
@ -2249,6 +2249,16 @@ int rtl_pci_probe(struct pci_dev *pdev,
|
|||||||
/*like read eeprom and so on */
|
/*like read eeprom and so on */
|
||||||
rtlpriv->cfg->ops->read_eeprom_info(hw);
|
rtlpriv->cfg->ops->read_eeprom_info(hw);
|
||||||
|
|
||||||
|
if (rtlpriv->cfg->ops->init_sw_vars(hw)) {
|
||||||
|
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Can't init_sw_vars\n");
|
||||||
|
err = -ENODEV;
|
||||||
|
goto fail3;
|
||||||
|
}
|
||||||
|
rtlpriv->cfg->ops->init_sw_leds(hw);
|
||||||
|
|
||||||
|
/*aspm */
|
||||||
|
rtl_pci_init_aspm(hw);
|
||||||
|
|
||||||
/* Init mac80211 sw */
|
/* Init mac80211 sw */
|
||||||
err = rtl_init_core(hw);
|
err = rtl_init_core(hw);
|
||||||
if (err) {
|
if (err) {
|
||||||
@ -2264,16 +2274,6 @@ int rtl_pci_probe(struct pci_dev *pdev,
|
|||||||
goto fail3;
|
goto fail3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtlpriv->cfg->ops->init_sw_vars(hw)) {
|
|
||||||
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Can't init_sw_vars\n");
|
|
||||||
err = -ENODEV;
|
|
||||||
goto fail3;
|
|
||||||
}
|
|
||||||
rtlpriv->cfg->ops->init_sw_leds(hw);
|
|
||||||
|
|
||||||
/*aspm */
|
|
||||||
rtl_pci_init_aspm(hw);
|
|
||||||
|
|
||||||
err = ieee80211_register_hw(hw);
|
err = ieee80211_register_hw(hw);
|
||||||
if (err) {
|
if (err) {
|
||||||
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
|
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
|
||||||
|
@ -1287,6 +1287,7 @@ void rtl92ce_enable_interrupt(struct ieee80211_hw *hw)
|
|||||||
|
|
||||||
rtl_write_dword(rtlpriv, REG_HIMR, rtlpci->irq_mask[0] & 0xFFFFFFFF);
|
rtl_write_dword(rtlpriv, REG_HIMR, rtlpci->irq_mask[0] & 0xFFFFFFFF);
|
||||||
rtl_write_dword(rtlpriv, REG_HIMRE, rtlpci->irq_mask[1] & 0xFFFFFFFF);
|
rtl_write_dword(rtlpriv, REG_HIMRE, rtlpci->irq_mask[1] & 0xFFFFFFFF);
|
||||||
|
rtlpci->irq_enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtl92ce_disable_interrupt(struct ieee80211_hw *hw)
|
void rtl92ce_disable_interrupt(struct ieee80211_hw *hw)
|
||||||
@ -1296,7 +1297,7 @@ void rtl92ce_disable_interrupt(struct ieee80211_hw *hw)
|
|||||||
|
|
||||||
rtl_write_dword(rtlpriv, REG_HIMR, IMR8190_DISABLED);
|
rtl_write_dword(rtlpriv, REG_HIMR, IMR8190_DISABLED);
|
||||||
rtl_write_dword(rtlpriv, REG_HIMRE, IMR8190_DISABLED);
|
rtl_write_dword(rtlpriv, REG_HIMRE, IMR8190_DISABLED);
|
||||||
synchronize_irq(rtlpci->pdev->irq);
|
rtlpci->irq_enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _rtl92ce_poweroff_adapter(struct ieee80211_hw *hw)
|
static void _rtl92ce_poweroff_adapter(struct ieee80211_hw *hw)
|
||||||
|
@ -228,6 +228,7 @@ static struct rtl_hal_ops rtl8192ce_hal_ops = {
|
|||||||
.led_control = rtl92ce_led_control,
|
.led_control = rtl92ce_led_control,
|
||||||
.set_desc = rtl92ce_set_desc,
|
.set_desc = rtl92ce_set_desc,
|
||||||
.get_desc = rtl92ce_get_desc,
|
.get_desc = rtl92ce_get_desc,
|
||||||
|
.is_tx_desc_closed = rtl92ce_is_tx_desc_closed,
|
||||||
.tx_polling = rtl92ce_tx_polling,
|
.tx_polling = rtl92ce_tx_polling,
|
||||||
.enable_hw_sec = rtl92ce_enable_hw_security_config,
|
.enable_hw_sec = rtl92ce_enable_hw_security_config,
|
||||||
.set_key = rtl92ce_set_key,
|
.set_key = rtl92ce_set_key,
|
||||||
@ -271,6 +272,8 @@ static struct rtl_hal_cfg rtl92ce_hal_cfg = {
|
|||||||
.maps[MAC_RCR_ACRC32] = ACRC32,
|
.maps[MAC_RCR_ACRC32] = ACRC32,
|
||||||
.maps[MAC_RCR_ACF] = ACF,
|
.maps[MAC_RCR_ACF] = ACF,
|
||||||
.maps[MAC_RCR_AAP] = AAP,
|
.maps[MAC_RCR_AAP] = AAP,
|
||||||
|
.maps[MAC_HIMR] = REG_HIMR,
|
||||||
|
.maps[MAC_HIMRE] = REG_HIMRE,
|
||||||
|
|
||||||
.maps[EFUSE_TEST] = REG_EFUSE_TEST,
|
.maps[EFUSE_TEST] = REG_EFUSE_TEST,
|
||||||
.maps[EFUSE_CTRL] = REG_EFUSE_CTRL,
|
.maps[EFUSE_CTRL] = REG_EFUSE_CTRL,
|
||||||
|
@ -720,16 +720,15 @@ u32 rtl92ce_get_desc(u8 *p_desc, bool istx, u8 desc_name)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
struct rx_desc_92c *pdesc = (struct rx_desc_92c *)p_desc;
|
|
||||||
switch (desc_name) {
|
switch (desc_name) {
|
||||||
case HW_DESC_OWN:
|
case HW_DESC_OWN:
|
||||||
ret = GET_RX_DESC_OWN(pdesc);
|
ret = GET_RX_DESC_OWN(p_desc);
|
||||||
break;
|
break;
|
||||||
case HW_DESC_RXPKT_LEN:
|
case HW_DESC_RXPKT_LEN:
|
||||||
ret = GET_RX_DESC_PKT_LEN(pdesc);
|
ret = GET_RX_DESC_PKT_LEN(p_desc);
|
||||||
break;
|
break;
|
||||||
case HW_DESC_RXBUFF_ADDR:
|
case HW_DESC_RXBUFF_ADDR:
|
||||||
ret = GET_RX_STATUS_DESC_BUFF_ADDR(pdesc);
|
ret = GET_RX_DESC_BUFF_ADDR(p_desc);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
RT_ASSERT(false, "ERR rxdesc :%d not process\n",
|
RT_ASSERT(false, "ERR rxdesc :%d not process\n",
|
||||||
@ -740,6 +739,23 @@ u32 rtl92ce_get_desc(u8 *p_desc, bool istx, u8 desc_name)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool rtl92ce_is_tx_desc_closed(struct ieee80211_hw *hw,
|
||||||
|
u8 hw_queue, u16 index)
|
||||||
|
{
|
||||||
|
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
|
||||||
|
struct rtl8192_tx_ring *ring = &rtlpci->tx_ring[hw_queue];
|
||||||
|
u8 *entry = (u8 *)(&ring->desc[ring->idx]);
|
||||||
|
u8 own = (u8)rtl92ce_get_desc(entry, true, HW_DESC_OWN);
|
||||||
|
|
||||||
|
/*beacon packet will only use the first
|
||||||
|
*descriptor defautly,and the own may not
|
||||||
|
*be cleared by the hardware
|
||||||
|
*/
|
||||||
|
if (own)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void rtl92ce_tx_polling(struct ieee80211_hw *hw, u8 hw_queue)
|
void rtl92ce_tx_polling(struct ieee80211_hw *hw, u8 hw_queue)
|
||||||
{
|
{
|
||||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||||
|
@ -723,6 +723,8 @@ bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
|
|||||||
void rtl92ce_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
|
void rtl92ce_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
|
||||||
u8 desc_name, u8 *val);
|
u8 desc_name, u8 *val);
|
||||||
u32 rtl92ce_get_desc(u8 *pdesc, bool istx, u8 desc_name);
|
u32 rtl92ce_get_desc(u8 *pdesc, bool istx, u8 desc_name);
|
||||||
|
bool rtl92ce_is_tx_desc_closed(struct ieee80211_hw *hw,
|
||||||
|
u8 hw_queue, u16 index);
|
||||||
void rtl92ce_tx_polling(struct ieee80211_hw *hw, u8 hw_queue);
|
void rtl92ce_tx_polling(struct ieee80211_hw *hw, u8 hw_queue);
|
||||||
void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
|
void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
|
||||||
bool b_firstseg, bool b_lastseg,
|
bool b_firstseg, bool b_lastseg,
|
||||||
|
@ -3672,8 +3672,9 @@ static void rtl8821ae_update_hal_rate_mask(struct ieee80211_hw *hw,
|
|||||||
mac->opmode == NL80211_IFTYPE_ADHOC)
|
mac->opmode == NL80211_IFTYPE_ADHOC)
|
||||||
macid = sta->aid + 1;
|
macid = sta->aid + 1;
|
||||||
if (wirelessmode == WIRELESS_MODE_N_5G ||
|
if (wirelessmode == WIRELESS_MODE_N_5G ||
|
||||||
wirelessmode == WIRELESS_MODE_AC_5G)
|
wirelessmode == WIRELESS_MODE_AC_5G ||
|
||||||
ratr_bitmap = sta->supp_rates[NL80211_BAND_5GHZ];
|
wirelessmode == WIRELESS_MODE_A)
|
||||||
|
ratr_bitmap = sta->supp_rates[NL80211_BAND_5GHZ] << 4;
|
||||||
else
|
else
|
||||||
ratr_bitmap = sta->supp_rates[NL80211_BAND_2GHZ];
|
ratr_bitmap = sta->supp_rates[NL80211_BAND_2GHZ];
|
||||||
|
|
||||||
|
@ -394,19 +394,16 @@ minstrel_ht_sort_best_tp_rates(struct minstrel_ht_sta *mi, u16 index,
|
|||||||
cur_thr = mi->groups[cur_group].rates[cur_idx].cur_tp;
|
cur_thr = mi->groups[cur_group].rates[cur_idx].cur_tp;
|
||||||
cur_prob = mi->groups[cur_group].rates[cur_idx].probability;
|
cur_prob = mi->groups[cur_group].rates[cur_idx].probability;
|
||||||
|
|
||||||
|
do {
|
||||||
tmp_group = tp_list[j - 1] / MCS_GROUP_RATES;
|
tmp_group = tp_list[j - 1] / MCS_GROUP_RATES;
|
||||||
tmp_idx = tp_list[j - 1] % MCS_GROUP_RATES;
|
tmp_idx = tp_list[j - 1] % MCS_GROUP_RATES;
|
||||||
tmp_thr = mi->groups[tmp_group].rates[tmp_idx].cur_tp;
|
tmp_thr = mi->groups[tmp_group].rates[tmp_idx].cur_tp;
|
||||||
tmp_prob = mi->groups[tmp_group].rates[tmp_idx].probability;
|
tmp_prob = mi->groups[tmp_group].rates[tmp_idx].probability;
|
||||||
|
if (cur_thr < tmp_thr ||
|
||||||
while (j > 0 && (cur_thr > tmp_thr ||
|
(cur_thr == tmp_thr && cur_prob <= tmp_prob))
|
||||||
(cur_thr == tmp_thr && cur_prob > tmp_prob))) {
|
break;
|
||||||
j--;
|
j--;
|
||||||
tmp_group = tp_list[j - 1] / MCS_GROUP_RATES;
|
} while (j > 0);
|
||||||
tmp_idx = tp_list[j - 1] % MCS_GROUP_RATES;
|
|
||||||
tmp_thr = mi->groups[tmp_group].rates[tmp_idx].cur_tp;
|
|
||||||
tmp_prob = mi->groups[tmp_group].rates[tmp_idx].probability;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (j < MAX_THR_RATES - 1) {
|
if (j < MAX_THR_RATES - 1) {
|
||||||
memmove(&tp_list[j + 1], &tp_list[j], (sizeof(*tp_list) *
|
memmove(&tp_list[j + 1], &tp_list[j], (sizeof(*tp_list) *
|
||||||
|
Loading…
Reference in New Issue
Block a user