AA: acx-mac80211: make it compile with recent mac80211 again
authorHauke Mehrtens <hauke@hauke-m.de>
Fri, 12 Jul 2013 13:10:43 +0000 (13:10 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Fri, 12 Jul 2013 13:10:43 +0000 (13:10 +0000)
backport of r35332, r36481 and r36976

SVN-Revision: 37267

package/acx-mac80211/Makefile
package/acx-mac80211/patches/001-make-compatible-with-recent-mac80211.patch
package/acx-mac80211/patches/003-add-changes-for-3-10.patch [new file with mode: 0644]
package/acx-mac80211/patches/100-hw-queue-check-fix.patch
package/acx-mac80211/patches/200-initial-macaddr.patch

index 80e5282..3e4984d 100644 (file)
@@ -18,8 +18,13 @@ PKG_SOURCE_URL:=git://acx100.git.sourceforge.net/gitroot/acx100/acx-mac80211
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_MIRROR_MD5SUM:=8d6bc84239059fd938ff4d989579f622
 PKG_BUILD_DEPENDS:=mac80211
 
+PKG_CONFIG_DEPENDS:= \
+       CONFIG_PACKAGE_MAC80211_DEBUGFS \
+       CONFIG_PACKAGE_MAC80211_MESH \
+
 include $(INCLUDE_DIR)/package.mk
 
 define KernelPackage/acx-mac80211
@@ -172,8 +177,12 @@ PKG_EXTRA_KCONFIG:= \
 PKG_EXTRA_CFLAGS:= \
        $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(PKG_EXTRA_KCONFIG)))) \
        $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(PKG_EXTRA_KCONFIG)))) \
-
-LINUX_AUTOCONF_FILE:= generated/autoconf.h
+       $(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS) \
+       $(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS), -DCONFIG_CFG80211_DEBUGFS -DCONFIG_MAC80211_DEBUGFS) \
+       $(if $(CONFIG_PACKAGE_MAC80211_MESH), -DCONFIG_MAC80211_MESH) \
+       -DBACKPORTED_KERNEL_NAME=\\\"$(PKG_SOURCE)\\\" \
+       -DBACKPORTED_KERNEL_VERSION=\\\"$(PKG_SOURCE_VERSION)\\\" \
+       -DBACKPORTS_VERSION=\\\"unknown\\\" \
 
 define Build/Compile
        $(MAKE) -C "$(LINUX_DIR)" \
@@ -181,11 +190,14 @@ define Build/Compile
                CROSS_COMPILE="$(TARGET_CROSS)" \
                SUBDIRS="$(PKG_BUILD_DIR)" \
                $(PKG_EXTRA_KCONFIG) \
-               EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS) -DCONFIG_ACX_MAC80211_VERSION=\"KERNEL_VERSION(3,7,0)\"" \
-               LINUXINCLUDE="-I$(STAGING_DIR)/usr/include/mac80211 -I$(LINUX_DIR)/include \
-                       -Iarch/$(LINUX_KARCH)/include \
-                       -include $(LINUX_AUTOCONF_FILE) \
-                       -include linux/compat-2.6.h" \
+               EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS) -DCONFIG_ACX_MAC80211_VERSION=\"KERNEL_VERSION(3,10,0)\"" \
+               LINUXINCLUDE="-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi -I$(STAGING_DIR)/usr/include/mac80211-backport \
+                       -I$(STAGING_DIR)/usr/include/mac80211/uapi -I$(STAGING_DIR)/usr/include/mac80211 \
+                       -I$(LINUX_DIR)/include -I$(LINUX_DIR)/include/$(LINUX_UAPI_DIR) \
+                       -I$(LINUX_DIR)/include/generated/uapi/ -Iarch/$(LINUX_KARCH)/include \
+                       -Iarch/$(LINUX_KARCH)/include/$(LINUX_UAPI_DIR) \
+                       -include generated/autoconf.h \
+                       -include backport/backport.h " \
                V="$(V)" \
                modules
 endef
index 3b1afee..707ba8b 100644 (file)
@@ -1,6 +1,6 @@
 --- a/main.h
 +++ b/main.h
