[package] make acx-mac80211 compile against latest compat-wireless, still does not...
authorFlorian Fainelli <florian@openwrt.org>
Thu, 7 May 2009 15:07:20 +0000 (15:07 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Thu, 7 May 2009 15:07:20 +0000 (15:07 +0000)
SVN-Revision: 15690

package/acx-mac80211/patches/003-if_types.patch [new file with mode: 0644]
package/acx-mac80211/patches/004-acx_config_interface_type.patch [new file with mode: 0644]
package/acx-mac80211/patches/005-pci_fixes.patch [new file with mode: 0644]

diff --git a/package/acx-mac80211/patches/003-if_types.patch b/package/acx-mac80211/patches/003-if_types.patch
new file mode 100644 (file)
index 0000000..4e52963
--- /dev/null
@@ -0,0 +1,93 @@
+diff -urN acx-mac80211-20080805/acx_mac80211.h acx-mac80211-20080805.new/acx_mac80211.h
+--- acx-mac80211-20080805/acx_mac80211.h       2009-05-07 14:32:44.000000000 +0200
++++ acx-mac80211-20080805.new/acx_mac80211.h   2009-05-07 15:59:45.000000000 +0200
+@@ -36,7 +36,7 @@
+         /* Current BSSID (if any). */       
+         u8 *bssid;
+-        /* Interface type. (IEEE80211_IF_TYPE_XXX) */
++        /* Interface type. (NL80211_IFTYPE_XXX) */
+         int type; 
+         /* Counter of active monitor interfaces. */
+         int monitor;
+diff -urN acx-mac80211-20080805/common.c acx-mac80211-20080805.new/common.c
+--- acx-mac80211-20080805/common.c     2009-05-07 14:32:44.000000000 +0200
++++ acx-mac80211-20080805.new/common.c 2009-05-07 16:11:26.000000000 +0200
+@@ -4105,28 +4105,28 @@
+       if (adev->interface.operating) {
+               switch (adev->interface.type) {
+-                      case IEEE80211_IF_TYPE_AP:
++                      case NL80211_IFTYPE_AP:
+                               if (adev->mode != ACX_MODE_3_AP)
+                               {
+                                       adev->mode = ACX_MODE_3_AP;
+                                       changed = 1;
+                               }
+                               break;
+-                      case IEEE80211_IF_TYPE_IBSS:
++                      case NL80211_IFTYPE_ADHOC:
+                               if (adev->mode != ACX_MODE_0_ADHOC)
+                               {
+                                       adev->mode = ACX_MODE_0_ADHOC;
+                                       changed = 1;
+                               }
+                               break;
+-                      case IEEE80211_IF_TYPE_STA:
++                      case NL80211_IFTYPE_STATION:
+                               if (adev->mode != ACX_MODE_2_STA)
+                               {
+                                       adev->mode = ACX_MODE_2_STA;
+                                       changed = 1;
+                               }
+                               break;
+-                      case IEEE80211_IF_TYPE_WDS:
++                      case NL80211_IFTYPE_WDS:
+                       default:
+                               if (adev->mode != ACX_MODE_OFF)
+                               {
+@@ -4136,7 +4136,7 @@
+                       break;
+               }
+       } else {
+-              if (adev->interface.type == IEEE80211_IF_TYPE_MNTR)
++              if (adev->interface.type == NL80211_IFTYPE_MONITOR)
+               {
+                       if (adev->mode != ACX_MODE_MONITOR)
+                       {
+@@ -4180,7 +4180,7 @@
+       FN_ENTER;
+       acx_lock(adev, flags);
+-      if (conf->type == IEEE80211_IF_TYPE_MNTR) {
++      if (conf->type == NL80211_IFTYPE_MONITOR) {
+               adev->interface.monitor++;
+       } else {
+               if (adev->interface.operating)
+@@ -4226,7 +4226,7 @@
+       FN_ENTER;
+       acx_sem_lock(adev);
+-      if (conf->type == IEEE80211_IF_TYPE_MNTR) {
++      if (conf->type == NL80211_IFTYPE_MONITOR) {
+               adev->interface.monitor--;
+ //                assert(bcm->interface.monitor >= 0);
+       } else {
+@@ -4380,7 +4380,7 @@
+       acx_lock(adev, flags);
+-      if ((vif->type != IEEE80211_IF_TYPE_MNTR)
++      if ((vif->type != NL80211_IFTYPE_MONITOR)
+           && (adev->vif == vif)) {
+               if (conf->bssid)
+               {
+@@ -4388,7 +4388,7 @@
+                       MAC_COPY(adev->bssid,conf->bssid);
+               }
+       }
+-      if ((vif->type == IEEE80211_IF_TYPE_AP)
++      if ((vif->type == NL80211_IFTYPE_AP)
+           && (adev->vif == vif)) {
+               if ((conf->ssid_len > 0) && conf->ssid)
+               {
diff --git a/package/acx-mac80211/patches/004-acx_config_interface_type.patch b/package/acx-mac80211/patches/004-acx_config_interface_type.patch
new file mode 100644 (file)
index 0000000..e6830c5
--- /dev/null
@@ -0,0 +1,95 @@
+diff -urN acx-mac80211-20080805/acx_func.h acx-mac80211-20080805.new/acx_func.h
+--- acx-mac80211-20080805/acx_func.h   2009-05-07 14:32:44.000000000 +0200
++++ acx-mac80211-20080805.new/acx_func.h       2009-05-07 16:28:17.000000000 +0200
+@@ -619,9 +619,10 @@
+               enum set_key_cmd cmd,
+               const u8 *local_addr, const u8 *addr,
+               struct ieee80211_key_conf *key);
+-extern int acx_config_interface(struct ieee80211_hw* ieee,
++void acx_config_interface(struct ieee80211_hw* ieee,
+                               struct ieee80211_vif *vif,
+-                              struct ieee80211_if_conf *conf);
++                              struct ieee80211_bss_conf *info,
++                              u32 changes);
+ int acx_net_config(struct ieee80211_hw* ieee, struct ieee80211_conf *conf);
+ int acx_net_get_tx_stats(struct ieee80211_hw* ieee, struct ieee80211_tx_queue_stats *stats);
+ int acx_net_conf_tx(struct ieee80211_hw* ieee, u16 queue,
+diff -urN acx-mac80211-20080805/common.c acx-mac80211-20080805.new/common.c
+--- acx-mac80211-20080805/common.c     2009-05-07 16:20:37.000000000 +0200
++++ acx-mac80211-20080805.new/common.c 2009-05-07 16:35:55.000000000 +0200
+@@ -4364,9 +4364,10 @@
+ **
+ */
+-extern int acx_config_interface(struct ieee80211_hw* ieee,
++void acx_config_interface(struct ieee80211_hw* ieee,
+                               struct ieee80211_vif *vif,
+-                              struct ieee80211_if_conf *conf)
++                              struct ieee80211_bss_conf *info,
++                              u32 changes)
+ {
+       acx_device_t *adev = ieee2adev(ieee);
+       unsigned long flags;
+@@ -4382,22 +4383,22 @@
+       if ((vif->type != NL80211_IFTYPE_MONITOR)
+           && (adev->vif == vif)) {
+-              if (conf->bssid)
++              if (info->bssid)
+               {
+-                      adev->interface.bssid = conf->bssid;
+-                      MAC_COPY(adev->bssid,conf->bssid);
++                      adev->interface.bssid = info->bssid;
++                      MAC_COPY(adev->bssid, info->bssid);
+               }
+       }
+       if ((vif->type == NL80211_IFTYPE_AP)
+           && (adev->vif == vif)) {
+-              if ((conf->ssid_len > 0) && conf->ssid)
++              if (info->bssid)
+               {
+-                      adev->essid_len = conf->ssid_len;
+-                      memcpy(adev->essid, conf->ssid, conf->ssid_len);
++                      adev->essid_len = ETH_ALEN;
++                      memcpy(adev->essid, info->bssid, ETH_ALEN);
+                       SET_BIT(adev->set_mask, SET_TEMPLATES);
+               }
+       }
+-      if (conf->changed & IEEE80211_IFCC_BEACON)
++      if (changes & BSS_CHANGED_BSSID)
+       {
+               adev->beacon_interval = DEFAULT_BEACON_INTERVAL;
+               adev->beacon_cache = ieee80211_beacon_get(ieee, vif);
+@@ -4412,7 +4413,7 @@
+       err = 0;
+ err_out:
+       FN_EXIT1(err);
+-      return err;
++      return;
+ }
+ /**
+diff -urN acx-mac80211-20080805/pci.c acx-mac80211-20080805.new/pci.c
+--- acx-mac80211-20080805/pci.c        2009-05-07 14:32:44.000000000 +0200
++++ acx-mac80211-20080805.new/pci.c    2009-05-07 16:27:27.000000000 +0200
+@@ -1469,7 +1469,7 @@
+       .configure_filter = acx_i_set_multicast_list,
+       .stop = acxpci_e_close,
+       .config = acx_net_config,
+-      .config_interface = acx_config_interface,
++      .bss_info_changed = acx_config_interface,
+       .set_key = acx_net_set_key,
+       .get_stats = acx_e_get_stats,
+       .get_tx_stats = acx_net_get_tx_stats,
+diff -urN acx-mac80211-20080805/usb.c acx-mac80211-20080805.new/usb.c
+--- acx-mac80211-20080805/usb.c        2009-05-07 14:32:44.000000000 +0200
++++ acx-mac80211-20080805.new/usb.c    2009-05-07 16:27:38.000000000 +0200
+@@ -741,7 +741,7 @@
+       .configure_filter = acx_i_set_multicast_list,
+       .stop = acxusb_e_close,
+       .config = acx_net_config,
+-      .config_interface = acx_config_interface,
++      .bss_info_changed = acx_config_interface,
+       .set_key = acx_net_set_key,         
+       .get_stats = acx_e_get_stats,
+       .get_tx_stats = acx_net_get_tx_stats,
diff --git a/package/acx-mac80211/patches/005-pci_fixes.patch b/package/acx-mac80211/patches/005-pci_fixes.patch
new file mode 100644 (file)
index 0000000..440ab53
--- /dev/null
@@ -0,0 +1,59 @@
+diff -urN acx-mac80211-20080805/acx_func.h acx-mac80211-20080805.new/acx_func.h
+--- acx-mac80211-20080805/acx_func.h   2009-05-07 16:36:37.000000000 +0200
++++ acx-mac80211-20080805.new/acx_func.h       2009-05-07 16:54:21.000000000 +0200
+@@ -623,7 +623,7 @@
+                               struct ieee80211_vif *vif,
+                               struct ieee80211_bss_conf *info,
+                               u32 changes);
+-int acx_net_config(struct ieee80211_hw* ieee, struct ieee80211_conf *conf);
++int acx_net_config(struct ieee80211_hw* ieee, u32 changed);
+ int acx_net_get_tx_stats(struct ieee80211_hw* ieee, struct ieee80211_tx_queue_stats *stats);
+ int acx_net_conf_tx(struct ieee80211_hw* ieee, u16 queue,
+               const struct ieee80211_tx_queue_params *params);
+diff -urN acx-mac80211-20080805/common.c acx-mac80211-20080805.new/common.c
+--- acx-mac80211-20080805/common.c     2009-05-07 16:36:37.000000000 +0200
++++ acx-mac80211-20080805.new/common.c 2009-05-07 16:57:45.000000000 +0200
+@@ -4294,9 +4294,10 @@
+ ** Derived from mac80211 code, p54, bcm43xx_mac80211
+ **
+ */
+-int acx_net_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf)
++int acx_net_config(struct ieee80211_hw *hw, u32 changed)
+ {
+       acx_device_t *adev = ieee2adev(hw);
++      struct ieee80211_conf *conf = &hw->conf;
+       unsigned long flags;
+       FN_ENTER;
+diff -urN acx-mac80211-20080805/pci.c acx-mac80211-20080805.new/pci.c
+--- acx-mac80211-20080805/pci.c        2009-05-07 16:39:39.000000000 +0200
++++ acx-mac80211-20080805.new/pci.c    2009-05-07 16:59:07.000000000 +0200
+@@ -3105,7 +3105,7 @@
+       /* let chip do RTS/CTS handshaking before sending
+        * in case packet size exceeds threshold */
+-      if (info->flags & IEEE80211_TX_CTL_USE_RTS_CTS)
++      if (info->flags & IEEE80211_TX_RC_USE_RTS_CTS)
+               SET_BIT(Ctl2_8, DESC_CTL2_RTS);
+       else
+               CLEAR_BIT(Ctl2_8, DESC_CTL2_RTS);
+@@ -3120,7 +3120,7 @@
+ /*    put_txcr(adev, txdesc, clt, rate_cur);  deprecated by mac80211 */
+       txdesc->total_length = cpu_to_le16(len);
+-      wlhdr_len = ieee80211_get_hdrlen(le16_to_cpu(wireless_header->frame_control));
++      wlhdr_len = ieee80211_hdrlen(le16_to_cpu(wireless_header->frame_control));
+       hostdesc2->length = cpu_to_le16(len - wlhdr_len);
+ /*
+       if (!ieeectl->do_not_encrypt && ieeectl->key_idx>= 0)
+@@ -3444,8 +3444,8 @@
+               /* And finally report upstream */
+               if (hostdesc)
+               {
+-                      info->status.excessive_retries = rts_failures;
+-                      info->status.retry_count = ack_failures;
++                      //info->status.excessive_retries = rts_failures;
++                      //info->status.retry_count = ack_failures;
+                       ieee80211_tx_status(adev->ieee, hostdesc->skb);
+               }
+               /* update pointer for descr to be cleaned next */