acx-mac80211: update to latest version

Fixes compilation for linux 3.10.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 38367
owl
Jonas Gorski 2013-10-12 10:50:35 +00:00
parent 8a240be62b
commit 06f3f01b06
8 changed files with 178 additions and 192 deletions

View File

@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=acx-mac80211
PKG_REV:=v2012-09-23-WIP
PKG_VERSION:=20121004
PKG_REV:=v20130127
PKG_VERSION:=20130909
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
@ -18,7 +18,7 @@ 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_MIRROR_MD5SUM:=
PKG_BUILD_DEPENDS:=mac80211
PKG_CONFIG_DEPENDS:= \

View File

@ -1,30 +0,0 @@
--- a/main.h
+++ b/main.h
@@ -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);
-#else
+#elif CONFIG_ACX_MAC80211_VERSION < KERNEL_VERSION(3, 7, 0)
void acx_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+#else
+void acx_op_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
+ struct sk_buff *skb);
#endif
--- a/main.c
+++ b/main.c
@@ -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
*/
+#if CONFIG_ACX_MAC80211_VERSION < KERNEL_VERSION(3, 7, 0)
OP_TX_RET_TYPE acx_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+#else
+void acx_op_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
+ struct sk_buff *skb)
+#endif
{
acx_device_t *adev = ieee2adev(hw);

View File

@ -0,0 +1,136 @@
From 8a0f5890019bf43f4bc95ef0754b062ddfcfa9cd Mon Sep 17 00:00:00 2001
From: Oliver Winker <oliver@oli1170.net>
Date: Sun, 10 Mar 2013 21:04:23 +0100
Subject: [PATCH 1/3] pci, mem: Fix 3.8 build
__devexit and __devinit not used anymore in 3.8
Signed-off-by: Reinhard Karcher <reinhard.karcher@gmx.net>
Signed-off-by: Oliver Winker <oliver@oli1170.net>
---
mem.c | 13 ++++++++++++-
pci.c | 26 +++++++++++++++++++++++++-
2 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/mem.c b/mem.c
index 87e01f1..f1ff7e2 100644
--- a/mem.c
+++ b/mem.c
@@ -2216,7 +2216,11 @@ int acx100mem_ioctl_set_phy_amp_bias(struct ieee80211_hw *hw,
* ==================================================
*/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
static int __devinit acxmem_probe(struct platform_device *pdev)
+#else
+static int acxmem_probe(struct platform_device *pdev)
+#endif
{
acx_device_t *adev = NULL;
const char *chip_name;
@@ -2392,7 +2396,11 @@ static int __devinit acxmem_probe(struct platform_device *pdev)
* pdev - ptr to PCI device structure containing info about pci
* configuration
*/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
static int __devexit acxmem_remove(struct platform_device *pdev)
+#else
+static int acxmem_remove(struct platform_device *pdev)
+#endif
{
struct ieee80211_hw *hw = (struct ieee80211_hw *)
platform_get_drvdata(pdev);
@@ -2594,8 +2602,11 @@ static struct platform_driver acxmem_driver = {
.name = "acx-mem",
},
.probe = acxmem_probe,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
.remove = __devexit_p(acxmem_remove),
-
+#else
+ .remove = acxmem_remove,
+#endif
#ifdef CONFIG_PM
.suspend = acxmem_e_suspend,
.resume = acxmem_e_resume
diff --git a/pci.c b/pci.c
index 1da31d1..ae07f5a 100644
--- a/pci.c
+++ b/pci.c
@@ -1039,7 +1039,11 @@ int acx100pci_ioctl_set_phy_amp_bias(struct net_device *ndev,
* id - ptr to the device id entry that matched this device
*/
#ifdef CONFIG_PCI
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
static int __devinit acxpci_probe(struct pci_dev *pdev,
+#else
+static int acxpci_probe(struct pci_dev *pdev,
+#endif
const struct pci_device_id *id)
{
unsigned long mem_region1 = 0;
@@ -1292,7 +1296,11 @@ static int __devinit acxpci_probe(struct pci_dev *pdev,
*
* pdev - ptr to PCI device structure containing info about pci configuration
*/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
static void __devexit acxpci_remove(struct pci_dev *pdev)
+#else
+static void acxpci_remove(struct pci_dev *pdev)
+#endif
{
struct ieee80211_hw *hw
= (struct ieee80211_hw *) pci_get_drvdata(pdev);
@@ -1505,7 +1513,11 @@ static struct pci_driver acxpci_driver = {
.name = "acx_pci",
.id_table = acxpci_id_tbl,
.probe = acxpci_probe,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
.remove = __devexit_p(acxpci_remove),
+#else
+ .remove = acxpci_remove,
+#endif
#ifdef CONFIG_PM
.suspend = acxpci_e_suspend,
.resume = acxpci_e_resume
@@ -1603,8 +1615,12 @@ static struct vlynq_device_id acx_vlynq_id[] = {
};
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
static __devinit int vlynq_probe(struct vlynq_device *vdev,
- struct vlynq_device_id *id)
+#else
+static int vlynq_probe(struct vlynq_device *vdev,
+#endif
+ struct vlynq_device_id *id)
{
int result = -EIO, i;
u32 addr;
@@ -1785,7 +1801,11 @@ static __devinit int vlynq_probe(struct vlynq_device *vdev,
return result;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
static __devexit void vlynq_remove(struct vlynq_device *vdev)
+#else
+static void vlynq_remove(struct vlynq_device *vdev)
+#endif
{
struct ieee80211_hw *hw = vlynq_get_drvdata(vdev);
acx_device_t *adev = hw2adev(hw);
@@ -1851,7 +1871,11 @@ static struct vlynq_driver acxvlynq_driver = {
.name = "acx_vlynq",
.id_table = acx_vlynq_id,
.probe = vlynq_probe,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
.remove = __devexit_p(vlynq_remove),
+#else
+ .remove = vlynq_remove,
+#endif
};
#endif /* CONFIG_VLYNQ */
--
1.8.4.rc1

View File

@ -1,85 +0,0 @@
--- a/mem.c
+++ b/mem.c
@@ -2002,7 +2002,7 @@ int acx100mem_ioctl_set_phy_amp_bias(str
* configuration
* id - ptr to the device id entry that matched this device
*/
-static int __devinit acxmem_probe(struct platform_device *pdev)
+static int acxmem_probe(struct platform_device *pdev)
{
acx_device_t *adev = NULL;
const char *chip_name;
@@ -2268,7 +2268,7 @@ done:
* pdev - ptr to PCI device structure containing info about pci
* configuration
*/
-static int __devexit acxmem_remove(struct platform_device *pdev)
+static int acxmem_remove(struct platform_device *pdev)
{
struct ieee80211_hw *hw = (struct ieee80211_hw *)
platform_get_drvdata(pdev);
@@ -2470,7 +2470,7 @@ static struct platform_driver acxmem_dri
.name = "acx-mem",
},
.probe = acxmem_probe,
- .remove = __devexit_p(acxmem_remove),
+ .remove = acxmem_remove,
#ifdef CONFIG_PM
.suspend = acxmem_e_suspend,
--- a/pci.c
+++ b/pci.c
@@ -982,7 +982,7 @@ int acx100pci_ioctl_set_phy_amp_bias(str
* id - ptr to the device id entry that matched this device
*/
#ifdef CONFIG_PCI
-static int __devinit acxpci_probe(struct pci_dev *pdev,
+static int acxpci_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{
acx111_ie_configoption_t co;
@@ -1346,7 +1346,7 @@ done:
*
* pdev - ptr to PCI device structure containing info about pci configuration
*/
-static void __devexit acxpci_remove(struct pci_dev *pdev)
+static void acxpci_remove(struct pci_dev *pdev)
{
struct ieee80211_hw *hw
= (struct ieee80211_hw *) pci_get_drvdata(pdev);
@@ -1537,7 +1537,7 @@ static int acxpci_e_resume(struct pci_de
*/
#if 0 // use later ?
-static struct acxpci_device_info acxpci_info_tbl[] __devinitdata = {
+static struct acxpci_device_info acxpci_info_tbl[] = {
[0] = {
.part_name = "acx111",
.helper_image = "tiacx1111r16", // probly wrong !!
@@ -1564,7 +1564,7 @@ static struct pci_driver acxpci_driver =
.name = "acx_pci",
.id_table = acxpci_id_tbl,
.probe = acxpci_probe,
- .remove = __devexit_p(acxpci_remove),
+ .remove = acxpci_remove,
#ifdef CONFIG_PM
.suspend = acxpci_e_suspend,
.resume = acxpci_e_resume
@@ -1662,7 +1662,7 @@ static struct vlynq_device_id acx_vlynq_
};
-static __devinit int vlynq_probe(struct vlynq_device *vdev,
+static int vlynq_probe(struct vlynq_device *vdev,
struct vlynq_device_id *id)
{
int result = -EIO, i;
@@ -1971,7 +1971,7 @@ static struct vlynq_driver vlynq_acx = {
.name = "acx_vlynq",
.id_table = acx_vlynq_id,
.probe = vlynq_probe,
- .remove = __devexit_p(vlynq_remove),
+ .remove = vlynq_remove,
};
#endif /* CONFIG_VLYNQ */

View File

@ -0,0 +1,36 @@
From 1daf4bfdb072b08f3b4e412bbfa9645f88dc0a01 Mon Sep 17 00:00:00 2001
From: Oliver Winker <oliver@oli1170.net>
Date: Tue, 3 Sep 2013 20:36:36 +0200
Subject: [PATCH 3/3] Fix 3.10 build
Signed-off-by: Reinhard Karcher <reinhard.karcher@gmx.net>
Signed-off-by: Oliver Winker <oliver@oli1170.net>
---
main.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/main.c b/main.c
index 3af6cd0..841592f 100644
--- a/main.c
+++ b/main.c
@@ -682,10 +682,17 @@ int acx_op_config(struct ieee80211_hw *hw, u32 changed)
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
logf1(L_DEBUG, "IEEE80211_CONF_CHANGE_CHANNEL,"
+#if CONFIG_ACX_MAC80211_VERSION >= KERNEL_VERSION(3, 10, 0)
+ "channel->hw_value=%i\n", conf->chandef.chan->hw_value);
+
+ acx_set_channel(adev, conf->chandef.chan->hw_value,
+ conf->chandef.chan->center_freq);
+#else
"channel->hw_value=%i\n", conf->channel->hw_value);
acx_set_channel(adev, conf->channel->hw_value,
conf->channel->center_freq);
+#endif
changed_not_done &= ~IEEE80211_CONF_CHANGE_CHANNEL;
}
--
1.8.4.rc1

View File

@ -1,27 +0,0 @@
--- 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)

View File

@ -1,42 +0,0 @@
--- a/mem.c
+++ b/mem.c
@@ -2036,7 +2036,7 @@ static int acxmem_probe(struct platform_
*/
ieee->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION)
| BIT(NL80211_IFTYPE_ADHOC);
- ieee->queues = 1;
+ ieee->queues = 4;
/* OW TODO Check if RTS/CTS threshold can be included here */
/* TODO: although in the original driver the maximum value was
--- a/pci.c
+++ b/pci.c
@@ -1022,7 +1022,7 @@ static int acxpci_probe(struct pci_dev *
BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_ADHOC) |
BIT(NL80211_IFTYPE_AP);
- ieee->queues = 1;
+ ieee->queues = 4;
/* OW TODO Check if RTS/CTS threshold can be included here */
/* TODO: although in the original driver the maximum value was
@@ -1691,7 +1691,7 @@ static int vlynq_probe(struct vlynq_devi
BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_ADHOC) |
BIT(NL80211_IFTYPE_AP);
- ieee->queues = 1;
+ ieee->queues = 4;
/* We base signal quality on winlevel approach of previous driver
* TODO OW 20100615 This should into a common init code
--- a/usb.c
+++ b/usb.c
@@ -1624,7 +1624,7 @@ acxusb_probe(struct usb_interface *intf,
*/
ieee->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION)
| BIT(NL80211_IFTYPE_ADHOC);
- ieee->queues = 1;
+ ieee->queues = 4;
// OW TODO Check if RTS/CTS threshold can be included here
// We base signal quality on winlevel approach of previous driver

View File

@ -1,15 +1,13 @@
--- 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];
@@ -710,10 +710,25 @@ static int acx1xx_get_station_id(acx_dev
u8 *stationID = adev->ie_cmd_buf;;
const u8 *paddr;
int i, res;
+ const char *prom_addr;
+ char *prom_getenv(const char *name);
res = acx_interrogate(adev, &stationID, ACX1xx_IE_DOT11_STATION_ID);
res = acx_interrogate(adev, stationID, ACX1xx_IE_DOT11_STATION_ID);
paddr = &stationID[4];
- for (i = 0; i < ETH_ALEN; i++) {
+ prom_addr = NULL;