Skip to content

Commit

Permalink
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/linville/wireless into for-davem
  • Loading branch information
linvjw committed Oct 3, 2013
2 parents 569943d + f69727f commit 1eea72f
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 27 deletions.
9 changes: 6 additions & 3 deletions drivers/net/wireless/ath/ath9k/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1969,15 +1969,18 @@ static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq,
static void ath_tx_send_normal(struct ath_softc *sc, struct ath_txq *txq,
struct ath_atx_tid *tid, struct sk_buff *skb)
{
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
struct ath_frame_info *fi = get_frame_info(skb);
struct list_head bf_head;
struct ath_buf *bf;

bf = fi->bf;
struct ath_buf *bf = fi->bf;

INIT_LIST_HEAD(&bf_head);
list_add_tail(&bf->list, &bf_head);
bf->bf_state.bf_type = 0;
if (tid && (tx_info->flags & IEEE80211_TX_CTL_AMPDU)) {
bf->bf_state.bf_type = BUF_AMPDU;
ath_tx_addto_baw(sc, tid, bf);
}

bf->bf_next = NULL;
bf->bf_lastbf = bf;
Expand Down
6 changes: 4 additions & 2 deletions drivers/net/wireless/mwifiex/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,12 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
}
} while (true);

if ((adapter->int_status) || IS_CARD_RX_RCVD(adapter))
spin_lock_irqsave(&adapter->main_proc_lock, flags);
if ((adapter->int_status) || IS_CARD_RX_RCVD(adapter)) {
spin_unlock_irqrestore(&adapter->main_proc_lock, flags);
goto process_start;
}

spin_lock_irqsave(&adapter->main_proc_lock, flags);
adapter->mwifiex_processing = false;
spin_unlock_irqrestore(&adapter->main_proc_lock, flags);

Expand Down
9 changes: 1 addition & 8 deletions drivers/net/wireless/rt2x00/rt2x00pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,11 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct rt2x00_ops *ops)
goto exit_release_regions;
}

pci_enable_msi(pci_dev);

hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw);
if (!hw) {
rt2x00_probe_err("Failed to allocate hardware\n");
retval = -ENOMEM;
goto exit_disable_msi;
goto exit_release_regions;
}

pci_set_drvdata(pci_dev, hw);
Expand Down Expand Up @@ -152,9 +150,6 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct rt2x00_ops *ops)
exit_free_device:
ieee80211_free_hw(hw);

exit_disable_msi:
pci_disable_msi(pci_dev);

exit_release_regions:
pci_release_regions(pci_dev);

Expand All @@ -179,8 +174,6 @@ void rt2x00pci_remove(struct pci_dev *pci_dev)
rt2x00pci_free_reg(rt2x00dev);
ieee80211_free_hw(hw);

pci_disable_msi(pci_dev);

/*
* Free the PCI device data.
*/
Expand Down
3 changes: 3 additions & 0 deletions net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3056,6 +3056,9 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx,
case NL80211_IFTYPE_ADHOC:
if (!bssid)
return 0;
if (ether_addr_equal(sdata->vif.addr, hdr->addr2) ||
ether_addr_equal(sdata->u.ibss.bssid, hdr->addr2))
return 0;
if (ieee80211_is_beacon(hdr->frame_control)) {
return 1;
} else if (!ieee80211_bssid_match(bssid, sdata->u.ibss.bssid)) {
Expand Down
5 changes: 1 addition & 4 deletions net/mac80211/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -2103,7 +2103,7 @@ int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
{
struct ieee80211_local *local = sdata->local;
struct ieee80211_supported_band *sband;
int rate, skip, shift;
int rate, shift;
u8 i, exrates, *pos;
u32 basic_rates = sdata->vif.bss_conf.basic_rates;
u32 rate_flags;
Expand Down Expand Up @@ -2131,14 +2131,11 @@ int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
pos = skb_put(skb, exrates + 2);
*pos++ = WLAN_EID_EXT_SUPP_RATES;
*pos++ = exrates;
skip = 0;
for (i = 8; i < sband->n_bitrates; i++) {
u8 basic = 0;
if ((rate_flags & sband->bitrates[i].flags)
!= rate_flags)
continue;
if (skip++ < 8)
continue;
if (need_basic && basic_rates & BIT(i))
basic = 0x80;
rate = DIV_ROUND_UP(sband->bitrates[i].bitrate,
Expand Down
21 changes: 13 additions & 8 deletions net/wireless/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,18 +566,13 @@ int wiphy_register(struct wiphy *wiphy)
/* check and set up bitrates */
ieee80211_set_bitrate_flags(wiphy);


rtnl_lock();
res = device_add(&rdev->wiphy.dev);
if (res)
return res;

res = rfkill_register(rdev->rfkill);
if (res) {
device_del(&rdev->wiphy.dev);
rtnl_unlock();
return res;
}

rtnl_lock();
/* set up regulatory info */
wiphy_regulatory_register(wiphy);

Expand Down Expand Up @@ -606,6 +601,15 @@ int wiphy_register(struct wiphy *wiphy)

rdev->wiphy.registered = true;
rtnl_unlock();

res = rfkill_register(rdev->rfkill);
if (res) {
rfkill_destroy(rdev->rfkill);
rdev->rfkill = NULL;
wiphy_unregister(&rdev->wiphy);
return res;
}

return 0;
}
EXPORT_SYMBOL(wiphy_register);
Expand Down Expand Up @@ -640,7 +644,8 @@ void wiphy_unregister(struct wiphy *wiphy)
rtnl_unlock();
__count == 0; }));

rfkill_unregister(rdev->rfkill);
if (rdev->rfkill)
rfkill_unregister(rdev->rfkill);

rtnl_lock();
rdev->wiphy.registered = false;
Expand Down
3 changes: 3 additions & 0 deletions net/wireless/ibss.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev,
if (chan->flags & IEEE80211_CHAN_DISABLED)
continue;
wdev->wext.ibss.chandef.chan = chan;
wdev->wext.ibss.chandef.center_freq1 =
chan->center_freq;
break;
}

Expand Down Expand Up @@ -347,6 +349,7 @@ int cfg80211_ibss_wext_siwfreq(struct net_device *dev,
if (chan) {
wdev->wext.ibss.chandef.chan = chan;
wdev->wext.ibss.chandef.width = NL80211_CHAN_WIDTH_20_NOHT;
wdev->wext.ibss.chandef.center_freq1 = freq;
wdev->wext.ibss.channel_fixed = true;
} else {
/* cfg80211_ibss_wext_join will pick one if needed */
Expand Down
4 changes: 2 additions & 2 deletions net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -2421,7 +2421,7 @@ static int nl80211_set_interface(struct sk_buff *skb, struct genl_info *info)
change = true;
}

if (flags && (*flags & NL80211_MNTR_FLAG_ACTIVE) &&
if (flags && (*flags & MONITOR_FLAG_ACTIVE) &&
!(rdev->wiphy.features & NL80211_FEATURE_ACTIVE_MONITOR))
return -EOPNOTSUPP;

Expand Down Expand Up @@ -2483,7 +2483,7 @@ static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info)
info->attrs[NL80211_ATTR_MNTR_FLAGS] : NULL,
&flags);

if (!err && (flags & NL80211_MNTR_FLAG_ACTIVE) &&
if (!err && (flags & MONITOR_FLAG_ACTIVE) &&
!(rdev->wiphy.features & NL80211_FEATURE_ACTIVE_MONITOR))
return -EOPNOTSUPP;

Expand Down

0 comments on commit 1eea72f

Please sign in to comment.