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

Commit 345fb3f8 authored by John W. Linville's avatar John W. Linville
Browse files

Merge tag 'for-linville-20130318' of git://github.com/kvalo/ath6kl

parents 49c87cd1 243c0280
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -30,6 +30,15 @@ config ATH6KL_DEBUG
	---help---
	  Enables debug support

config ATH6KL_TRACING
	bool "Atheros ath6kl tracing support"
	depends on ATH6KL
	depends on EVENT_TRACING
	---help---
	  Select this to ath6kl use tracing infrastructure.

	  If unsure, say Y to make it easier to debug problems.

config ATH6KL_REGDOMAIN
	bool "Atheros ath6kl regdomain support"
	depends on ATH6KL
+5 −0
Original line number Diff line number Diff line
@@ -35,10 +35,15 @@ ath6kl_core-y += txrx.o
ath6kl_core-y += wmi.o
ath6kl_core-y += core.o
ath6kl_core-y += recovery.o

ath6kl_core-$(CONFIG_NL80211_TESTMODE) += testmode.o
ath6kl_core-$(CONFIG_ATH6KL_TRACING) += trace.o

obj-$(CONFIG_ATH6KL_SDIO) += ath6kl_sdio.o
ath6kl_sdio-y += sdio.o

obj-$(CONFIG_ATH6KL_USB) += ath6kl_usb.o
ath6kl_usb-y += usb.o

