Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1572c5e authored by Sujith's avatar Sujith Committed by John W. Linville
Browse files

ath9k_htc: Fix symbol collision with ath9k

parent c5a079f4
Loading
Loading
Loading
Loading
+11 −11
Original line number Original line Diff line number Diff line
@@ -41,7 +41,7 @@
	((((u32)(_h)) << 22) | (((u32)(_l)) >> 10))
	((((u32)(_h)) << 22) | (((u32)(_l)) >> 10))


extern struct ieee80211_ops ath9k_htc_ops;
extern struct ieee80211_ops ath9k_htc_ops;
extern int modparam_nohwcrypt;
extern int htc_modparam_nohwcrypt;


enum htc_phymode {
enum htc_phymode {
	HTC_MODE_AUTO		= 0,
	HTC_MODE_AUTO		= 0,
@@ -408,7 +408,7 @@ void ath9k_tx_cleanup(struct ath9k_htc_priv *priv);
bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv,
bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv,
			 enum ath9k_tx_queue_subtype qtype);
			 enum ath9k_tx_queue_subtype qtype);
int get_hw_qnum(u16 queue, int *hwq_map);
int get_hw_qnum(u16 queue, int *hwq_map);
int ath_txq_update(struct ath9k_htc_priv *priv, int qnum,
int ath_htc_txq_update(struct ath9k_htc_priv *priv, int qnum,
		       struct ath9k_tx_queue_info *qinfo);
		       struct ath9k_tx_queue_info *qinfo);


int ath9k_rx_init(struct ath9k_htc_priv *priv);
int ath9k_rx_init(struct ath9k_htc_priv *priv);
@@ -427,15 +427,15 @@ void ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug);
int ath9k_htc_resume(struct htc_target *htc_handle);
int ath9k_htc_resume(struct htc_target *htc_handle);
#endif
#endif
#ifdef CONFIG_ATH9K_HTC_DEBUGFS
#ifdef CONFIG_ATH9K_HTC_DEBUGFS
int ath9k_debug_create_root(void);
int ath9k_htc_debug_create_root(void);
void ath9k_debug_remove_root(void);
void ath9k_htc_debug_remove_root(void);
int ath9k_init_debug(struct ath_hw *ah);
int ath9k_htc_init_debug(struct ath_hw *ah);
void ath9k_exit_debug(struct ath_hw *ah);
void ath9k_htc_exit_debug(struct ath_hw *ah);
#else
#else
static inline int ath9k_debug_create_root(void) { return 0; };
static inline int ath9k_htc_debug_create_root(void) { return 0; };
static inline void ath9k_debug_remove_root(void) {};
static inline void ath9k_htc_debug_remove_root(void) {};
static inline int ath9k_init_debug(struct ath_hw *ah) { return 0; };
static inline int ath9k_htc_init_debug(struct ath_hw *ah) { return 0; };
static inline void ath9k_exit_debug(struct ath_hw *ah) {};
static inline void ath9k_htc_exit_debug(struct ath_hw *ah) {};
#endif /* CONFIG_ATH9K_HTC_DEBUGFS */
#endif /* CONFIG_ATH9K_HTC_DEBUGFS */


#endif /* HTC_H */
#endif /* HTC_H */
+8 −8
Original line number Original line Diff line number Diff line
@@ -24,8 +24,8 @@ static unsigned int ath9k_debug = ATH_DBG_DEFAULT;
module_param_named(debug, ath9k_debug, uint, 0);
module_param_named(debug, ath9k_debug, uint, 0);
MODULE_PARM_DESC(debug, "Debugging mask");
MODULE_PARM_DESC(debug, "Debugging mask");


int modparam_nohwcrypt;
int htc_modparam_nohwcrypt;
module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444);
module_param_named(nohwcrypt, htc_modparam_nohwcrypt, int, 0444);
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption");
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption");


#define CHAN2G(_freq, _idx)  { \
#define CHAN2G(_freq, _idx)  { \
@@ -93,7 +93,7 @@ static int ath9k_htc_wait_for_target(struct ath9k_htc_priv *priv)


