linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joshua Roys <Joshua.Roys@gtri.gatech.edu>
To: <linux-wireless@vger.kernel.org>
Cc: <Larry.Finger@lwfinger.net>
Subject: [PATCH 8/9] rtlwifi: ugly hack to enable feature disparity between subdrivers
Date: Mon, 7 May 2012 22:18:40 -0400	[thread overview]
Message-ID: <1336443521-15299-9-git-send-email-Joshua.Roys@gtri.gatech.edu> (raw)
In-Reply-To: <1336443521-15299-1-git-send-email-Joshua.Roys@gtri.gatech.edu>

Signed-off-by: Joshua Roys <Joshua.Roys@gtri.gatech.edu>
---
 drivers/net/wireless/rtlwifi/core.c |    2 +-
 drivers/net/wireless/rtlwifi/core.h |    2 +-
 drivers/net/wireless/rtlwifi/usb.c  |    7 ++++++-
 drivers/net/wireless/rtlwifi/wifi.h |    1 +
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c
index 278e9f9..3b1108c 100644
--- a/drivers/net/wireless/rtlwifi/core.c
+++ b/drivers/net/wireless/rtlwifi/core.c
@@ -1171,7 +1171,7 @@ static void rtl_op_flush(struct ieee80211_hw *hw, bool drop)
 		rtlpriv->intf_ops->flush(hw, drop);
 }
 
-const struct ieee80211_ops rtl_ops = {
+struct ieee80211_ops rtl_ops = {
 	.start = rtl_op_start,
 	.stop = rtl_op_stop,
 	.tx = rtl_op_tx,
diff --git a/drivers/net/wireless/rtlwifi/core.h b/drivers/net/wireless/rtlwifi/core.h
index 2fe46a1..a1d8227 100644
--- a/drivers/net/wireless/rtlwifi/core.h
+++ b/drivers/net/wireless/rtlwifi/core.h
@@ -39,7 +39,7 @@
 
 #define RTL_SUPPORTED_CTRL_FILTER	0xFF
 
-extern const struct ieee80211_ops rtl_ops;
+extern struct ieee80211_ops rtl_ops;
 void rtl_fw_cb(const struct firmware *firmware, void *context);
 
 #endif
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index 64f7464..15ffb97d 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -953,6 +953,11 @@ int __devinit rtl_usb_probe(struct usb_interface *intf,
 	struct rtl_priv *rtlpriv = NULL;
 	struct usb_device	*udev;
 	struct rtl_usb_priv *usb_priv;
+	struct rtl_hal_cfg *hal_cfg;
+
+	hal_cfg = (struct rtl_hal_cfg *)(id->driver_info);
+	if (hal_cfg->ops->modify_ieee80211_ops)
+		hal_cfg->ops->modify_ieee80211_ops(&rtl_ops);
 
 	hw = ieee80211_alloc_hw(sizeof(struct rtl_priv) +
 				sizeof(struct rtl_usb_priv), &rtl_ops);
@@ -977,7 +982,7 @@ int __devinit rtl_usb_probe(struct usb_interface *intf,
 	usb_set_intfdata(intf, hw);
 	/* init cfg & intf_ops */
 	rtlpriv->rtlhal.interface = INTF_USB;
-	rtlpriv->cfg = (struct rtl_hal_cfg *)(id->driver_info);
+	rtlpriv->cfg = hal_cfg;
 	rtlpriv->intf_ops = &rtl_usb_ops;
 	rtl_dbgp_flag_init(hw);
 	/* Init IO handler */
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h
index bd816ae..618f09c 100644
--- a/drivers/net/wireless/rtlwifi/wifi.h
+++ b/drivers/net/wireless/rtlwifi/wifi.h
@@ -1386,6 +1386,7 @@ struct rtl_tcb_desc {
 };
 
 struct rtl_hal_ops {
+	void (*modify_ieee80211_ops) (struct ieee80211_ops *ops);
 	int (*init_sw_vars) (struct ieee80211_hw *hw);
 	void (*deinit_sw_vars) (struct ieee80211_hw *hw);
 	void (*read_chip_version)(struct ieee80211_hw *hw);
-- 
1.7.4.1


  parent reply	other threads:[~2012-05-08  2:19 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-03  5:08 [WIP] rtlwifi: rtl8192su subdriver Joshua Roys
2012-05-03  5:10 ` [PATCH 1/9] rtlwifi: avoid race registering with mac80211 Joshua Roys
2012-05-03 17:10   ` Larry Finger
2012-05-03 17:21     ` Joshua Roys
2012-05-03 18:55       ` Larry Finger
2012-05-03  5:10 ` [PATCH 2/9] rtlwifi: don't pass a null pointer to fill_tx_desc Joshua Roys
2012-05-03  5:11 ` [PATCH 3/9] rtlwifi: fix typo Joshua Roys
2012-05-03  5:11 ` [PATCH 4/9] rtlwifi: fix the selection of the bulk in endpoint Joshua Roys
2012-05-03 16:07   ` Larry Finger
2012-05-03 16:47     ` Joshua Roys
2012-05-03  5:12 ` [PATCH 5/9] rtlwifi: check for all 8192Sx-family cards for efuse operations Joshua Roys
2012-05-03  5:12 ` [PATCH 6/9] rtlwifi: add short circuit in the receive path Joshua Roys
2012-05-03  5:13 ` [PATCH 7/9] rtlwifi: fail rtl_usb_start if any bulk in urbs fail Joshua Roys
2012-05-03  5:13 ` [PATCH 8/9] rtlwifi: ugly hack to enable feature disparity between subdrivers Joshua Roys
2012-05-03  5:15 ` [PATCH 9/9] [WIP] rtlwifi: add rtl8192su subdriver Joshua Roys
2012-05-08  2:18 ` [WIP v2] rtlwifi: " Joshua Roys
2012-05-08  2:18   ` [PATCH 1/9] rtlwifi: don't pass a null pointer to fill_tx_desc Joshua Roys
2012-05-08  2:18   ` [PATCH 2/9] rtlwifi: fix typo Joshua Roys
2012-05-08  2:18   ` [PATCH 3/9] rtlwifi: fix the selection of the bulk in endpoint Joshua Roys
2012-05-08  2:18   ` [PATCH 4/9] rtlwifi: check for all 8192Sx-family cards for efuse operations Joshua Roys
2012-05-08  2:18   ` [PATCH 5/9] rtlwifi: add short circuit in the receive path Joshua Roys
2012-05-08  2:18   ` [PATCH 6/9] rtlwifi: fail rtl_usb_start if any bulk in urbs fail Joshua Roys
2012-05-08  2:18   ` [PATCH 7/9] rtlwifi: mimic rtl_pci_stop and disable LEDs Joshua Roys
2012-05-08  2:18   ` Joshua Roys [this message]
2012-05-08  2:18   ` [PATCH 9/9] rtlwifi: add rtl8192su subdriver Joshua Roys

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=1336443521-15299-9-git-send-email-Joshua.Roys@gtri.gatech.edu \
    --to=joshua.roys@gtri.gatech.edu \
    --cc=Larry.Finger@lwfinger.net \
    --cc=linux-wireless@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).