# for tracing framework to find trace.h
CFLAGS_trace.o := -I$(src)
+4 −3
Original line number Diff line number Diff line
@@ -402,7 +402,7 @@ static bool ath6kl_is_valid_iftype(struct ath6kl *ar, enum nl80211_iftype type,
	if (type == NL80211_IFTYPE_STATION ||
	    type == NL80211_IFTYPE_AP || type == NL80211_IFTYPE_ADHOC) {
		for (i = 0; i < ar->vif_max; i++) {
			if ((ar->avail_idx_map >> i) & BIT(0)) {
			if ((ar->avail_idx_map) & BIT(i)) {
				*if_idx = i;
				return true;
			}
@@ -412,7 +412,7 @@ static bool ath6kl_is_valid_iftype(struct ath6kl *ar, enum nl80211_iftype type,
	if (type == NL80211_IFTYPE_P2P_CLIENT ||
	    type == NL80211_IFTYPE_P2P_GO) {
		for (i = ar->max_norm_iface; i < ar->vif_max; i++) {
			if ((ar->avail_idx_map >> i) & BIT(0)) {
			if ((ar->avail_idx_map) & BIT(i)) {
				*if_idx = i;
				return true;
			}
@@ -1535,7 +1535,9 @@ static int ath6kl_cfg80211_del_iface(struct wiphy *wiphy,

	ath6kl_cfg80211_vif_stop(vif, test_bit(WMI_READY, &ar->flag));

	rtnl_lock();
	ath6kl_cfg80211_vif_cleanup(vif);
	rtnl_unlock();

	return 0;
}
@@ -3661,7 +3663,6 @@ struct wireless_dev *ath6kl_interface_add(struct ath6kl *ar, const char *name,
	vif->sme_state = SME_DISCONNECTED;
	set_bit(WLAN_ENABLED, &vif->flags);
	ar->wlan_pwr_state = WLAN_POWER_STATE_ON;
	set_bit(NETDEV_REGISTERED, &vif->flags);

	if (type == NL80211_IFTYPE_ADHOC)
		ar->ibss_if_active = true;
+0 −3
Original line number Diff line number Diff line
@@ -560,7 +560,6 @@ enum ath6kl_vif_state {
	WMM_ENABLED,
	NETQ_STOPPED,
	DTIM_EXPIRED,
	NETDEV_REGISTERED,
	CLEAR_BSSFILTER_ON_BEACON,
	DTIM_PERIOD_AVAIL,
	WLAN_ENABLED,
@@ -936,8 +935,6 @@ void aggr_recv_addba_req_evt(struct ath6kl_vif *vif, u8 tid, u16 seq_no,
			     u8 win_sz);
void ath6kl_wakeup_event(void *dev);

void ath6kl_reset_device(struct ath6kl *ar, u32 target_type,
			 bool wait_fot_compltn, bool cold_reset);
void ath6kl_init_control_info(struct ath6kl_vif *vif);
struct ath6kl_vif *ath6kl_vif_first(struct ath6kl *ar);
void ath6kl_cfg80211_vif_stop(struct ath6kl_vif *vif, bool wmi_ready);
+66 −6
Original line number Diff line number Diff line
@@ -56,6 +56,60 @@ int ath6kl_printk(const char *level, const char *fmt, ...)
}
EXPORT_SYMBOL(ath6kl_printk);

int ath6kl_info(const char *fmt, ...)
{
	struct va_format vaf = {
		.fmt = fmt,
	};
	va_list args;
	int ret;

	va_start(args, fmt);
	vaf.va = &args;
	ret = ath6kl_printk(KERN_INFO, "%pV", &vaf);
	trace_ath6kl_log_info(&vaf);
	va_end(args);

	return ret;
}
EXPORT_SYMBOL(ath6kl_info);

int ath6kl_err(const char *fmt, ...)
{
	struct va_format vaf = {
		.fmt = fmt,
	};
	va_list args;
	int ret;

	va_start(args, fmt);
	vaf.va = &args;
	ret = ath6kl_printk(KERN_ERR, "%pV", &vaf);
	trace_ath6kl_log_err(&vaf);
	va_end(args);

	return ret;
}
EXPORT_SYMBOL(ath6kl_err);

int ath6kl_warn(const char *fmt, ...)
{
	struct va_format vaf = {
		.fmt = fmt,
	};
	va_list args;
	int ret;

	va_start(args, fmt);
	vaf.va = &args;
	ret = ath6kl_printk(KERN_WARNING, "%pV", &vaf);
	trace_ath6kl_log_warn(&vaf);
	va_end(args);

	return ret;
}
EXPORT_SYMBOL(ath6kl_warn);

#ifdef CONFIG_ATH6KL_DEBUG

void ath6kl_dbg(enum ATH6K_DEBUG_MASK mask, const char *fmt, ...)
@@ -63,16 +117,16 @@ void ath6kl_dbg(enum ATH6K_DEBUG_MASK mask, const char *fmt, ...)
	struct va_format vaf;
	va_list args;

	if (!(debug_mask & mask))
		return;

	va_start(args, fmt);

	vaf.fmt = fmt;
	vaf.va = &args;

	if (debug_mask & mask)
		ath6kl_printk(KERN_DEBUG, "%pV", &vaf);

	trace_ath6kl_log_dbg(mask, &vaf);

	va_end(args);
}
EXPORT_SYMBOL(ath6kl_dbg);
@@ -87,6 +141,10 @@ void ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask,

		print_hex_dump_bytes(prefix, DUMP_PREFIX_OFFSET, buf, len);
	}

	/* tracing code doesn't like null strings :/ */
	trace_ath6kl_log_dbg_dump(msg ? msg : "", prefix ? prefix : "",
				  buf, len);
}
EXPORT_SYMBOL(ath6kl_dbg_dump);

@@ -1752,7 +1810,9 @@ int ath6kl_debug_init_fs(struct ath6kl *ar)
	debugfs_create_file("tgt_stats", S_IRUSR, ar->debugfs_phy, ar,
			    &fops_tgt_stats);

	debugfs_create_file("credit_dist_stats", S_IRUSR, ar->debugfs_phy, ar,
	if (ar->hif_type == ATH6KL_HIF_TYPE_SDIO)
		debugfs_create_file("credit_dist_stats", S_IRUSR,
				    ar->debugfs_phy, ar,
				    &fops_credit_dist_stats);

	debugfs_create_file("endpoint_stats", S_IRUSR | S_IWUSR,
Loading