From: Florian F. <f.f...@gm...> - 2016-10-13 14:43:34
|
Hi Oliver, Long time no see! I dug an old DWL-650+ PCMCIA card that I wanted to test on my laptop and had to solve a few build failures first. Cheers Florian Fainelli (3): cardsetting: Fix size argument to memset() main: Fix API changes from mac80211 pci: Expand DEFINE_PCI_DEVICE_TABLE macro for >= v4.8 cardsetting.c | 2 +- main.c | 25 ++++++++++++++++++++++++- main.h | 5 +++++ pci.c | 4 ++++ 4 files changed, 34 insertions(+), 2 deletions(-) -- 2.7.4 |
From: Florian F. <f.f...@gm...> - 2016-10-13 14:43:35
|
Take into account a few API changes: * hw->flags converted to a bitmap array (4.2) * FIF_PROMISC_IN_BSS removed (4.2) * ieee80211_probereq_get() takes an address argument instead of vif (3.19) * hw_scan passes an ieee80211_scan_request (3.17) Signed-off-by: Florian Fainelli <f.f...@gm...> --- main.c | 25 ++++++++++++++++++++++++- main.h | 5 +++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index bfec85685f2d..a4e8761392b9 100644 --- a/main.c +++ b/main.c @@ -497,7 +497,11 @@ int acx_free_mechanics(acx_device_t *adev) int acx_init_ieee80211(acx_device_t *adev, struct ieee80211_hw *hw) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0) hw->flags &= ~IEEE80211_HW_RX_INCLUDES_FCS; +#else + __clear_bit(IEEE80211_HW_RX_INCLUDES_FCS, hw->flags); +#endif hw->queues = 1; hw->wiphy->max_scan_ssids = 1; @@ -525,7 +529,11 @@ int acx_init_ieee80211(acx_device_t *adev, struct ieee80211_hw *hw) /* We base signal quality on winlevel approach of previous driver * TODO OW 20100615 This should into a common init code */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0) hw->flags |= IEEE80211_HW_SIGNAL_UNSPEC; +#else + ieee80211_hw_set(hw, SIGNAL_UNSPEC); +#endif hw->max_signal = 100; if (IS_ACX100(adev)) { @@ -945,8 +953,11 @@ void acx_op_configure_filter(struct ieee80211_hw *hw, changed_flags, *total_flags); /* OWI TODO: Set also FIF_PROBE_REQ ? */ - *total_flags &= (FIF_PROMISC_IN_BSS | FIF_ALLMULTI | FIF_FCSFAIL + *total_flags &= (FIF_ALLMULTI | FIF_FCSFAIL | FIF_CONTROL | FIF_OTHER_BSS); +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0) + *total_flags &= FIF_PROMISC_IN_BSS; +#endif logf1(L_DEBUG, "2: *total_flags=0x%08x\n", *total_flags); @@ -1044,9 +1055,16 @@ void acx_op_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, #endif } +#if CONFIG_ACX_MAC80211_VERSION < KERNEL_VERSION(3, 17, 0) int acx_op_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct cfg80211_scan_request *req) { +#else +int acx_op_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + struct ieee80211_scan_request *hw_req) +{ + struct cfg80211_scan_request *req = &hw_req->req; +#endif acx_device_t *adev = hw2adev(hw); struct sk_buff *skb; size_t ssid_len = 0; @@ -1082,8 +1100,13 @@ int acx_op_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, goto out; } #else +#if CONFIG_ACX_MAC80211_VERSION < KERNEL_VERSION(3, 19, 0) skb = ieee80211_probereq_get(adev->hw, adev->vif, ssid, ssid_len, req->ie_len); +#else + skb = ieee80211_probereq_get(adev->hw, adev->vif->addr, ssid, ssid_len, + req->ie_len); +#endif if (!skb) { ret = -ENOMEM; goto out; diff --git a/main.h b/main.h index 293f5c897638..f07cbb69411f 100644 --- a/main.h +++ b/main.h @@ -61,8 +61,13 @@ void acx_op_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, struct sk_buff *skb); #endif +#if CONFIG_ACX_MAC80211_VERSION < KERNEL_VERSION(3, 17, 0) int acx_op_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct cfg80211_scan_request *req); +#else +int acx_op_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + struct ieee80211_scan_request *req); +#endif int acx_recover_hw(acx_device_t *adev); -- 2.7.4 |
From: Florian F. <f.f...@gm...> - 2016-10-13 14:43:36
|
This macro is now going away, so expand it for >= v4.8 Signed-off-by: Florian Fainelli <f.f...@gm...> --- pci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pci.c b/pci.c index ae07f5aae304..72d542f04579 100644 --- a/pci.c +++ b/pci.c @@ -1495,7 +1495,11 @@ static struct acxpci_device_info acxpci_info_tbl[] __devinitdata = { #endif #ifdef CONFIG_PCI +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0) static DEFINE_PCI_DEVICE_TABLE(acxpci_id_tbl) = { +#else +static const struct pci_device_id acxpci_id_tbl[] = { +#endif { PCI_VDEVICE(TI, PCI_DEVICE_ID_TI_TNETW1100A), .driver_data = CHIPTYPE_ACX100, }, -- 2.7.4 |
From: Florian F. <f.f...@gm...> - 2016-10-13 14:43:36
|
We want to know the size of the pointed object, not the pointer. Signed-off-by: Florian Fainelli <f.f...@gm...> --- cardsetting.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cardsetting.c b/cardsetting.c index aae3be1433ce..e2555bd96b63 100644 --- a/cardsetting.c +++ b/cardsetting.c @@ -589,7 +589,7 @@ int acx1xx_update_antenna(acx_device_t *adev) log(L_INIT, "Updating antenna[0,1]: 0x%02X 0x%02X\n", adev->antenna[0], adev->antenna[1]); - memset(antenna, 0, sizeof(antenna)); + memset(antenna, 0, sizeof(*antenna)); antenna[4] = adev->antenna[0]; antenna[5] = adev->antenna[1]; res = acx_configure(adev, antenna, -- 2.7.4 |