aboutsummaryrefslogtreecommitdiffstats
path: root/package/acx-mac80211/patches/004-wireless-compat.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/acx-mac80211/patches/004-wireless-compat.patch')
-rw-r--r--package/acx-mac80211/patches/004-wireless-compat.patch221
1 files changed, 221 insertions, 0 deletions
diff --git a/package/acx-mac80211/patches/004-wireless-compat.patch b/package/acx-mac80211/patches/004-wireless-compat.patch
new file mode 100644
index 0000000000..33ecc4cf93
--- /dev/null
+++ b/package/acx-mac80211/patches/004-wireless-compat.patch
@@ -0,0 +1,221 @@
+Index: acx-mac80211-20100422/acx_func.h
+===================================================================
+--- acx-mac80211-20100422.orig/acx_func.h 2010-05-02 03:07:09.000000000 +0200
++++ acx-mac80211-20100422/acx_func.h 2010-05-02 22:03:28.309677381 +0200
+@@ -214,10 +214,6 @@
+ printk(args); \
+ } while (0)
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
+-#define printk_ratelimited(args...) printk(args)
+-#endif
+-
+ // Log with prefix "acx: __func__
+ #define logf0(chan, msg) \
+ log(chan, "acx: %s: " msg, __func__);
+@@ -341,17 +337,10 @@
+ // BOM Mac80211 Ops (Common)
+ // -----
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
+-int acx_e_op_add_interface(struct ieee80211_hw* ieee,
+- struct ieee80211_if_init_conf *conf);
+-void acx_e_op_remove_interface(struct ieee80211_hw* ieee,
+- struct ieee80211_if_init_conf *conf);
+-#else
+ int acx_e_op_add_interface(struct ieee80211_hw* ieee,
+ struct ieee80211_vif *vif);
+ void acx_e_op_remove_interface(struct ieee80211_hw* ieee,
+ struct ieee80211_vif *vif);
+-#endif
+
+ int acx_e_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
+ struct ieee80211_vif *vif, struct ieee80211_sta *sta,
+@@ -366,10 +355,6 @@
+ const struct ieee80211_tx_queue_params *params);
+ int acx_e_op_get_stats(struct ieee80211_hw *hw, struct ieee80211_low_level_stats *stats);
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
+-int acx_e_op_get_tx_stats(struct ieee80211_hw* ieee, struct ieee80211_tx_queue_stats *stats);
+-#endif
+-
+ // BOM Helpers (Common)
+ // -----
+ void acx_s_mwait(int ms);
+Index: acx-mac80211-20100422/common.c
+===================================================================
+--- acx-mac80211-20100422.orig/common.c 2010-05-02 03:07:09.000000000 +0200
++++ acx-mac80211-20100422/common.c 2010-05-02 22:04:49.597801719 +0200
+@@ -4900,13 +4900,8 @@
+ * ==================================================
+ */
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
+-int acx_e_op_add_interface(struct ieee80211_hw *ieee,
+- struct ieee80211_if_init_conf *conf)
+-#else
+ int acx_e_op_add_interface(struct ieee80211_hw *ieee,
+ struct ieee80211_vif *vif)
+-#endif
+ {
+ acx_device_t *adev = ieee2adev(ieee);
+ unsigned long flags;
+@@ -4918,23 +4913,14 @@
+ acx_sem_lock(adev);
+ acx_lock(adev, flags);
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
+- if (conf->type == NL80211_IFTYPE_MONITOR) {
+-#else
+ if (vif->type == NL80211_IFTYPE_MONITOR) {
+-#endif
+ adev->interface.monitor++;
+ } else {
+ if (adev->interface.operating)
+ goto out_unlock;
+ adev->interface.operating = 1;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
+- adev->interface.mac_addr = conf->mac_addr;
+- adev->interface.type = conf->type;
+-#else
+ adev->interface.mac_addr = vif->addr;
+ adev->interface.type = vif->type;
+-#endif
+ }
+ // adev->mode = conf->type;
+
+@@ -4949,13 +4935,8 @@
+
+ printk(KERN_INFO "acx: Virtual interface added "
+ "(type: 0x%08X, MAC: %s)\n",
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
+- conf->type,
+- acx_print_mac(mac, conf->mac_addr)
+-#else
+ vif->type,
+ acx_print_mac(mac, vif->addr)
+-#endif
+ );
+
+ out_unlock:
+@@ -4966,13 +4947,8 @@
+ return err;
+ }
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
+-void acx_e_op_remove_interface(struct ieee80211_hw *hw,
+- struct ieee80211_if_init_conf *conf)
+-#else
+ void acx_e_op_remove_interface(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif)
+-#endif
+ {
+ acx_device_t *adev = ieee2adev(hw);
+
+@@ -4981,37 +4957,23 @@
+ FN_ENTER;
+ acx_sem_lock(adev);
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
+- if (conf->type == NL80211_IFTYPE_MONITOR) {
+-#else
+ if (vif->type == NL80211_IFTYPE_MONITOR) {
+-#endif
+ adev->interface.monitor--;
+ // assert(bcm->interface.monitor >= 0);
+ } else {
+ adev->interface.operating = 0;
+ }
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
+- log(L_DEBUG, "acx: %s: interface.operating=%d, conf->type=%d\n",
+- __func__,
+- adev->interface.operating, conf->type);
+-#else
+ log(L_DEBUG, "acx: %s: interface.operating=%d, vif->type=%d\n",
+ __func__,
+ adev->interface.operating, vif->type);
+-#endif
+
+ if (adev->initialized)
+ acx_s_select_opmode(adev);
+
+ log(L_ANY, "acx: Virtual interface removed: "
+ "type=%d, MAC=%s\n",
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
+- conf->type, acx_print_mac(mac, conf->mac_addr)
+-#else
+ vif->type, acx_print_mac(mac, vif->addr)
+-#endif
+ );
+
+ acx_sem_unlock(adev);
+@@ -5351,26 +5313,6 @@
+ return 0;
+ }
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
+-int acx_e_op_get_tx_stats(struct ieee80211_hw *hw,
+- struct ieee80211_tx_queue_stats *stats)
+-{
+- acx_device_t *adev = ieee2adev(hw);
+- int err = -ENODEV;
+-
+- FN_ENTER;
+- acx_sem_lock(adev);
+-
+- stats->len = 0;
+- stats->limit = TX_CNT;
+- stats->count = 0;
+-
+- acx_sem_unlock(adev);
+- FN_EXIT0;
+- return err;
+-}
+-#endif
+-
+ /*
+ * BOM Helpers
+ * ==================================================
+Index: acx-mac80211-20100422/mem.c
+===================================================================
+--- acx-mac80211-20100422.orig/mem.c 2010-05-02 03:07:09.000000000 +0200
++++ acx-mac80211-20100422/mem.c 2010-05-02 22:05:26.007552341 +0200
+@@ -4654,9 +4654,6 @@
+ .bss_info_changed = acx_e_op_bss_info_changed,
+ .set_key = acx_e_op_set_key,
+ .get_stats = acx_e_op_get_stats,
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
+- .get_tx_stats = acx_e_op_get_tx_stats,
+-#endif
+ };
+
+ /*
+Index: acx-mac80211-20100422/pci.c
+===================================================================
+--- acx-mac80211-20100422.orig/pci.c 2010-05-02 03:07:09.000000000 +0200
++++ acx-mac80211-20100422/pci.c 2010-05-02 22:06:03.758564021 +0200
+@@ -3149,9 +3149,6 @@
+ .bss_info_changed = acx_e_op_bss_info_changed,
+ .set_key = acx_e_op_set_key,
+ .get_stats = acx_e_op_get_stats,
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
+- .get_tx_stats = acx_e_op_get_tx_stats,
+-#endif
+ };
+
+
+Index: acx-mac80211-20100422/usb.c
+===================================================================
+--- acx-mac80211-20100422.orig/usb.c 2010-05-02 03:07:09.000000000 +0200
++++ acx-mac80211-20100422/usb.c 2010-05-02 22:06:22.874733862 +0200
+@@ -1444,9 +1444,6 @@
+ .bss_info_changed = acx_e_op_bss_info_changed,
+ .set_key = acx_e_op_set_key,
+ .get_stats = acx_e_op_get_stats,
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
+- .get_tx_stats = acx_e_op_get_tx_stats,
+-#endif
+ };
+
+ /*