diff options
author | Florian Fainelli <florian@openwrt.org> | 2013-03-14 14:45:36 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2013-03-14 14:45:36 +0000 |
commit | 32f3b1e3582701ef6c8c248b9ad0a761c42bbc1b (patch) | |
tree | 29daa861c90db054d0e80c1a56cb3b82fa5a6f99 /package | |
parent | 2070c91672046df93fbf35c777e0f13a1f73036b (diff) | |
download | mtk-20170518-32f3b1e3582701ef6c8c248b9ad0a761c42bbc1b.zip mtk-20170518-32f3b1e3582701ef6c8c248b9ad0a761c42bbc1b.tar.gz mtk-20170518-32f3b1e3582701ef6c8c248b9ad0a761c42bbc1b.tar.bz2 |
mac80211: backport required changes to support 3.9-rc kernels
SVN-Revision: 36007
Diffstat (limited to 'package')
17 files changed, 384 insertions, 30 deletions
diff --git a/package/mac80211/patches/004-use_env_for_bash.patch b/package/mac80211/patches/004-use_env_for_bash.patch index 889191d..0ae3820 100644 --- a/package/mac80211/patches/004-use_env_for_bash.patch +++ b/package/mac80211/patches/004-use_env_for_bash.patch @@ -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 index 0000000..d83c39c --- /dev/null +++ b/package/mac80211/patches/040-linux_3_9_compat.patch @@ -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 */ diff --git a/package/mac80211/patches/130-mesh_pathtbl_backport.patch b/package/mac80211/patches/130-mesh_pathtbl_backport.patch index ebeba8e..1322099 100644 --- a/package/mac80211/patches/130-mesh_pathtbl_backport.patch +++ b/package/mac80211/patches/130-mesh_pathtbl_backport.patch @@ -1,10 +1,212 @@ --- 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; diff --git a/package/mac80211/patches/150-disable_addr_notifier.patch b/package/mac80211/patches/150-disable_addr_notifier.patch index d568a97..9714696 100644 --- a/package/mac80211/patches/150-disable_addr_notifier.patch +++ b/package/mac80211/patches/150-disable_addr_notifier.patch @@ -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 diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch index b4bd187..9154d55 100644 --- a/package/mac80211/patches/300-pending_work.patch +++ b/package/mac80211/patches/300-pending_work.patch @@ -300,7 +300,7 @@ 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; diff --git a/package/mac80211/patches/402-ath9k-fix-invalid-mac-address-handling.patch b/package/mac80211/patches/402-ath9k-fix-invalid-mac-address-handling.patch index 40c4cb7..3dbdba0 100644 --- a/package/mac80211/patches/402-ath9k-fix-invalid-mac-address-handling.patch +++ b/package/mac80211/patches/402-ath9k-fix-invalid-mac-address-handling.patch @@ -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; } diff --git a/package/mac80211/patches/411-ath5k_allow_adhoc_and_ap.patch b/package/mac80211/patches/411-ath5k_allow_adhoc_and_ap.patch index 22d9113..3d885bb 100644 --- a/package/mac80211/patches/411-ath5k_allow_adhoc_and_ap.patch +++ b/package/mac80211/patches/411-ath5k_allow_adhoc_and_ap.patch @@ -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; } diff --git a/package/mac80211/patches/431-add_platform_eeprom_support_to_ath5k.patch b/package/mac80211/patches/431-add_platform_eeprom_support_to_ath5k.patch index 6cafa23..d4967b6 100644 --- a/package/mac80211/patches/431-add_platform_eeprom_support_to_ath5k.patch +++ b/package/mac80211/patches/431-add_platform_eeprom_support_to_ath5k.patch @@ -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; diff --git a/package/mac80211/patches/440-ath5k_channel_bw_debugfs.patch b/package/mac80211/patches/440-ath5k_channel_bw_debugfs.patch index a2141ab..f9c2a09 100644 --- a/package/mac80211/patches/440-ath5k_channel_bw_debugfs.patch +++ b/package/mac80211/patches/440-ath5k_channel_bw_debugfs.patch @@ -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); diff --git a/package/mac80211/patches/513-mac80211_reduce_txqueuelen.patch b/package/mac80211/patches/513-mac80211_reduce_txqueuelen.patch index 365172b..fe44cdb 100644 --- a/package/mac80211/patches/513-mac80211_reduce_txqueuelen.patch +++ b/package/mac80211/patches/513-mac80211_reduce_txqueuelen.patch @@ -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); diff --git a/package/mac80211/patches/522-ath9k_per_chain_signal_strength.patch b/package/mac80211/patches/522-ath9k_per_chain_signal_strength.patch index 6808cc4..c0feedd 100644 --- a/package/mac80211/patches/522-ath9k_per_chain_signal_strength.patch +++ b/package/mac80211/patches/522-ath9k_per_chain_signal_strength.patch @@ -175,7 +175,7 @@ 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); @@ -236,7 +236,7 @@ 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; @@ -277,7 +277,7 @@ __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; } @@ -372,7 +372,7 @@ * 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; diff --git a/package/mac80211/patches/523-mac80211_configure_antenna_gain.patch b/package/mac80211/patches/523-mac80211_configure_antenna_gain.patch index 99bd2e3..8c13f32 100644 --- a/package/mac80211/patches/523-mac80211_configure_antenna_gain.patch +++ b/package/mac80211/patches/523-mac80211_configure_antenna_gain.patch @@ -47,10 +47,11 @@ }; /* 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; + @@ -66,10 +67,9 @@ + 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, diff --git a/package/mac80211/patches/530-ath9k_extra_leds.patch b/package/mac80211/patches/530-ath9k_extra_leds.patch index 804785b..a13cb41 100644 --- a/package/mac80211/patches/530-ath9k_extra_leds.patch +++ b/package/mac80211/patches/530-ath9k_extra_leds.patch @@ -162,7 +162,7 @@ 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 */ diff --git a/package/mac80211/patches/552-ath9k_rx_dma_stop_check.patch b/package/mac80211/patches/552-ath9k_rx_dma_stop_check.patch index 606eb1c..1da7207 100644 --- a/package/mac80211/patches/552-ath9k_rx_dma_stop_check.patch +++ b/package/mac80211/patches/552-ath9k_rx_dma_stop_check.patch @@ -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) { diff --git a/package/mac80211/patches/603-rt2x00-introduce-rt2x00eeprom.patch b/package/mac80211/patches/603-rt2x00-introduce-rt2x00eeprom.patch index 07e72e3..6b1f030 100644 --- a/package/mac80211/patches/603-rt2x00-introduce-rt2x00eeprom.patch +++ b/package/mac80211/patches/603-rt2x00-introduce-rt2x00eeprom.patch @@ -186,7 +186,7 @@ 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); } diff --git a/package/mac80211/patches/605-rt2x00-pci-eeprom.patch b/package/mac80211/patches/605-rt2x00-pci-eeprom.patch index 33eb28f..25b21ce 100644 --- a/package/mac80211/patches/605-rt2x00-pci-eeprom.patch +++ b/package/mac80211/patches/605-rt2x00-pci-eeprom.patch @@ -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; diff --git a/package/mac80211/patches/850-brcmsmac-start-adding-support-for-core-rev-28.patch b/package/mac80211/patches/850-brcmsmac-start-adding-support-for-core-rev-28.patch index a84107d..41c4476 100644 --- a/package/mac80211/patches/850-brcmsmac-start-adding-support-for-core-rev-28.patch +++ b/package/mac80211/patches/850-brcmsmac-start-adding-support-for-core-rev-28.patch @@ -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; |