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

Commit 01a28298 authored by John W. Linville's avatar John W. Linville
Browse files

Merge branch 'master' of...

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem

Conflicts:
	drivers/net/wireless/ath/ath9k/hw.c
parents d5ddb4a5 37752657
Loading
Loading
Loading
Loading
+99 −0
Original line number Diff line number Diff line
#
# This outlines the Linux authentication/association and
# deauthentication/disassociation flows.
#
# This can be converted into a diagram using the service
# at http://www.websequencediagrams.com/
#

participant userspace
participant mac80211
participant driver

alt authentication needed (not FT)
userspace->mac80211: authenticate

alt authenticated/authenticating already
mac80211->driver: sta_state(AP, not-exists)
mac80211->driver: bss_info_changed(clear BSSID)
else associated
note over mac80211,driver
like deauth/disassoc, without sending the
BA session stop & deauth/disassoc frames
end note
end

mac80211->driver: config(channel, non-HT)
mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap)
mac80211->driver: sta_state(AP, exists)

alt no probe request data known
mac80211->driver: TX directed probe request
driver->mac80211: RX probe response
end

mac80211->driver: TX auth frame
driver->mac80211: RX auth frame

alt WEP shared key auth
mac80211->driver: TX auth frame
driver->mac80211: RX auth frame
end

mac80211->driver: sta_state(AP, authenticated)
mac80211->userspace: RX auth frame

end

userspace->mac80211: associate
alt authenticated or associated
note over mac80211,driver: cleanup like for authenticate
end

alt not previously authenticated (FT)
mac80211->driver: config(channel, non-HT)
mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap)
mac80211->driver: sta_state(AP, exists)
mac80211->driver: sta_state(AP, authenticated)
end
mac80211->driver: TX assoc
driver->mac80211: RX assoc response
note over mac80211: init rate control
mac80211->driver: sta_state(AP, associated)

alt not using WPA
mac80211->driver: sta_state(AP, authorized)
end

mac80211->driver: set up QoS parameters

alt is HT channel
mac80211->driver: config(channel, HT params)
end

mac80211->driver: bss_info_changed(QoS, HT, associated with AID)
mac80211->userspace: associated

note left of userspace: associated now

alt using WPA
note over userspace
do 4-way-handshake
(data frames)
end note
userspace->mac80211: authorized
mac80211->driver: sta_state(AP, authorized)
end

userspace->mac80211: deauthenticate/disassociate
mac80211->driver: stop BA sessions
mac80211->driver: TX deauth/disassoc
mac80211->driver: flush frames
mac80211->driver: sta_state(AP,associated)
mac80211->driver: sta_state(AP,authenticated)
mac80211->driver: sta_state(AP,exists)
mac80211->driver: sta_state(AP,not-exists)
mac80211->driver: turn off powersave
mac80211->driver: bss_info_changed(clear BSSID, not associated, no QoS, ...)
mac80211->driver: config(non-HT channel type)
mac80211->userspace: disconnected
+11 −15
Original line number Diff line number Diff line
@@ -174,28 +174,24 @@ bool ath_hw_keyreset(struct ath_common *common, u16 entry);
void ath_hw_cycle_counters_update(struct ath_common *common);
int32_t ath_hw_get_listen_time(struct ath_common *common);

extern __printf(2, 3) void ath_printk(const char *level, const char *fmt, ...);

#define _ath_printk(level, common, fmt, ...)			\
do {								\
	__always_unused struct ath_common *unused = common;	\
	ath_printk(level, fmt, ##__VA_ARGS__);			\
} while (0)
__printf(3, 4)
void ath_printk(const char *level, const struct ath_common *common,
		const char *fmt, ...);

#define ath_emerg(common, fmt, ...)				\
	_ath_printk(KERN_EMERG, common, fmt, ##__VA_ARGS__)
	ath_printk(KERN_EMERG, common, fmt, ##__VA_ARGS__)
#define ath_alert(common, fmt, ...)				\
	_ath_printk(KERN_ALERT, common, fmt, ##__VA_ARGS__)
	ath_printk(KERN_ALERT, common, fmt, ##__VA_ARGS__)
#define ath_crit(common, fmt, ...)				\
	_ath_printk(KERN_CRIT, common, fmt, ##__VA_ARGS__)
	ath_printk(KERN_CRIT, common, fmt, ##__VA_ARGS__)
#define ath_err(common, fmt, ...)				\
	_ath_printk(KERN_ERR, common, fmt, ##__VA_ARGS__)
	ath_printk(KERN_ERR, common, fmt, ##__VA_ARGS__)
#define ath_warn(common, fmt, ...)				\
	_ath_printk(KERN_WARNING, common, fmt, ##__VA_ARGS__)
	ath_printk(KERN_WARNING, common, fmt, ##__VA_ARGS__)
#define ath_notice(common, fmt, ...)				\
	_ath_printk(KERN_NOTICE, common, fmt, ##__VA_ARGS__)
	ath_printk(KERN_NOTICE, common, fmt, ##__VA_ARGS__)
#define ath_info(common, fmt, ...)				\
	_ath_printk(KERN_INFO, common, fmt, ##__VA_ARGS__)
	ath_printk(KERN_INFO, common, fmt, ##__VA_ARGS__)

/**
 * enum ath_debug_level - atheros wireless debug level
@@ -256,7 +252,7 @@ enum ATH_DEBUG {
#define ath_dbg(common, dbg_mask, fmt, ...)				\
do {									\
	if ((common)->debug_mask & ATH_DBG_##dbg_mask)			\
		_ath_printk(KERN_DEBUG, common, fmt, ##__VA_ARGS__);	\
		ath_printk(KERN_DEBUG, common, fmt, ##__VA_ARGS__);	\
} while (0)

#define ATH_DBG_WARN(foo, arg...) WARN(foo, arg)
+2 −1
Original line number Diff line number Diff line
#------------------------------------------------------------------------------
# Copyright (c) 2004-2010 Atheros Communications Inc.
# Copyright (c) 2004-2011 Atheros Communications Inc.
# Copyright (c) 2011-2012 Qualcomm Atheros, Inc.
# All rights reserved.
#
#
+4 −3
Original line number Diff line number Diff line
/*
 * Copyright (c) 2004-2011 Atheros Communications Inc.
 * Copyright (c) 2011-2012 Qualcomm Atheros, Inc.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
+24 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2004-2011 Atheros Communications Inc.
 * Copyright (c) 2011 Qualcomm Atheros, Inc.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
@@ -222,6 +223,29 @@ struct ath6kl_bmi_target_info {
	__le32 type;         /* target type */
} __packed;

#define ath6kl_bmi_write_hi32(ar, item, val)				\
	({								\
		u32 addr;						\
		__le32 v;						\
									\
		addr = ath6kl_get_hi_item_addr(ar, HI_ITEM(item));	\
		v = cpu_to_le32(val);					\
		ath6kl_bmi_write(ar, addr, (u8 *) &v, sizeof(v));	\
	})

#define ath6kl_bmi_read_hi32(ar, item, val)				\
	({								\
		u32 addr, *check_type = val;				\
		__le32 tmp;						\
		int ret;						\
									\
		(void) (check_type == val);				\
		addr = ath6kl_get_hi_item_addr(ar, HI_ITEM(item));	\
		ret = ath6kl_bmi_read(ar, addr, (u8 *) &tmp, 4);	\
		*val = le32_to_cpu(tmp);				\
		ret;							\
	})

int ath6kl_bmi_init(struct ath6kl *ar);
void ath6kl_bmi_cleanup(struct ath6kl *ar);
void ath6kl_bmi_reset(struct ath6kl *ar);
Loading