2017-12-04 18:12:50

by Gabriele Gristina

[permalink] [raw]
Subject: [PATCH] rtl8187: add master mode

This patch add the master mode to rtl8187 wireless driver.

Signed-off-by: Gabriele Gristina <[email protected]>

---

diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c
b/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c
index 121b94f09714..8ef22f4382ae 100644
--- a/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c
+++ b/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c
@@ -1113,6 +1113,7 @@ static int rtl8187_add_interface(struct ieee80211_hw *dev,
goto exit;

switch (vif->type) {
+ case NL80211_IFTYPE_AP:
case NL80211_IFTYPE_STATION:
case NL80211_IFTYPE_ADHOC:
break;
@@ -1602,7 +1603,8 @@ static int rtl8187_probe(struct usb_interface *intf,
priv->rfkill_mask = RFKILL_MASK_8198;
}
dev->vif_data_size = sizeof(struct rtl8187_vif);
- dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
+ dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_AP) |
+ BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_ADHOC) ;

wiphy_ext_feature_set(dev->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);


2017-12-04 20:43:55

by Hin-Tak Leung

[permalink] [raw]
Subject: Re: [PATCH] rtl8187: add master mode

--------------------------------------------
On Mon, 4/12/17, Gabriele Gristina <[email protected]> wrote:

> This patch add the master mode to rtl8187
> wireless driver.

> Signed-off-by: Gabriele Gristina <[email protected]>

Your two-line patch is most likely completely wrong... master mode is not just the driver claiming (and lying...) to support master mode. At least, it is extremely imcomplete.

We discussed this briefly some years ago; my impression of the discussion was that devices supporting master modes need to have some specific features which are not found in low-end devices (rtl818x being such). Although some of these necessities were foresaw to be possible to be implemented in software (i.e. the rest of the kernel in the core wifi stack) in a later stage.

I think Larry can say a bit more in this matter.

Hin-Tak