-@@ -44,8 +44,11 @@ void acx_process_rxbuf(acx_device_t *ade
+@@ -44,8 +44,11 @@ int acx_e_op_get_tx_stats(struct ieee802
  
  #if CONFIG_ACX_MAC80211_VERSION < KERNEL_VERSION(2, 6, 39)
  int acx_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
@@ -15,7 +15,7 @@
  
 --- a/main.c
 +++ b/main.c
-@@ -1024,7 +1024,12 @@ out:
+@@ -1024,7 +1024,12 @@ int acx_e_op_get_tx_stats(struct ieee802
   * acx_compat, and hiding this #if/else.  OTOH, inclusion doesnt care
   * about old kernels
   */
diff --git a/package/acx-mac80211/patches/003-add-changes-for-3-10.patch b/package/acx-mac80211/patches/003-add-changes-for-3-10.patch
new file mode 100644 (file)
index 0000000..18d4f9e
--- /dev/null
@@ -0,0 +1,27 @@
+--- a/main.c
++++ b/main.c
+@@ -681,6 +681,7 @@ int acx_op_config(struct ieee80211_hw *h
+       if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
+               changed_not_done &= ~IEEE80211_CONF_CHANGE_CHANNEL;
++#if CONFIG_ACX_MAC80211_VERSION < KERNEL_VERSION(3, 10, 0)
+               logf1(L_DEBUG, "IEEE80211_CONF_CHANGE_CHANNEL, "
+                       "channel->hw_value=%i\n", conf->channel->hw_value);
+@@ -689,6 +690,16 @@ int acx_op_config(struct ieee80211_hw *h
+               acx_selectchannel(adev, conf->channel->hw_value,
+                               conf->channel->center_freq);
++#else
++              logf1(L_DEBUG, "IEEE80211_CONF_CHANGE_CHANNEL, "
++                      "channel->hw_value=%i\n", conf->chandef.chan->hw_value);
++
++              if (conf->chandef.chan->hw_value == adev->channel)
++                      goto change_channel_done;
++
++              acx_selectchannel(adev, conf->chandef.chan->hw_value,
++                              conf->chandef.chan->center_freq);
++#endif
+       }
+ change_channel_done:
+       if (changed_not_done)
index 62f2998..3e7739a 100644 (file)
@@ -1,6 +1,6 @@
 --- a/mem.c
 +++ b/mem.c
-@@ -2026,7 +2026,7 @@ static int __devinit acxmem_probe(struct
+@@ -2036,7 +2036,7 @@ static int __devinit acxmem_probe(struct
         */
        ieee->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION)
                                        | BIT(NL80211_IFTYPE_ADHOC);
@@ -11,7 +11,7 @@
        /* TODO: although in the original driver the maximum value was
 --- a/pci.c
 +++ b/pci.c
-@@ -1010,7 +1010,7 @@ static int __devinit acxpci_probe(struct
+@@ -1022,7 +1022,7 @@ static int __devinit acxpci_probe(struct
                        BIT(NL80211_IFTYPE_STATION) |
                        BIT(NL80211_IFTYPE_ADHOC) |
                        BIT(NL80211_IFTYPE_AP);
@@ -20,7 +20,7 @@
        /* OW TODO Check if RTS/CTS threshold can be included here */
  
        /* TODO: although in the original driver the maximum value was
-@@ -1682,7 +1682,7 @@ static __devinit int vlynq_probe(struct
+@@ -1691,7 +1691,7 @@ static __devinit int vlynq_probe(struct
                        BIT(NL80211_IFTYPE_STATION)     |
                        BIT(NL80211_IFTYPE_ADHOC) |
                        BIT(NL80211_IFTYPE_AP);
@@ -31,7 +31,7 @@
         * TODO OW 20100615 This should into a common init code
 --- a/usb.c
 +++ b/usb.c
-@@ -1627,7 +1627,7 @@ acxusb_probe(struct usb_interface *intf,
+@@ -1624,7 +1624,7 @@ acxusb_probe(struct usb_interface *intf,
         */
        ieee->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION)
                        | BIT(NL80211_IFTYPE_ADHOC);
index 498c72d..cc82fec 100644 (file)
@@ -1,6 +1,6 @@
---- a/cardsetting.c    2012-07-03 16:21:25.934102662 -0700
-+++ b/cardsetting.c    2012-07-03 16:49:26.910438174 -0700
-@@ -710,12 +710,27 @@
+--- a/cardsetting.c
++++ b/cardsetting.c
+@@ -710,12 +710,27 @@ static int acx1xx_get_station_id(acx_dev
        u8 stationID[4 + acx_ie_descs[ACX1xx_IE_DOT11_STATION_ID].len];
        const u8 *paddr;
        int i, res;