Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Rami Rosen" <ramirose@gmail.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, johannes@sipsolutions.net, j@w1.fi
Subject: [PATCH 2/2] zd1211rw: enable an AP that can't support fully PS clients (wireless-testing).
Date: Mon, 24 Nov 2008 09:44:41 +0200	[thread overview]
Message-ID: <eb3ff54b0811232344t665fe6abp9ca2be85cfcbd855@mail.gmail.com> (raw)

This patch enables master mode support in zd1211rw driver and enables
it to support the PS challenged mode when used in master mode.

It adds this functionality in the zd1211rw driver by adding support to
master mode (NL80211_IFTYPE_AP) in zd_op_add_interface() and in
zd_mac_alloc_hw() methods
of drivers/net/wireless/zd_mac.c.

In addition, the new boolean member of wiphy struct, ap_ps_challenged,
is initialized to true in zd_mac_alloc_hw().

Signed-off-by: Rami Rosen <ramirose@gmail.com>

diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c
b/drivers/net/wireless/zd1211rw/zd_mac.c
index 980acdf..d00cff2 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -721,6 +721,7 @@ static int zd_op_add_interface(struct ieee80211_hw *hw,
 		return -EOPNOTSUPP;

 	switch (conf->type) {
+	case NL80211_IFTYPE_AP:
 	case NL80211_IFTYPE_MONITOR:
 	case NL80211_IFTYPE_MESH_POINT:
 	case NL80211_IFTYPE_STATION:
@@ -972,10 +973,11 @@ struct ieee80211_hw *zd_mac_alloc_hw(struct
usb_interface *intf)
 		    IEEE80211_HW_SIGNAL_DB;

 	hw->wiphy->interface_modes =
+		BIT(NL80211_IFTYPE_AP) |
 		BIT(NL80211_IFTYPE_MESH_POINT) |
 		BIT(NL80211_IFTYPE_STATION) |
 		BIT(NL80211_IFTYPE_ADHOC);
-
+	hw->wiphy->ap_ps_challenged = true;
 	hw->max_signal = 100;
 	hw->queues = 1;
 	hw->extra_tx_headroom = sizeof(struct zd_ctrlset);

             reply	other threads:[~2008-11-24  7:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-24  7:44 Rami Rosen [this message]
2008-11-24 10:35 ` [PATCH 2/2] zd1211rw: enable an AP that can't support fully PS clients (wireless-testing) Johannes Berg
2008-11-24 11:09   ` Rami Rosen
2008-11-24 11:21     ` Johannes Berg
2008-11-24 11:38       ` Rami Rosen
2008-11-24 11:44         ` Johannes Berg
2008-11-27  9:06         ` Johannes Berg
2008-11-27  9:31           ` Rami Rosen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eb3ff54b0811232344t665fe6abp9ca2be85cfcbd855@mail.gmail.com \
    --to=ramirose@gmail.com \
    --cc=j@w1.fi \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox