* [PATCH 1/6] wl12xx: update to 2.6.29 mac80211 hw scan API
2009-04-05 2:10 [PATCH 0/6] wl12xx updates Bob Copeland
@ 2009-04-05 2:10 ` Bob Copeland
2009-04-05 8:58 ` Johannes Berg
2009-04-22 19:45 ` [PATCH 1/6] " Kalle Valo
2009-04-05 2:10 ` [PATCH 2/6] wl12xx: remove ssid parameters from driver private struct Bob Copeland
` (5 subsequent siblings)
6 siblings, 2 replies; 18+ messages in thread
From: Bob Copeland @ 2009-04-05 2:10 UTC (permalink / raw)
To: kalle.valo; +Cc: linux-wireless, Bob Copeland
The ops->hw_scan callback now takes a struct *cfg80211_scan_request,
and the scan_completed notifier takes a parameter to indicate whether
the scan was aborted.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
drivers/net/wireless/wl12xx/event.c | 2 +-
drivers/net/wireless/wl12xx/main.c | 14 +++++++++++---
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/event.c b/drivers/net/wireless/wl12xx/event.c
index 5c3b22b..7095772 100644
--- a/drivers/net/wireless/wl12xx/event.c
+++ b/drivers/net/wireless/wl12xx/event.c
@@ -37,7 +37,7 @@ static int wl12xx_event_scan_complete(struct wl12xx *wl,
if (wl->scanning) {
mutex_unlock(&wl->mutex);
- ieee80211_scan_completed(wl->hw);
+ ieee80211_scan_completed(wl->hw, false);
mutex_lock(&wl->mutex);
wl->scanning = false;
}
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 7c4e538..27f4f15 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -511,7 +511,7 @@ static void wl12xx_op_stop(struct ieee80211_hw *hw)
if (wl->scanning) {
mutex_unlock(&wl->mutex);
- ieee80211_scan_completed(wl->hw);
+ ieee80211_scan_completed(wl->hw, true);
mutex_lock(&wl->mutex);
wl->scanning = false;
}
@@ -1092,15 +1092,23 @@ out:
}
-static int wl12xx_op_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len)
+static int wl12xx_op_hw_scan(struct ieee80211_hw *hw,
+ struct cfg80211_scan_request *req)
{
struct wl12xx *wl = hw->priv;
int ret;
+ u8 *ssid = NULL;
+ size_t ssid_len = 0;
wl12xx_debug(DEBUG_MAC80211, "mac80211 hw scan");
+ if (req->n_ssids) {
+ ssid = req->ssids[0].ssid;
+ ssid_len = req->ssids[0].ssid_len;
+ }
+
mutex_lock(&wl->mutex);
- ret = wl12xx_hw_scan(hw->priv, ssid, len, 1, 0, 13, 3);
+ ret = wl12xx_hw_scan(hw->priv, ssid, ssid_len, 1, 0, 13, 3);
mutex_unlock(&wl->mutex);
return ret;
--
1.6.0.6
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH 1/6] wl12xx: update to 2.6.29 mac80211 hw scan API
2009-04-05 2:10 ` [PATCH 1/6] wl12xx: update to 2.6.29 mac80211 hw scan API Bob Copeland
@ 2009-04-05 8:58 ` Johannes Berg
2009-04-05 14:33 ` Bob Copeland
2009-04-22 19:45 ` [PATCH 1/6] " Kalle Valo
1 sibling, 1 reply; 18+ messages in thread
From: Johannes Berg @ 2009-04-05 8:58 UTC (permalink / raw)
To: Bob Copeland; +Cc: kalle.valo, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 991 bytes --]
On Sat, 2009-04-04 at 22:10 -0400, Bob Copeland wrote:
> The ops->hw_scan callback now takes a struct *cfg80211_scan_request,
> -static int wl12xx_op_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len)
> +static int wl12xx_op_hw_scan(struct ieee80211_hw *hw,
> + struct cfg80211_scan_request *req)
> {
> struct wl12xx *wl = hw->priv;
> int ret;
> + u8 *ssid = NULL;
> + size_t ssid_len = 0;
>
> wl12xx_debug(DEBUG_MAC80211, "mac80211 hw scan");
>
> + if (req->n_ssids) {
> + ssid = req->ssids[0].ssid;
> + ssid_len = req->ssids[0].ssid_len;
> + }
> +
> mutex_lock(&wl->mutex);
> - ret = wl12xx_hw_scan(hw->priv, ssid, len, 1, 0, 13, 3);
> + ret = wl12xx_hw_scan(hw->priv, ssid, ssid_len, 1, 0, 13, 3);
This will work for mac80211, but only by accident, and will not allow
userspace to request directed scans -- you need to add
hw->wiphy->max_scan_ssids = 1;
somewhere. Supporting scan IEs would also be good, if possible.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH 1/6] wl12xx: update to 2.6.29 mac80211 hw scan API
2009-04-05 8:58 ` Johannes Berg
@ 2009-04-05 14:33 ` Bob Copeland
2009-04-22 3:38 ` [PATCH v2] " Bob Copeland
0 siblings, 1 reply; 18+ messages in thread
From: Bob Copeland @ 2009-04-05 14:33 UTC (permalink / raw)
To: Johannes Berg; +Cc: kalle.valo, linux-wireless
On Sun, Apr 05, 2009 at 10:58:26AM +0200, Johannes Berg wrote:
> This will work for mac80211, but only by accident, and will not allow
> userspace to request directed scans -- you need to add
> hw->wiphy->max_scan_ssids = 1;
Thanks for the catch, I added this to my local copy. Also, there needs
to be a patch that sets wiphy->interface_modes.
> somewhere. Supporting scan IEs would also be good, if possible.
Looks doable with some minor surgery.
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH v2] wl12xx: update to 2.6.29 mac80211 hw scan API
2009-04-05 14:33 ` Bob Copeland
@ 2009-04-22 3:38 ` Bob Copeland
2009-04-22 19:57 ` Kalle Valo
0 siblings, 1 reply; 18+ messages in thread
From: Bob Copeland @ 2009-04-22 3:38 UTC (permalink / raw)
To: Johannes Berg; +Cc: kalle.valo, linux-wireless
The ops->hw_scan callback now takes a struct *cfg80211_scan_request,
and the scan_completed notifier takes a parameter to indicate whether
the scan was aborted.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
Kalle, this is just an update to 1/6, the others in the series are
probably ok as-is.
v2: just added the max_scan_ssids.
drivers/net/wireless/wl12xx/event.c | 2 +-
drivers/net/wireless/wl12xx/main.c | 15 ++++++++++++---
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/event.c b/drivers/net/wireless/wl12xx/event.c
index 5c3b22b..7095772 100644
--- a/drivers/net/wireless/wl12xx/event.c
+++ b/drivers/net/wireless/wl12xx/event.c
@@ -37,7 +37,7 @@ static int wl12xx_event_scan_complete(struct wl12xx *wl,
if (wl->scanning) {
mutex_unlock(&wl->mutex);
- ieee80211_scan_completed(wl->hw);
+ ieee80211_scan_completed(wl->hw, false);
mutex_lock(&wl->mutex);
wl->scanning = false;
}
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 7c4e538..e4d1e12 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -511,7 +511,7 @@ static void wl12xx_op_stop(struct ieee80211_hw *hw)
if (wl->scanning) {
mutex_unlock(&wl->mutex);
- ieee80211_scan_completed(wl->hw);
+ ieee80211_scan_completed(wl->hw, true);
mutex_lock(&wl->mutex);
wl->scanning = false;
}
@@ -1092,15 +1092,23 @@ out:
}
-static int wl12xx_op_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len)
+static int wl12xx_op_hw_scan(struct ieee80211_hw *hw,
+ struct cfg80211_scan_request *req)
{
struct wl12xx *wl = hw->priv;
int ret;
+ u8 *ssid = NULL;
+ size_t ssid_len = 0;
wl12xx_debug(DEBUG_MAC80211, "mac80211 hw scan");
+ if (req->n_ssids) {
+ ssid = req->ssids[0].ssid;
+ ssid_len = req->ssids[0].ssid_len;
+ }
+
mutex_lock(&wl->mutex);
- ret = wl12xx_hw_scan(hw->priv, ssid, len, 1, 0, 13, 3);
+ ret = wl12xx_hw_scan(hw->priv, ssid, ssid_len, 1, 0, 13, 3);
mutex_unlock(&wl->mutex);
return ret;
@@ -1237,6 +1245,7 @@ static int wl12xx_init_ieee80211(struct wl12xx *wl)
wl->hw->flags = IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_NOISE_DBM;
+ wl->hw->wiphy->max_scan_ssids = 1;
wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &wl12xx_band_2ghz;
SET_IEEE80211_DEV(wl->hw, &wl->spi->dev);
--
1.6.0.6
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH v2] wl12xx: update to 2.6.29 mac80211 hw scan API
2009-04-22 3:38 ` [PATCH v2] " Bob Copeland
@ 2009-04-22 19:57 ` Kalle Valo
0 siblings, 0 replies; 18+ messages in thread
From: Kalle Valo @ 2009-04-22 19:57 UTC (permalink / raw)
To: Bob Copeland; +Cc: Johannes Berg, linux-wireless
Bob Copeland <me@bobcopeland.com> writes:
> The ops->hw_scan callback now takes a struct *cfg80211_scan_request,
> and the scan_completed notifier takes a parameter to indicate whether
> the scan was aborted.
>
> Signed-off-by: Bob Copeland <me@bobcopeland.com>
> ---
>
> Kalle, this is just an update to 1/6, the others in the series are
> probably ok as-is.
>
> v2: just added the max_scan_ssids.
I dropped the v1 version and took this one instead.
--
Kalle Valo
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/6] wl12xx: update to 2.6.29 mac80211 hw scan API
2009-04-05 2:10 ` [PATCH 1/6] wl12xx: update to 2.6.29 mac80211 hw scan API Bob Copeland
2009-04-05 8:58 ` Johannes Berg
@ 2009-04-22 19:45 ` Kalle Valo
1 sibling, 0 replies; 18+ messages in thread
From: Kalle Valo @ 2009-04-22 19:45 UTC (permalink / raw)
To: Bob Copeland; +Cc: kalle.valo, linux-wireless
Bob Copeland <me@bobcopeland.com> writes:
> The ops->hw_scan callback now takes a struct *cfg80211_scan_request,
> and the scan_completed notifier takes a parameter to indicate whether
> the scan was aborted.
>
> Signed-off-by: Bob Copeland <me@bobcopeland.com>
Applied.
--
Kalle Valo
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 2/6] wl12xx: remove ssid parameters from driver private struct
2009-04-05 2:10 [PATCH 0/6] wl12xx updates Bob Copeland
2009-04-05 2:10 ` [PATCH 1/6] wl12xx: update to 2.6.29 mac80211 hw scan API Bob Copeland
@ 2009-04-05 2:10 ` Bob Copeland
2009-04-22 19:46 ` Kalle Valo
2009-04-05 2:10 ` [PATCH 3/6] wl12xx: separate platform data into arch-independent code Bob Copeland
` (4 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Bob Copeland @ 2009-04-05 2:10 UTC (permalink / raw)
To: kalle.valo; +Cc: linux-wireless, Bob Copeland
Since 2.6.29, mac80211 no longer passes ssid to the drivers and
wl12xx doesn't need it anyway, so remove all references.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
drivers/net/wireless/wl12xx/cmd.c | 4 +---
drivers/net/wireless/wl12xx/main.c | 8 --------
drivers/net/wireless/wl12xx/wl12xx.h | 2 --
3 files changed, 1 insertions(+), 13 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c
index 85b94ae..93eb843 100644
--- a/drivers/net/wireless/wl12xx/cmd.c
+++ b/drivers/net/wireless/wl12xx/cmd.c
@@ -216,7 +216,7 @@ int wl12xx_cmd_join(struct wl12xx *wl, u8 bss_type, u8 dtim_interval,
u16 beacon_interval, u8 wait)
{
unsigned long timeout;
- struct cmd_join join;
+ struct cmd_join join = {};
int ret, i;
u8 *bssid;
@@ -245,8 +245,6 @@ int wl12xx_cmd_join(struct wl12xx *wl, u8 bss_type, u8 dtim_interval,
join.dtim_interval = dtim_interval;
join.bss_type = bss_type;
join.channel = wl->channel;
- join.ssid_len = wl->ssid_len;
- memcpy(join.ssid, wl->ssid, wl->ssid_len);
join.ctrl = JOIN_CMD_CTRL_TX_FLUSH;
ret = wl12xx_cmd_send(wl, CMD_START_JOIN, &join, sizeof(join));
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 27f4f15..9de45c7 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -534,8 +534,6 @@ static void wl12xx_op_stop(struct ieee80211_hw *hw)
wl12xx_power_off(wl);
memset(wl->bssid, 0, ETH_ALEN);
- memset(wl->ssid, 0, IW_ESSID_MAX_SIZE + 1);
- wl->ssid_len = 0;
wl->listen_int = 1;
wl->joined = false;
wl->bss_type = MAX_BSS_TYPE;
@@ -643,8 +641,6 @@ static int wl12xx_op_config_interface(struct ieee80211_hw *hw,
wl12xx_debug(DEBUG_MAC80211, "mac80211 config_interface bssid %s",
print_mac(mac, conf->bssid));
- wl12xx_dump_ascii(DEBUG_MAC80211, "ssid: ", conf->ssid,
- conf->ssid_len);
mutex_lock(&wl->mutex);
@@ -654,10 +650,6 @@ static int wl12xx_op_config_interface(struct ieee80211_hw *hw,
if (ret < 0)
goto out;
- wl->ssid_len = conf->ssid_len;
- if (wl->ssid_len)
- memcpy(wl->ssid, conf->ssid, wl->ssid_len);
-
if (wl->bss_type != BSS_TYPE_IBSS) {
ret = wl12xx_cmd_join(wl, wl->bss_type, 5, 100, 1);
if (ret < 0)
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h
index 4a5a009..1856b07 100644
--- a/drivers/net/wireless/wl12xx/wl12xx.h
+++ b/drivers/net/wireless/wl12xx/wl12xx.h
@@ -199,8 +199,6 @@ struct wl12xx {
u8 bssid[ETH_ALEN];
u8 mac_addr[ETH_ALEN];
u8 bss_type;
- u8 ssid[IW_ESSID_MAX_SIZE + 1];
- u8 ssid_len;
u8 listen_int;
int channel;
--
1.6.0.6
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 3/6] wl12xx: separate platform data into arch-independent code
2009-04-05 2:10 [PATCH 0/6] wl12xx updates Bob Copeland
2009-04-05 2:10 ` [PATCH 1/6] wl12xx: update to 2.6.29 mac80211 hw scan API Bob Copeland
2009-04-05 2:10 ` [PATCH 2/6] wl12xx: remove ssid parameters from driver private struct Bob Copeland
@ 2009-04-05 2:10 ` Bob Copeland
2009-04-22 19:51 ` Kalle Valo
2009-04-05 2:10 ` [PATCH 4/6] wl12xx: update tx API usage Bob Copeland
` (3 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Bob Copeland @ 2009-04-05 2:10 UTC (permalink / raw)
To: kalle.valo; +Cc: linux-wireless, Bob Copeland
In order to build the wl12xx driver on any arch, extract the SPI
config struct into include/linux/spi/ and remove the OMAP tag-based
retrieval. The board code can then set the platform data on
the spi struct device before probe.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
drivers/net/wireless/wl12xx/main.c | 7 ++++---
drivers/net/wireless/wl12xx/wl12xx.h | 5 ++---
include/linux/spi/wl12xx_spi.h | 18 ++++++++++++++++++
3 files changed, 24 insertions(+), 6 deletions(-)
create mode 100644 include/linux/spi/wl12xx_spi.h
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 9de45c7..dd3c277 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -1266,6 +1266,7 @@ static int __devinit wl12xx_probe(struct spi_device *spi)
struct wl12xx *wl;
int ret, i;
static const u8 nokia_oui[3] = {0x00, 0x1f, 0xdf};
+ struct wl12xx_platform_data *pdata = spi->dev.platform_data;
hw = ieee80211_alloc_hw(sizeof(*wl), &wl12xx_ops);
if (!hw) {
@@ -1279,9 +1280,9 @@ static int __devinit wl12xx_probe(struct spi_device *spi)
wl->hw = hw;
dev_set_drvdata(&spi->dev, wl);
wl->spi = spi;
- wl->config = omap_get_config(OMAP_TAG_WLAN_CX3110X,
- struct omap_wlan_cx3110x_config);
- if (wl->config == NULL) {
+
+ wl->config = pdata;
+ if (!wl->config) {
ret = -ENODEV;
goto out_free;
}
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h
index 1856b07..6f0b33d 100644
--- a/drivers/net/wireless/wl12xx/wl12xx.h
+++ b/drivers/net/wireless/wl12xx/wl12xx.h
@@ -28,9 +28,8 @@
#include <linux/mutex.h>
#include <linux/list.h>
#include <linux/bitops.h>
+#include <linux/spi/wl12xx_spi.h>
#include <net/mac80211.h>
-#include <mach/board.h>
-#include <mach/board-nokia.h>
#define DRIVER_NAME "wl12xx"
#define DRIVER_PREFIX DRIVER_NAME ": "
@@ -175,7 +174,7 @@ struct wl12xx {
bool mac80211_registered;
struct spi_device *spi;
- const struct omap_wlan_cx3110x_config *config;
+ const struct wl12xx_platform_data *config;
enum wl12xx_state state;
struct mutex mutex;
diff --git a/include/linux/spi/wl12xx_spi.h b/include/linux/spi/wl12xx_spi.h
new file mode 100644
index 0000000..4011d00
--- /dev/null
+++ b/include/linux/spi/wl12xx_spi.h
@@ -0,0 +1,18 @@
+/*
+ * wl12xx_spi.h
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+#ifndef _WL12XX_SPI_H
+#define _WL12XX_SPI_H
+
+struct wl12xx_platform_data {
+ u8 chip_type;
+ s16 power_gpio;
+ s16 irq_gpio;
+ s16 spi_cs_gpio;
+};
+
+#endif
--
1.6.0.6
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH 3/6] wl12xx: separate platform data into arch-independent code
2009-04-05 2:10 ` [PATCH 3/6] wl12xx: separate platform data into arch-independent code Bob Copeland
@ 2009-04-22 19:51 ` Kalle Valo
0 siblings, 0 replies; 18+ messages in thread
From: Kalle Valo @ 2009-04-22 19:51 UTC (permalink / raw)
To: Bob Copeland; +Cc: linux-wireless
Bob Copeland <me@bobcopeland.com> writes:
> In order to build the wl12xx driver on any arch, extract the SPI
> config struct into include/linux/spi/ and remove the OMAP tag-based
> retrieval. The board code can then set the platform data on
> the spi struct device before probe.
I dropped this one because I had done this a bit differently. Basically
I moved all gpio code from wl12xx to the board file:
struct wl12xx_platform_data {
void (*set_power)(bool enable);
};
And the irq is delivered in spi_board_info.irq. Please take a look and
comment.
--
Kalle Valo
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 4/6] wl12xx: update tx API usage
2009-04-05 2:10 [PATCH 0/6] wl12xx updates Bob Copeland
` (2 preceding siblings ...)
2009-04-05 2:10 ` [PATCH 3/6] wl12xx: separate platform data into arch-independent code Bob Copeland
@ 2009-04-05 2:10 ` Bob Copeland
2009-04-22 19:52 ` Kalle Valo
2009-04-05 2:10 ` [PATCH 5/6] wl12xx: update config callback parameters Bob Copeland
` (2 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Bob Copeland @ 2009-04-05 2:10 UTC (permalink / raw)
To: kalle.valo; +Cc: linux-wireless, Bob Copeland
Update wl12xx to use the new fields in ieee80211_tx_info.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
drivers/net/wireless/wl12xx/tx.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c
index 3ce5562..99151b3 100644
--- a/drivers/net/wireless/wl12xx/tx.c
+++ b/drivers/net/wireless/wl12xx/tx.c
@@ -361,14 +361,11 @@ static void wl12xx_tx_packet_cb(struct wl12xx *wl,
info = IEEE80211_SKB_CB(skb);
- if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) {
- if (result->status == TX_SUCCESS)
- info->flags |= IEEE80211_TX_STAT_ACK;
- if (result->status & TX_RETRY_EXCEEDED)
- info->status.excessive_retries = 1;
- }
+ if (!(info->flags & IEEE80211_TX_CTL_NO_ACK) &&
+ (result->status == TX_SUCCESS))
+ info->flags |= IEEE80211_TX_STAT_ACK;
- info->status.retry_count = result->ack_failures;
+ info->status.rates[0].count = result->ack_failures + 1;
/*
* We have to remove our private TX header before pushing
--
1.6.0.6
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 5/6] wl12xx: update config callback parameters
2009-04-05 2:10 [PATCH 0/6] wl12xx updates Bob Copeland
` (3 preceding siblings ...)
2009-04-05 2:10 ` [PATCH 4/6] wl12xx: update tx API usage Bob Copeland
@ 2009-04-05 2:10 ` Bob Copeland
2009-04-22 19:53 ` Kalle Valo
2009-04-05 2:10 ` [PATCH 6/6] wl12xx: update set_key callback to match current API Bob Copeland
2009-04-22 19:45 ` [PATCH 0/6] wl12xx updates Kalle Valo
6 siblings, 1 reply; 18+ messages in thread
From: Bob Copeland @ 2009-04-05 2:10 UTC (permalink / raw)
To: kalle.valo; +Cc: linux-wireless, Bob Copeland
Update wl12xx to use new parameters for ops->config.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
drivers/net/wireless/wl12xx/main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index dd3c277..76b1efc 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -681,10 +681,10 @@ out:
return ret;
}
-static int wl12xx_op_config(struct ieee80211_hw *hw,
- struct ieee80211_conf *conf)
+static int wl12xx_op_config(struct ieee80211_hw *hw, u32 changed)
{
struct wl12xx *wl = hw->priv;
+ struct ieee80211_conf *conf = &hw->conf;
int channel, ret = 0;
channel = ieee80211_frequency_to_channel(conf->channel->center_freq);
--
1.6.0.6
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 6/6] wl12xx: update set_key callback to match current API
2009-04-05 2:10 [PATCH 0/6] wl12xx updates Bob Copeland
` (4 preceding siblings ...)
2009-04-05 2:10 ` [PATCH 5/6] wl12xx: update config callback parameters Bob Copeland
@ 2009-04-05 2:10 ` Bob Copeland
2009-04-22 19:53 ` Kalle Valo
2009-04-22 19:45 ` [PATCH 0/6] wl12xx updates Kalle Valo
6 siblings, 1 reply; 18+ messages in thread
From: Bob Copeland @ 2009-04-05 2:10 UTC (permalink / raw)
To: kalle.valo; +Cc: linux-wireless, Bob Copeland
Use the new prototype for ops->set_key which now takes a vif pointer
and sta pointer instead of a pair of addresses. Remove the debug
statement for local_addr since wl12xx_op_set_key doesn't use the vif
pointer anyway.
---
drivers/net/wireless/wl12xx/main.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 76b1efc..edf9ec1 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -840,28 +840,30 @@ static int wl12xx_set_key_type(struct wl12xx *wl, struct acx_set_key *key,
}
static int wl12xx_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
- const u8 *local_addr, const u8 *addr,
+ struct ieee80211_vif *vif,
+ struct ieee80211_sta *sta,
struct ieee80211_key_conf *key)
{
struct wl12xx *wl = hw->priv;
struct acx_set_key wl_key;
+ const u8 *addr;
int ret;
+ static const u8 bcast_addr[ETH_ALEN] =
+ { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
+
wl12xx_debug(DEBUG_MAC80211, "mac80211 set key");
memset(&wl_key, 0, sizeof(wl_key));
+ addr = sta ? sta->addr : bcast_addr;
+
wl12xx_debug(DEBUG_CRYPT, "CMD: 0x%x", cmd);
wl12xx_dump(DEBUG_CRYPT, "ADDR: ", addr, ETH_ALEN);
- wl12xx_dump(DEBUG_CRYPT, "LOCAL_ADDR: ", local_addr, ETH_ALEN);
wl12xx_debug(DEBUG_CRYPT, "Key: algo:0x%x, id:%d, len:%d flags 0x%x",
key->alg, key->keyidx, key->keylen, key->flags);
wl12xx_dump(DEBUG_CRYPT, "KEY: ", key->key, key->keylen);
- if (is_zero_ether_addr(addr))
- /* We dont support TX only encryption */
- return -EOPNOTSUPP;
-
mutex_lock(&wl->mutex);
switch (cmd) {
--
1.6.0.6
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH 0/6] wl12xx updates
2009-04-05 2:10 [PATCH 0/6] wl12xx updates Bob Copeland
` (5 preceding siblings ...)
2009-04-05 2:10 ` [PATCH 6/6] wl12xx: update set_key callback to match current API Bob Copeland
@ 2009-04-22 19:45 ` Kalle Valo
6 siblings, 0 replies; 18+ messages in thread
From: Kalle Valo @ 2009-04-22 19:45 UTC (permalink / raw)
To: Bob Copeland; +Cc: kalle.valo, linux-wireless
Bob Copeland <me@bobcopeland.com> writes:
> Hi Kalle,
Hi Bob,
> Here are some patches that bring wl12xx back to compiling state for
> current wireless-testing. This is on top of your original patch
> from your web page. Review at your leisure, and feel free to roll
> them all up into your eventual post for inclusion.
>
> Of note, possible incompatible changes are patch 2 which removes ssid
> from the join command, and patch 3 which changes the platform setup
> so it can compile on any platform. Only compile-tested for now.
Very cool! I took latest wl12xx code and applied your patches on top of
that. I managed to get working connection with 2.6.30-rc2-omap1 (from
linux-omap). So your patches work in a real device.
I'll send all the patches later tonight and try to convince John to take
wl12xx to wireless-testing.
--
Kalle Valo
^ permalink raw reply [flat|nested] 18+ messages in thread