static void ath9k_deinit_priv(struct ath9k_htc_priv *priv)
static void ath9k_deinit_priv(struct ath9k_htc_priv *priv)
{
{
	ath9k_exit_debug(priv->ah);
	ath9k_htc_exit_debug(priv->ah);
	ath9k_hw_deinit(priv->ah);
	ath9k_hw_deinit(priv->ah);
	tasklet_kill(&priv->wmi_tasklet);
	tasklet_kill(&priv->wmi_tasklet);
	tasklet_kill(&priv->rx_tasklet);
	tasklet_kill(&priv->rx_tasklet);
@@ -474,7 +474,7 @@ static int ath9k_init_priv(struct ath9k_htc_priv *priv, u16 devid)
		goto err_hw;
		goto err_hw;
	}
	}


	ret = ath9k_init_debug(ah);
	ret = ath9k_htc_init_debug(ah);
	if (ret) {
	if (ret) {
		ath_print(common, ATH_DBG_FATAL,
		ath_print(common, ATH_DBG_FATAL,
			  "Unable to create debugfs files\n");
			  "Unable to create debugfs files\n");
@@ -492,7 +492,7 @@ static int ath9k_init_priv(struct ath9k_htc_priv *priv, u16 devid)
	return 0;
	return 0;


err_queues:
err_queues:
	ath9k_exit_debug(ah);
	ath9k_htc_exit_debug(ah);
err_debug:
err_debug:
	ath9k_hw_deinit(ah);
	ath9k_hw_deinit(ah);
err_hw:
err_hw:
@@ -678,7 +678,7 @@ static int __init ath9k_htc_init(void)
{
{
	int error;
	int error;


	error = ath9k_debug_create_root();
	error = ath9k_htc_debug_create_root();
	if (error < 0) {
	if (error < 0) {
		printk(KERN_ERR
		printk(KERN_ERR
			"ath9k_htc: Unable to create debugfs root: %d\n",
			"ath9k_htc: Unable to create debugfs root: %d\n",
@@ -698,7 +698,7 @@ static int __init ath9k_htc_init(void)
	return 0;
	return 0;


err_usb:
err_usb:
	ath9k_debug_remove_root();
	ath9k_htc_debug_remove_root();
err_dbg:
err_dbg:
	return error;
	return error;
}
}
@@ -707,7 +707,7 @@ module_init(ath9k_htc_init);
static void __exit ath9k_htc_exit(void)
static void __exit ath9k_htc_exit(void)
{
{
	ath9k_hif_usb_exit();
	ath9k_hif_usb_exit();
	ath9k_debug_remove_root();
	ath9k_htc_debug_remove_root();
	printk(KERN_INFO "ath9k_htc: Driver unloaded\n");
	printk(KERN_INFO "ath9k_htc: Driver unloaded\n");
}
}
module_exit(ath9k_htc_exit);
module_exit(ath9k_htc_exit);
+7 −7
Original line number Original line Diff line number Diff line
@@ -595,7 +595,7 @@ static const struct file_operations fops_recv = {
	.owner = THIS_MODULE
	.owner = THIS_MODULE
};
};


int ath9k_init_debug(struct ath_hw *ah)
int ath9k_htc_init_debug(struct ath_hw *ah)
{
{
	struct ath_common *common = ath9k_hw_common(ah);
	struct ath_common *common = ath9k_hw_common(ah);
	struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv;
	struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv;
@@ -630,11 +630,11 @@ int ath9k_init_debug(struct ath_hw *ah)
	return 0;
	return 0;


err:
err:
	ath9k_exit_debug(ah);
	ath9k_htc_exit_debug(ah);
	return -ENOMEM;
	return -ENOMEM;
}
}


void ath9k_exit_debug(struct ath_hw *ah)
void ath9k_htc_exit_debug(struct ath_hw *ah)
{
{
	struct ath_common *common = ath9k_hw_common(ah);
	struct ath_common *common = ath9k_hw_common(ah);
	struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv;
	struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv;
@@ -645,7 +645,7 @@ void ath9k_exit_debug(struct ath_hw *ah)
	debugfs_remove(priv->debug.debugfs_phy);
	debugfs_remove(priv->debug.debugfs_phy);
}
}


int ath9k_debug_create_root(void)
int ath9k_htc_debug_create_root(void)
{
{
	ath9k_debugfs_root = debugfs_create_dir(KBUILD_MODNAME, NULL);
	ath9k_debugfs_root = debugfs_create_dir(KBUILD_MODNAME, NULL);
	if (!ath9k_debugfs_root)
	if (!ath9k_debugfs_root)
@@ -654,7 +654,7 @@ int ath9k_debug_create_root(void)
	return 0;
	return 0;
}
}


void ath9k_debug_remove_root(void)
void ath9k_htc_debug_remove_root(void)
{
{
	debugfs_remove(ath9k_debugfs_root);
	debugfs_remove(ath9k_debugfs_root);
	ath9k_debugfs_root = NULL;
	ath9k_debugfs_root = NULL;
@@ -1358,7 +1358,7 @@ static int ath9k_htc_conf_tx(struct ieee80211_hw *hw, u16 queue,
		  queue, qnum, params->aifs, params->cw_min,
		  queue, qnum, params->aifs, params->cw_min,
		  params->cw_max, params->txop);
		  params->cw_max, params->txop);


	ret = ath_txq_update(priv, qnum, &qi);
	ret = ath_htc_txq_update(priv, qnum, &qi);
	if (ret)
	if (ret)
		ath_print(common, ATH_DBG_FATAL, "TXQ Update failed\n");
		ath_print(common, ATH_DBG_FATAL, "TXQ Update failed\n");


@@ -1377,7 +1377,7 @@ static int ath9k_htc_set_key(struct ieee80211_hw *hw,
	struct ath_common *common = ath9k_hw_common(priv->ah);
	struct ath_common *common = ath9k_hw_common(priv->ah);
	int ret = 0;
	int ret = 0;


	if (modparam_nohwcrypt)
	if (htc_modparam_nohwcrypt)
		return -ENOSPC;
		return -ENOSPC;


	mutex_lock(&priv->mutex);
	mutex_lock(&priv->mutex);
+2 −2
Original line number Original line Diff line number Diff line
@@ -36,7 +36,7 @@ int get_hw_qnum(u16 queue, int *hwq_map)
	}
	}
}
}


int ath_txq_update(struct ath9k_htc_priv *priv, int qnum,
int ath_htc_txq_update(struct ath9k_htc_priv *priv, int qnum,
		       struct ath9k_tx_queue_info *qinfo)
		       struct ath9k_tx_queue_info *qinfo)
{
{
	struct ath_hw *ah = priv->ah;
	struct ath_hw *ah = priv->ah;