Linux wireless drivers development
 help / color / mirror / Atom feed
From: Jouni Malinen <j@w1.fi>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH] mac80211_hwsim: Claim support for TDLS
Date: Sun, 23 Oct 2011 22:45:27 +0300	[thread overview]
Message-ID: <20111023194527.GA18416@jm.kir.nu> (raw)

Signed-off-by: Jouni Malinen <j@w1.fi>
---
 drivers/net/wireless/mac80211_hwsim.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Note: Before even thinking of testing this, please take a look at the
RFC patch for handling supported rates configuration unless you want to
crash and burn your kernel.. Anyway, it is useful to get hwsim ready for
TDLS testing and the mac80211 issue is not specific to hwsim and people
who use hwsim are normally capable of patching kernel and familiar with
this mailing list in the first place.. ;-)

With the RFC "mac80211: Fix STA supported rate configuration with dummy
entry" patch in place, I was able to get the TDLS link running in
mac80211_hwsim environment between two WPA2 stations.


diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 68455a2..477100d 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -1747,6 +1747,8 @@ static int __init init_mac80211_hwsim(void)
 			    IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS |
 			    IEEE80211_HW_AMPDU_AGGREGATION;
 
+		hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS;
+
 		/* ask mac80211 to reserve space for magic */
 		hw->vif_data_size = sizeof(struct hwsim_vif_priv);
 		hw->sta_data_size = sizeof(struct hwsim_sta_priv);
-- 
1.7.4.1


-- 
Jouni Malinen                                            PGP id EFC895FA

                 reply	other threads:[~2011-10-23 19:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20111023194527.GA18416@jm.kir.nu \
    --to=j@w1.fi \
    --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