Commit dbd717e3 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 9fe5642f fd09c85f
...@@ -3592,6 +3592,7 @@ S: Supported ...@@ -3592,6 +3592,7 @@ S: Supported
F: drivers/net/wireless/iwlegacy/ F: drivers/net/wireless/iwlegacy/
INTEL WIRELESS WIFI LINK (iwlwifi) INTEL WIRELESS WIFI LINK (iwlwifi)
M: Johannes Berg <johannes.berg@intel.com>
M: Wey-Yi Guy <wey-yi.w.guy@intel.com> M: Wey-Yi Guy <wey-yi.w.guy@intel.com>
M: Intel Linux Wireless <ilw@linux.intel.com> M: Intel Linux Wireless <ilw@linux.intel.com>
L: linux-wireless@vger.kernel.org L: linux-wireless@vger.kernel.org
......
...@@ -404,16 +404,19 @@ int bcma_sprom_get(struct bcma_bus *bus) ...@@ -404,16 +404,19 @@ int bcma_sprom_get(struct bcma_bus *bus)
return -EOPNOTSUPP; return -EOPNOTSUPP;
if (!bcma_sprom_ext_available(bus)) { if (!bcma_sprom_ext_available(bus)) {
bool sprom_onchip;
/* /*
* External SPROM takes precedence so check * External SPROM takes precedence so check
* on-chip OTP only when no external SPROM * on-chip OTP only when no external SPROM
* is present. * is present.
*/ */
if (bcma_sprom_onchip_available(bus)) { sprom_onchip = bcma_sprom_onchip_available(bus);
if (sprom_onchip) {
/* determine offset */ /* determine offset */
offset = bcma_sprom_onchip_offset(bus); offset = bcma_sprom_onchip_offset(bus);
} }
if (!offset) { if (!offset || !sprom_onchip) {
/* /*
* Maybe there is no SPROM on the device? * Maybe there is no SPROM on the device?
* Now we ask the arch code if there is some sprom * Now we ask the arch code if there is some sprom
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/nl80211.h> #include <linux/nl80211.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#include <linux/export.h>
#include <ar231x_platform.h> #include <ar231x_platform.h>
#include "ath5k.h" #include "ath5k.h"
#include "debug.h" #include "debug.h"
...@@ -119,7 +120,7 @@ static int ath_ahb_probe(struct platform_device *pdev) ...@@ -119,7 +120,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
if (res == NULL) { if (res == NULL) {
dev_err(&pdev->dev, "no IRQ resource found\n"); dev_err(&pdev->dev, "no IRQ resource found\n");
ret = -ENXIO; ret = -ENXIO;
goto err_out; goto err_iounmap;
} }
irq = res->start; irq = res->start;
...@@ -128,7 +129,7 @@ static int ath_ahb_probe(struct platform_device *pdev) ...@@ -128,7 +129,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
if (hw == NULL) { if (hw == NULL) {
dev_err(&pdev->dev, "no memory for ieee80211_hw\n"); dev_err(&pdev->dev, "no memory for ieee80211_hw\n");
ret = -ENOMEM; ret = -ENOMEM;
goto err_out; goto err_iounmap;
} }
ah = hw->priv; ah = hw->priv;
...@@ -185,6 +186,8 @@ static int ath_ahb_probe(struct platform_device *pdev) ...@@ -185,6 +186,8 @@ static int ath_ahb_probe(struct platform_device *pdev)
err_free_hw: err_free_hw:
ieee80211_free_hw(hw); ieee80211_free_hw(hw);
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
err_iounmap:
iounmap(mem);
err_out: err_out:
return ret; return ret;
} }
......
...@@ -1548,6 +1548,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) ...@@ -1548,6 +1548,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
struct ath_hw *ah = sc->sc_ah; struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ieee80211_conf *conf = &hw->conf; struct ieee80211_conf *conf = &hw->conf;
bool reset_channel = false;
ath9k_ps_wakeup(sc); ath9k_ps_wakeup(sc);
mutex_lock(&sc->mutex); mutex_lock(&sc->mutex);
...@@ -1556,6 +1557,12 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) ...@@ -1556,6 +1557,12 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
sc->ps_idle = !!(conf->flags & IEEE80211_CONF_IDLE); sc->ps_idle = !!(conf->flags & IEEE80211_CONF_IDLE);
if (sc->ps_idle) if (sc->ps_idle)
ath_cancel_work(sc); ath_cancel_work(sc);
else
/*
* The chip needs a reset to properly wake up from
* full sleep
*/
reset_channel = ah->chip_fullsleep;
} }
/* /*
...@@ -1584,7 +1591,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) ...@@ -1584,7 +1591,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
} }
} }
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { if ((changed & IEEE80211_CONF_CHANGE_CHANNEL) || reset_channel) {
struct ieee80211_channel *curchan = hw->conf.channel; struct ieee80211_channel *curchan = hw->conf.channel;
int pos = curchan->hw_value; int pos = curchan->hw_value;
int old_pos = -1; int old_pos = -1;
......
...@@ -1820,6 +1820,7 @@ static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc, ...@@ -1820,6 +1820,7 @@ static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc,
struct ath_frame_info *fi = get_frame_info(skb); struct ath_frame_info *fi = get_frame_info(skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
struct ath_buf *bf; struct ath_buf *bf;
int fragno;
u16 seqno; u16 seqno;
bf = ath_tx_get_buffer(sc); bf = ath_tx_get_buffer(sc);
...@@ -1831,9 +1832,16 @@ static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc, ...@@ -1831,9 +1832,16 @@ static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc,
ATH_TXBUF_RESET(bf); ATH_TXBUF_RESET(bf);
if (tid) { if (tid) {
fragno = le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG;
seqno = tid->seq_next; seqno = tid->seq_next;
hdr->seq_ctrl = cpu_to_le16(tid->seq_next << IEEE80211_SEQ_SEQ_SHIFT); hdr->seq_ctrl = cpu_to_le16(tid->seq_next << IEEE80211_SEQ_SEQ_SHIFT);
INCR(tid->seq_next, IEEE80211_SEQ_MAX);
if (fragno)
hdr->seq_ctrl |= cpu_to_le16(fragno);
if (!ieee80211_has_morefrags(hdr->frame_control))
INCR(tid->seq_next, IEEE80211_SEQ_MAX);
bf->bf_state.seqno = seqno; bf->bf_state.seqno = seqno;
} }
......
...@@ -7614,6 +7614,7 @@ brcms_c_recvctl(struct brcms_c_info *wlc, struct d11rxhdr *rxh, ...@@ -7614,6 +7614,7 @@ brcms_c_recvctl(struct brcms_c_info *wlc, struct d11rxhdr *rxh,
{ {
int len_mpdu; int len_mpdu;
struct ieee80211_rx_status rx_status; struct ieee80211_rx_status rx_status;
struct ieee80211_hdr *hdr;
memset(&rx_status, 0, sizeof(rx_status)); memset(&rx_status, 0, sizeof(rx_status));
prep_mac80211_status(wlc, rxh, p, &rx_status); prep_mac80211_status(wlc, rxh, p, &rx_status);
...@@ -7623,6 +7624,13 @@ brcms_c_recvctl(struct brcms_c_info *wlc, struct d11rxhdr *rxh, ...@@ -7623,6 +7624,13 @@ brcms_c_recvctl(struct brcms_c_info *wlc, struct d11rxhdr *rxh,
skb_pull(p, D11_PHY_HDR_LEN); skb_pull(p, D11_PHY_HDR_LEN);
__skb_trim(p, len_mpdu); __skb_trim(p, len_mpdu);
/* unmute transmit */
if (wlc->hw->suspended_fifos) {
hdr = (struct ieee80211_hdr *)p->data;
if (ieee80211_is_beacon(hdr->frame_control))
brcms_b_mute(wlc->hw, false);
}
memcpy(IEEE80211_SKB_RXCB(p), &rx_status, sizeof(rx_status)); memcpy(IEEE80211_SKB_RXCB(p), &rx_status, sizeof(rx_status));
ieee80211_rx_irqsafe(wlc->pub->ieee_hw, p); ieee80211_rx_irqsafe(wlc->pub->ieee_hw, p);
} }
......
...@@ -103,7 +103,7 @@ static const u32 cipher_suites[] = { ...@@ -103,7 +103,7 @@ static const u32 cipher_suites[] = {
* Convert NL80211's auth_type to the one from Libertas, see chapter 5.9.1 * Convert NL80211's auth_type to the one from Libertas, see chapter 5.9.1
* in the firmware spec * in the firmware spec
*/ */
static u8 lbs_auth_to_authtype(enum nl80211_auth_type auth_type) static int lbs_auth_to_authtype(enum nl80211_auth_type auth_type)
{ {
int ret = -ENOTSUPP; int ret = -ENOTSUPP;
...@@ -1411,7 +1411,12 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -1411,7 +1411,12 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev,
goto done; goto done;
} }
lbs_set_authtype(priv, sme); ret = lbs_set_authtype(priv, sme);
if (ret == -ENOTSUPP) {
wiphy_err(wiphy, "unsupported authtype 0x%x\n", sme->auth_type);
goto done;
}
lbs_set_radio(priv, preamble, 1); lbs_set_radio(priv, preamble, 1);
/* Do the actual association */ /* Do the actual association */
......
...@@ -48,15 +48,15 @@ ...@@ -48,15 +48,15 @@
#define PCIE_HOST_INT_STATUS_MASK 0xC3C #define PCIE_HOST_INT_STATUS_MASK 0xC3C
#define PCIE_SCRATCH_2_REG 0xC40 #define PCIE_SCRATCH_2_REG 0xC40
#define PCIE_SCRATCH_3_REG 0xC44 #define PCIE_SCRATCH_3_REG 0xC44
#define PCIE_SCRATCH_4_REG 0xCC0 #define PCIE_SCRATCH_4_REG 0xCD0
#define PCIE_SCRATCH_5_REG 0xCC4 #define PCIE_SCRATCH_5_REG 0xCD4
#define PCIE_SCRATCH_6_REG 0xCC8 #define PCIE_SCRATCH_6_REG 0xCD8
#define PCIE_SCRATCH_7_REG 0xCCC #define PCIE_SCRATCH_7_REG 0xCDC
#define PCIE_SCRATCH_8_REG 0xCD0 #define PCIE_SCRATCH_8_REG 0xCE0
#define PCIE_SCRATCH_9_REG 0xCD4 #define PCIE_SCRATCH_9_REG 0xCE4
#define PCIE_SCRATCH_10_REG 0xCD8 #define PCIE_SCRATCH_10_REG 0xCE8
#define PCIE_SCRATCH_11_REG 0xCDC #define PCIE_SCRATCH_11_REG 0xCEC
#define PCIE_SCRATCH_12_REG 0xCE0 #define PCIE_SCRATCH_12_REG 0xCF0
#define CPU_INTR_DNLD_RDY BIT(0) #define CPU_INTR_DNLD_RDY BIT(0)
#define CPU_INTR_DOOR_BELL BIT(1) #define CPU_INTR_DOOR_BELL BIT(1)
......
...@@ -457,8 +457,8 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, ...@@ -457,8 +457,8 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
* fall back to HT20 if we don't use or use * fall back to HT20 if we don't use or use
* the other extension channel * the other extension channel
*/ */
if ((channel_type == NL80211_CHAN_HT40MINUS || if (!(channel_type == NL80211_CHAN_HT40MINUS ||
channel_type == NL80211_CHAN_HT40PLUS) && channel_type == NL80211_CHAN_HT40PLUS) ||
channel_type != sdata->u.ibss.channel_type) channel_type != sdata->u.ibss.channel_type)
sta_ht_cap_new.cap &= sta_ht_cap_new.cap &=
~IEEE80211_HT_CAP_SUP_WIDTH_20_40; ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
......
...@@ -103,7 +103,7 @@ static void ...@@ -103,7 +103,7 @@ static void
ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
struct sk_buff *skb, struct sk_buff *skb,
struct ieee80211_rate *rate, struct ieee80211_rate *rate,
int rtap_len) int rtap_len, bool has_fcs)
{ {
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
struct ieee80211_radiotap_header *rthdr; struct ieee80211_radiotap_header *rthdr;
...@@ -134,7 +134,7 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, ...@@ -134,7 +134,7 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
} }
/* IEEE80211_RADIOTAP_FLAGS */ /* IEEE80211_RADIOTAP_FLAGS */
if (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS) if (has_fcs && (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS))
*pos |= IEEE80211_RADIOTAP_F_FCS; *pos |= IEEE80211_RADIOTAP_F_FCS;
if (status->flag & (RX_FLAG_FAILED_FCS_CRC | RX_FLAG_FAILED_PLCP_CRC)) if (status->flag & (RX_FLAG_FAILED_FCS_CRC | RX_FLAG_FAILED_PLCP_CRC))
*pos |= IEEE80211_RADIOTAP_F_BADFCS; *pos |= IEEE80211_RADIOTAP_F_BADFCS;
...@@ -294,7 +294,8 @@ ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb, ...@@ -294,7 +294,8 @@ ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb,
} }
/* prepend radiotap information */ /* prepend radiotap information */
ieee80211_add_rx_radiotap_header(local, skb, rate, needed_headroom); ieee80211_add_rx_radiotap_header(local, skb, rate, needed_headroom,
true);
skb_reset_mac_header(skb); skb_reset_mac_header(skb);
skb->ip_summed = CHECKSUM_UNNECESSARY; skb->ip_summed = CHECKSUM_UNNECESSARY;
...@@ -2571,7 +2572,8 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx, ...@@ -2571,7 +2572,8 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx,
goto out_free_skb; goto out_free_skb;
/* prepend radiotap information */ /* prepend radiotap information */
ieee80211_add_rx_radiotap_header(local, skb, rate, needed_headroom); ieee80211_add_rx_radiotap_header(local, skb, rate, needed_headroom,
false);
skb_set_mac_header(skb, 0); skb_set_mac_header(skb, 0);
skb->ip_summed = CHECKSUM_UNNECESSARY; skb->ip_summed = CHECKSUM_UNNECESSARY;
......
...@@ -989,7 +989,7 @@ int cfg80211_can_change_interface(struct cfg80211_registered_device *rdev, ...@@ -989,7 +989,7 @@ int cfg80211_can_change_interface(struct cfg80211_registered_device *rdev,
if (rdev->wiphy.software_iftypes & BIT(iftype)) if (rdev->wiphy.software_iftypes & BIT(iftype))
continue; continue;
for (j = 0; j < c->n_limits; j++) { for (j = 0; j < c->n_limits; j++) {
if (!(limits[j].types & iftype)) if (!(limits[j].types & BIT(iftype)))
continue; continue;
if (limits[j].max < num[iftype]) if (limits[j].max < num[iftype])
goto cont; goto cont;
......
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