mac80211: backport required changes to support 3.9-rc kernels
authorFlorian Fainelli <florian@openwrt.org>
Thu, 14 Mar 2013 14:45:36 +0000 (14:45 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Thu, 14 Mar 2013 14:45:36 +0000 (14:45 +0000)
SVN-Revision: 36007

17 files changed:
package/mac80211/patches/004-use_env_for_bash.patch
package/mac80211/patches/040-linux_3_9_compat.patch [new file with mode: 0644]
package/mac80211/patches/130-mesh_pathtbl_backport.patch
package/mac80211/patches/150-disable_addr_notifier.patch
package/mac80211/patches/300-pending_work.patch
package/mac80211/patches/402-ath9k-fix-invalid-mac-address-handling.patch
package/mac80211/patches/411-ath5k_allow_adhoc_and_ap.patch
package/mac80211/patches/431-add_platform_eeprom_support_to_ath5k.patch
package/mac80211/patches/440-ath5k_channel_bw_debugfs.patch
package/mac80211/patches/513-mac80211_reduce_txqueuelen.patch
package/mac80211/patches/522-ath9k_per_chain_signal_strength.patch
package/mac80211/patches/523-mac80211_configure_antenna_gain.patch
package/mac80211/patches/530-ath9k_extra_leds.patch
package/mac80211/patches/552-ath9k_rx_dma_stop_check.patch
package/mac80211/patches/603-rt2x00-introduce-rt2x00eeprom.patch
package/mac80211/patches/605-rt2x00-pci-eeprom.patch
package/mac80211/patches/850-brcmsmac-start-adding-support-for-core-rev-28.patch

index 889191d37ede3ca1c399261edf808578d361369f..0ae382055ade8d9faed5121c6dacae7105c68596 100644 (file)
@@ -1,6 +1,5 @@
-diff -Nur compat-wireless-2013-02-22.orig/compat/scripts/gen-compat-config.sh compat-wireless-2013-02-22/compat/scripts/gen-compat-config.sh
---- compat-wireless-2013-02-22.orig/compat/scripts/gen-compat-config.sh        2012-12-20 15:14:36.000000000 +0100
-+++ compat-wireless-2013-02-22/compat/scripts/gen-compat-config.sh     2013-03-07 17:27:04.000000000 +0100
+--- a/compat/scripts/gen-compat-config.sh
++++ b/compat/scripts/gen-compat-config.sh
 @@ -1,4 +1,4 @@
 -#!/bin/bash
 +#!/usr/bin/env bash
diff --git a/package/mac80211/patches/040-linux_3_9_compat.patch b/package/mac80211/patches/040-linux_3_9_compat.patch
new file mode 100644 (file)
index 0000000..d83c39c
--- /dev/null
@@ -0,0 +1,153 @@
+--- a/include/linux/compat-2.6.h
++++ b/include/linux/compat-2.6.h
+@@ -69,6 +69,7 @@ void compat_dependency_symbol(void);
+ #include <linux/compat-3.6.h>
+ #include <linux/compat-3.7.h>
+ #include <linux/compat-3.8.h>
++#include <linux/compat-3.9.h>
+ #endif /* __ASSEMBLY__ */
+--- /dev/null
++++ b/include/linux/compat-3.9.h
+@@ -0,0 +1,140 @@
++#ifndef LINUX_3_9_COMPAT_H
++#define LINUX_3_9_COMPAT_H
++
++#include <linux/version.h>
++
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0))
++
++#include <linux/idr.h>
++#include <linux/list.h>
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25))
++#include <linux/rculist.h>
++#endif
++#include <net/sock.h>
++#include <linux/tty.h>
++#include <linux/tty_flip.h>
++
++/* include this before changing hlist_for_each_* to use the old versions. */
++#include <net/sch_generic.h>
++
++
++/**
++ * backport of idr idr_alloc() usage
++ * 
++ * This backports a patch series send by Tejun Heo:
++ * https://lkml.org/lkml/2013/2/2/159
++ */
++static inline void compat_idr_destroy(struct idr *idp)
++{
++      idr_remove_all(idp);
++      idr_destroy(idp);
++}
++#define idr_destroy(idp) compat_idr_destroy(idp)
++
++static inline int idr_alloc(struct idr *idr, void *ptr, int start, int end,
++                          gfp_t gfp_mask)
++{
++      int id, ret;
++
++      do {
++              if (!idr_pre_get(idr, gfp_mask))
++                      return -ENOMEM;
++              ret = idr_get_new_above(idr, ptr, start, &id);
++              if (!ret && id > end) {
++                      idr_remove(idr, id);
++                      ret = -ENOSPC;
++              }
++      } while (ret == -EAGAIN);
++
++      return ret ? ret : id;
++}
++
++static inline void idr_preload(gfp_t gfp_mask)
++{
++}
++
++static inline void idr_preload_end(void)
++{
++}
++
++
++/**
++ * backport:
++ *
++ * commit 0bbacca7c3911451cea923b0ad6389d58e3d9ce9
++ * Author: Sasha Levin <sasha.levin@oracle.com>
++ * Date:   Thu Feb 7 12:32:18 2013 +1100
++ *
++ *     hlist: drop the node parameter from iterators
++ */
++
++#define hlist_entry_safe(ptr, type, member) \
++      (ptr) ? hlist_entry(ptr, type, member) : NULL
++
++#undef hlist_for_each_entry
++/**
++ * hlist_for_each_entry       - iterate over list of given type
++ * @pos:      the type * to use as a loop cursor.
++ * @head:     the head for your list.
++ * @member:   the name of the hlist_node within the struct.
++ */
++#define hlist_for_each_entry(pos, head, member)                                       \
++      for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);     \
++           pos;                                                               \
++           pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
++
++#undef hlist_for_each_entry_safe
++/**
++ * hlist_for_each_entry_safe - iterate over list of given type safe against removal of list entry
++ * @pos:      the type * to use as a loop cursor.
++ * @n:                another &struct hlist_node to use as temporary storage
++ * @head:     the head for your list.
++ * @member:   the name of the hlist_node within the struct.
++ */
++#define hlist_for_each_entry_safe(pos, n, head, member)                       \
++      for (pos = hlist_entry_safe((head)->first, typeof(*pos), member);       \
++           pos && ({ n = pos->member.next; 1; });                             \
++           pos = hlist_entry_safe(n, typeof(*pos), member))
++
++#undef hlist_for_each_entry_rcu
++/**
++ * hlist_for_each_entry_rcu - iterate over rcu list of given type
++ * @pos:      the type * to use as a loop cursor.
++ * @head:     the head for your list.
++ * @member:   the name of the hlist_node within the struct.
++ *
++ * This list-traversal primitive may safely run concurrently with
++ * the _rcu list-mutation primitives such as hlist_add_head_rcu()
++ * as long as the traversal is guarded by rcu_read_lock().
++ */
++#define hlist_for_each_entry_rcu(pos, head, member)                           \
++      for (pos = hlist_entry_safe (rcu_dereference_raw(hlist_first_rcu(head)),\
++                      typeof(*(pos)), member);                                \
++              pos;                                                            \
++              pos = hlist_entry_safe(rcu_dereference_raw(hlist_next_rcu(      \
++                      &(pos)->member)), typeof(*(pos)), member))
++
++#undef sk_for_each
++#define sk_for_each(__sk, list) \
++      hlist_for_each_entry(__sk, list, sk_node)
++
++#define tty_flip_buffer_push(port) tty_flip_buffer_push((port)->tty)
++#define tty_insert_flip_string(port, chars, size) tty_insert_flip_string((port)->tty, chars, size)
++
++/**
++ * backport of:
++ *
++ * commit 496ad9aa8ef448058e36ca7a787c61f2e63f0f54
++ * Author: Al Viro <viro@zeniv.linux.org.uk>
++ * Date:   Wed Jan 23 17:07:38 2013 -0500
++ *
++ *     new helper: file_inode(file)
++ */
++static inline struct inode *file_inode(struct file *f)
++{
++      return f->f_path.dentry->d_inode;
++}
++
++#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)) */
++
++#endif /* LINUX_3_9_COMPAT_H */
index ebeba8e902f7668ecabf3dbacea5e2ac6c8f061c..13220997f2f6534b2e8e05eadb46d30f07b75967 100644 (file)
 --- a/net/mac80211/mesh_pathtbl.c
 +++ b/net/mac80211/mesh_pathtbl.c
-@@ -818,7 +818,6 @@ static void table_flush_by_iface(struct 
-       struct hlist_node *p;
+@@ -72,9 +72,9 @@ static inline struct mesh_table *resize_
+  * it's used twice. So it is illegal to do
+  *    for_each_mesh_entry(rcu_dereference(...), ...)
+  */
+-#define for_each_mesh_entry(tbl, p, node, i) \
++#define for_each_mesh_entry(tbl, node, i) \
+       for (i = 0; i <= tbl->hash_mask; i++) \
+-              hlist_for_each_entry_rcu(node, p, &tbl->hash_buckets[i], list)
++              hlist_for_each_entry_rcu(node, &tbl->hash_buckets[i], list)
+ static struct mesh_table *mesh_table_alloc(int size_order)
+@@ -139,7 +139,7 @@ static void mesh_table_free(struct mesh_
+       }
+       if (free_leafs) {
+               spin_lock_bh(&tbl->gates_lock);
+-              hlist_for_each_entry_safe(gate, p, q,
++              hlist_for_each_entry_safe(gate, q,
+                                        tbl->known_gates, list) {
+                       hlist_del(&gate->list);
+                       kfree(gate);
+@@ -333,12 +333,11 @@ static struct mesh_path *mpath_lookup(st
+                                     struct ieee80211_sub_if_data *sdata)
+ {
+       struct mesh_path *mpath;
+-      struct hlist_node *n;
+       struct hlist_head *bucket;
+       struct mpath_node *node;
+       bucket = &tbl->hash_buckets[mesh_table_hash(dst, sdata, tbl)];
+-      hlist_for_each_entry_rcu(node, n, bucket, list) {
++      hlist_for_each_entry_rcu(node, bucket, list) {
+               mpath = node->mpath;
+               if (mpath->sdata == sdata &&
+                   ether_addr_equal(dst, mpath->dst)) {
+@@ -389,11 +388,10 @@ mesh_path_lookup_by_idx(struct ieee80211
+ {
+       struct mesh_table *tbl = rcu_dereference(mesh_paths);
+       struct mpath_node *node;
+-      struct hlist_node *p;
+       int i;
+       int j = 0;
+-      for_each_mesh_entry(tbl, p, node, i) {
++      for_each_mesh_entry(tbl, node, i) {
+               if (sdata && node->mpath->sdata != sdata)
+                       continue;
+               if (j++ == idx) {
+@@ -417,13 +415,12 @@ int mesh_path_add_gate(struct mesh_path
+ {
+       struct mesh_table *tbl;
+       struct mpath_node *gate, *new_gate;
+-      struct hlist_node *n;
+       int err;
+       rcu_read_lock();
+       tbl = rcu_dereference(mesh_paths);
+-      hlist_for_each_entry_rcu(gate, n, tbl->known_gates, list)
++      hlist_for_each_entry_rcu(gate, tbl->known_gates, list)
+               if (gate->mpath == mpath) {
+                       err = -EEXIST;
+                       goto err_rcu;
+@@ -460,9 +457,9 @@ err_rcu:
+ static void mesh_gate_del(struct mesh_table *tbl, struct mesh_path *mpath)
+ {
+       struct mpath_node *gate;
+-      struct hlist_node *p, *q;
++      struct hlist_node *q;
+-      hlist_for_each_entry_safe(gate, p, q, tbl->known_gates, list) {
++      hlist_for_each_entry_safe(gate, q, tbl->known_gates, list) {
+               if (gate->mpath != mpath)
+                       continue;
+               spin_lock_bh(&tbl->gates_lock);
+@@ -504,7 +501,6 @@ int mesh_path_add(struct ieee80211_sub_i
+       struct mesh_path *mpath, *new_mpath;
+       struct mpath_node *node, *new_node;
+       struct hlist_head *bucket;
+-      struct hlist_node *n;
+       int grow = 0;
+       int err = 0;
+       u32 hash_idx;
+@@ -550,7 +546,7 @@ int mesh_path_add(struct ieee80211_sub_i
+       spin_lock(&tbl->hashwlock[hash_idx]);
+       err = -EEXIST;
+-      hlist_for_each_entry(node, n, bucket, list) {
++      hlist_for_each_entry(node, bucket, list) {
+               mpath = node->mpath;
+               if (mpath->sdata == sdata &&
+                   ether_addr_equal(dst, mpath->dst))
+@@ -640,7 +636,6 @@ int mpp_path_add(struct ieee80211_sub_if
+       struct mesh_path *mpath, *new_mpath;
+       struct mpath_node *node, *new_node;
+       struct hlist_head *bucket;
+-      struct hlist_node *n;
+       int grow = 0;
+       int err = 0;
+       u32 hash_idx;
+@@ -680,7 +675,7 @@ int mpp_path_add(struct ieee80211_sub_if
+       spin_lock(&tbl->hashwlock[hash_idx]);
+       err = -EEXIST;
+-      hlist_for_each_entry(node, n, bucket, list) {
++      hlist_for_each_entry(node, bucket, list) {
+               mpath = node->mpath;
+               if (mpath->sdata == sdata &&
+                   ether_addr_equal(dst, mpath->dst))
+@@ -725,14 +720,13 @@ void mesh_plink_broken(struct sta_info *
+       static const u8 bcast[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+       struct mesh_path *mpath;
+       struct mpath_node *node;
+-      struct hlist_node *p;
+       struct ieee80211_sub_if_data *sdata = sta->sdata;
+       int i;
+       __le16 reason = cpu_to_le16(WLAN_REASON_MESH_PATH_DEST_UNREACHABLE);
+       rcu_read_lock();
+       tbl = rcu_dereference(mesh_paths);
+-      for_each_mesh_entry(tbl, p, node, i) {
++      for_each_mesh_entry(tbl, node, i) {
+               mpath = node->mpath;
+               if (rcu_dereference(mpath->next_hop) == sta &&
+                   mpath->flags & MESH_PATH_ACTIVE &&
+@@ -792,13 +786,12 @@ void mesh_path_flush_by_nexthop(struct s
+       struct mesh_table *tbl;
+       struct mesh_path *mpath;
+       struct mpath_node *node;
+-      struct hlist_node *p;
+       int i;
+       rcu_read_lock();
+       read_lock_bh(&pathtbl_resize_lock);
+       tbl = resize_dereference_mesh_paths();
+-      for_each_mesh_entry(tbl, p, node, i) {
++      for_each_mesh_entry(tbl, node, i) {
+               mpath = node->mpath;
+               if (rcu_dereference(mpath->next_hop) == sta) {
+                       spin_lock(&tbl->hashwlock[i]);
+@@ -815,11 +808,9 @@ static void table_flush_by_iface(struct
+ {
+       struct mesh_path *mpath;
+       struct mpath_node *node;
+-      struct hlist_node *p;
        int i;
  
 -      WARN_ON(!rcu_read_lock_held());
-       for_each_mesh_entry(tbl, p, node, i) {
+-      for_each_mesh_entry(tbl, p, node, i) {
++      for_each_mesh_entry(tbl, node, i) {
                mpath = node->mpath;
                if (mpath->sdata != sdata)
+                       continue;
+@@ -865,7 +856,6 @@ int mesh_path_del(struct ieee80211_sub_i
+       struct mesh_path *mpath;
+       struct mpath_node *node;
+       struct hlist_head *bucket;
+-      struct hlist_node *n;
+       int hash_idx;
+       int err = 0;
+@@ -875,7 +865,7 @@ int mesh_path_del(struct ieee80211_sub_i
+       bucket = &tbl->hash_buckets[hash_idx];
+       spin_lock(&tbl->hashwlock[hash_idx]);
+-      hlist_for_each_entry(node, n, bucket, list) {
++      hlist_for_each_entry(node, bucket, list) {
+               mpath = node->mpath;
+               if (mpath->sdata == sdata &&
+                   ether_addr_equal(addr, mpath->dst)) {
+@@ -920,7 +910,6 @@ void mesh_path_tx_pending(struct mesh_pa
+ int mesh_path_send_to_gates(struct mesh_path *mpath)
+ {
+       struct ieee80211_sub_if_data *sdata = mpath->sdata;
+-      struct hlist_node *n;
+       struct mesh_table *tbl;
+       struct mesh_path *from_mpath = mpath;
+       struct mpath_node *gate = NULL;
+@@ -935,7 +924,7 @@ int mesh_path_send_to_gates(struct mesh_
+       if (!known_gates)
+               return -EHOSTUNREACH;
+-      hlist_for_each_entry_rcu(gate, n, known_gates, list) {
++      hlist_for_each_entry_rcu(gate, known_gates, list) {
+               if (gate->mpath->sdata != sdata)
+                       continue;
+@@ -951,7 +940,7 @@ int mesh_path_send_to_gates(struct mesh_
+               }
+       }
+-      hlist_for_each_entry_rcu(gate, n, known_gates, list)
++      hlist_for_each_entry_rcu(gate, known_gates, list)
+               if (gate->mpath->sdata == sdata) {
+                       mpath_dbg(sdata, "Sending to %pM\n", gate->mpath->dst);
+                       mesh_path_tx_pending(gate->mpath);
+@@ -1096,12 +1085,11 @@ void mesh_path_expire(struct ieee80211_s
+       struct mesh_table *tbl;
+       struct mesh_path *mpath;
+       struct mpath_node *node;
+-      struct hlist_node *p;
+       int i;
+       rcu_read_lock();
+       tbl = rcu_dereference(mesh_paths);
+-      for_each_mesh_entry(tbl, p, node, i) {
++      for_each_mesh_entry(tbl, node, i) {
+               if (node->mpath->sdata != sdata)
+                       continue;
+               mpath = node->mpath;
index d568a97345c92328fb492d14c0d922ee2b502e29..9714696ecc9d6c57039ac787a2f66876a7a6e66f 100644 (file)
@@ -9,7 +9,7 @@
  static int ieee80211_ifa_changed(struct notifier_block *nb,
                                 unsigned long data, void *arg)
  {
-@@ -372,7 +372,7 @@ static int ieee80211_ifa_changed(struct 
+@@ -372,7 +372,7 @@ static int ieee80211_ifa_changed(struct
  }
  #endif
  
index b4bd187846469c6784869d516a4e0af79d546466..9154d55bc1dc149fbd39535b0525e52be5a955a7 100644 (file)
  static void ieee80211_iface_work(struct work_struct *work)
  {
        struct ieee80211_sub_if_data *sdata =
-@@ -1126,6 +1175,9 @@ static void ieee80211_iface_work(struct 
+@@ -1126,6 +1175,9 @@ static void ieee80211_iface_work(struct
                                break;
                        ieee80211_mesh_rx_queued_mgmt(sdata, skb);
                        break;
index 40c4cb755c2e895425e55de7675e6ab5438ea05c..3dbdba054ad88f318db9f33daacb2c6797d0de21 100644 (file)
@@ -8,7 +8,7 @@
  #include <asm/unaligned.h>
  
  #include "hw.h"
-@@ -519,8 +520,16 @@ static int ath9k_hw_init_macaddr(struct 
+@@ -519,8 +520,16 @@ static int ath9k_hw_init_macaddr(struct
                common->macaddr[2 * i] = eeval >> 8;
                common->macaddr[2 * i + 1] = eeval & 0xff;
        }
index 22d911370f65b8ba23994911bd88fdd3d7c6462a..3d885bb2fd83428a559b43c11fca03705141a892 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
 +++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
-@@ -89,13 +89,8 @@ ath5k_add_interface(struct ieee80211_hw 
+@@ -89,13 +89,8 @@ ath5k_add_interface(struct ieee80211_hw
                goto end;
        }
  
index 6cafa236a7cc15a25f6ed3bd492f46583a48579a..d4967b6b4bb9eaca35e05001f5082407e682b119 100644 (file)
@@ -17,7 +17,7 @@
   */
  static bool
  ath5k_pci_eeprom_read(struct ath_common *common, u32 offset, u16 *data)
-@@ -82,6 +83,19 @@ ath5k_pci_eeprom_read(struct ath_common 
+@@ -82,6 +83,19 @@ ath5k_pci_eeprom_read(struct ath_common
        struct ath5k_hw *ah = (struct ath5k_hw *) common->ah;
        u32 status, timeout;
  
index a2141ab24e0b4f8639e53ba2fc84c2a2f58afe09..f9c2a09deae6d3f19b33cf695e99af606bfa060e 100644 (file)
@@ -101,7 +101,7 @@ drivers/net/wireless/ath/ath5k/debug.c |   86 ++++++++++++++++++++++++++++++++
  
  /* debugfs: queues etc */
  
-@@ -904,6 +987,9 @@ ath5k_debug_init_device(struct ath5k_hw 
+@@ -904,6 +987,9 @@ ath5k_debug_init_device(struct ath5k_hw
        debugfs_create_file("beacon", S_IWUSR | S_IRUSR, phydir, ah,
                            &fops_beacon);
  
index 365172b559a085aae3b4f0fee35ede9bb2c8a5c4..fe44cdba246eab911ecca28279c8a4f1f628e68f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/net/mac80211/iface.c
 +++ b/net/mac80211/iface.c
-@@ -989,6 +989,7 @@ static const struct net_device_ops ieee8
+@@ -995,6 +995,7 @@ static const struct net_device_ops ieee8
  static void ieee80211_if_setup(struct net_device *dev)
  {
        ether_setup(dev);
index 6808cc4df70e9c571cfe6d4f894cf7d2ac91abcb..c0feedd187aa9de55a1dbb5d450837891d3aa710 100644 (file)
        switch (len - SPECTRAL_HT20_TOTAL_DATA_LEN) {
 --- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
 +++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
-@@ -475,12 +475,12 @@ int ath9k_hw_process_rxdesc_edma(struct 
+@@ -475,12 +475,12 @@ int ath9k_hw_process_rxdesc_edma(struct
  
        /* XXX: Keycache */
        rxs->rs_rssi = MS(rxsp->status5, AR_RxRSSICombined);
        if (ads.ds_rxstatus8 & AR_RxKeyIdxValid)
 --- a/drivers/net/wireless/ath/ath9k/debug.c
 +++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -940,12 +940,12 @@ void ath_debug_stat_rx(struct ath_softc 
+@@ -940,12 +940,12 @@ void ath_debug_stat_rx(struct ath_softc
  #ifdef CONFIG_ATH9K_MAC_DEBUG
        spin_lock(&sc->debug.samp_lock);
        RX_SAMP_DBG(jiffies) = jiffies;
        __NL80211_STA_INFO_AFTER_LAST,
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -3082,6 +3082,32 @@ static bool nl80211_put_sta_rate(struct 
+@@ -3082,6 +3082,32 @@ static bool nl80211_put_sta_rate(struct
        return true;
  }
  
         * hardware stores this as 8 bit signed value.
 --- a/drivers/net/wireless/ath/ath9k/antenna.c
 +++ b/drivers/net/wireless/ath/ath9k/antenna.c
-@@ -546,14 +546,14 @@ void ath_ant_comb_scan(struct ath_softc 
+@@ -546,14 +546,14 @@ void ath_ant_comb_scan(struct ath_softc
        struct ath_ant_comb *antcomb = &sc->ant_comb;
        int alt_ratio = 0, alt_rssi_avg = 0, main_rssi_avg = 0, curr_alt_set;
        int curr_main_set;
index 99bd2e3ba5552f36be4bf2c06e685e0eee93a798..8c13f324af266dd8046089878b630adf813cbbb0 100644 (file)
  };
  
  /* policy for the key attributes */
-@@ -1706,6 +1707,22 @@ static int nl80211_set_wiphy(struct sk_b
+@@ -1705,6 +1706,22 @@ static int nl80211_set_wiphy(struct sk_b
+               if (result)
                        goto bad_res;
        }
++
 +      if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_GAIN]) {
 +              int idx, dbi = 0;
 +
 +              if (result)
 +                      goto bad_res;
 +      }
-+
        if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_TX] &&
            info->attrs[NL80211_ATTR_WIPHY_ANTENNA_RX]) {
-               u32 tx_ant, rx_ant;
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
 @@ -2212,6 +2212,19 @@ static int ieee80211_get_tx_power(struct
@@ -92,7 +92,7 @@
  static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
                                  const u8 *addr)
  {
-@@ -3375,6 +3388,7 @@ struct cfg80211_ops mac80211_config_ops 
+@@ -3375,6 +3388,7 @@ struct cfg80211_ops mac80211_config_ops
        .set_wiphy_params = ieee80211_set_wiphy_params,
        .set_tx_power = ieee80211_set_tx_power,
        .get_tx_power = ieee80211_get_tx_power,
index 804785bc1753187e692785507c6980ef70ac5aa6..a13cb41bbb4d48c20d62512eeef5a02b519745b7 100644 (file)
  void ath_fill_led_pin(struct ath_softc *sc)
 --- a/drivers/net/wireless/ath/ath9k/init.c
 +++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -870,7 +870,7 @@ int ath9k_init_device(u16 devid, struct 
+@@ -870,7 +870,7 @@ int ath9k_init_device(u16 devid, struct
  
  #ifdef CONFIG_MAC80211_LEDS
        /* must be initialized before ieee80211_register_hw */
index 606eb1c63d7547e2217a7bb7208597d3efef004d..1da720733f393712f32eee76462fe63634347dd4 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/mac.c
 +++ b/drivers/net/wireless/ath/ath9k/mac.c
-@@ -689,7 +689,7 @@ bool ath9k_hw_stopdmarecv(struct ath_hw 
+@@ -689,7 +689,7 @@ bool ath9k_hw_stopdmarecv(struct ath_hw
  {
  #define AH_RX_STOP_DMA_TIMEOUT 10000   /* usec */
        struct ath_common *common = ath9k_hw_common(ah);
@@ -9,7 +9,7 @@
        int i;
  
        /* Enable access to the DMA observation bus */
-@@ -719,6 +719,16 @@ bool ath9k_hw_stopdmarecv(struct ath_hw 
+@@ -719,6 +719,16 @@ bool ath9k_hw_stopdmarecv(struct ath_hw
        }
  
        if (i == 0) {
index 07e72e39f4af63accf573af63d6ac90ab3148e81..6b1f030bce502f0a1beb8adefc873214b6cfe971 100644 (file)
  obj-$(CONFIG_RT2X00_LIB_PCI)          += rt2x00pci.o
 --- a/drivers/net/wireless/rt2x00/rt2800pci.c
 +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
-@@ -89,25 +89,11 @@ static void rt2800pci_mcu_status(struct 
+@@ -89,25 +89,11 @@ static void rt2800pci_mcu_status(struct
        rt2x00pci_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0);
  }
  
index 33eb28f5f632a71daacaf869c55a9ea030409061..25b21cecead46919f3a0478e783b9114bda07101 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/rt2x00/rt2800pci.c
 +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
-@@ -89,7 +89,7 @@ static void rt2800pci_mcu_status(struct 
+@@ -89,7 +89,7 @@ static void rt2800pci_mcu_status(struct
        rt2x00pci_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0);
  }
  
@@ -9,7 +9,7 @@
  {
        memcpy(rt2x00dev->eeprom, rt2x00dev->eeprom_file->data, EEPROM_SIZE);
        return 0;
-@@ -983,8 +983,9 @@ static int rt2800pci_read_eeprom(struct 
+@@ -983,8 +983,9 @@ static int rt2800pci_read_eeprom(struct
  {
        int retval;
  
index a84107df7d8c27f11a2351ad0aac932bda93a36d..41c447684446249863936c0811cffd0ac44e8aef 100644 (file)
@@ -10,7 +10,7 @@
  MODULE_DEVICE_TABLE(bcma, brcms_coreid_table);
 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
 +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
-@@ -717,7 +717,7 @@ static void brcms_c_ucode_bsinit(struct 
+@@ -717,7 +717,7 @@ static void brcms_c_ucode_bsinit(struct
        brcms_c_write_mhf(wlc_hw, wlc_hw->band->mhfs);
  
        /* do band-specific ucode IHR, SHM, and SCR inits */
@@ -19,7 +19,7 @@
                if (BRCMS_ISNPHY(wlc_hw->band))
                        brcms_c_write_inits(wlc_hw, ucode->d11n0bsinitvals16);
                else
-@@ -2257,7 +2257,7 @@ static void brcms_ucode_download(struct 
+@@ -2257,7 +2257,7 @@ static void brcms_ucode_download(struct
        if (wlc_hw->ucode_loaded)
                return;