diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2010-12-13 06:35:17 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-13 15:23:35 -0500 |
commit | 0b7fde54f94979edc67bbf86b5adba702ebfefe8 (patch) | |
tree | 90c21b9040c5c43c98d931ca7ca14328412a4a89 /drivers/net/wireless/rt2x00/rt2x00.h | |
parent | dbba306f2ae574450a7a5133d6637fe6f5fafc72 (diff) |
rt2x00: Protect queue control with mutex
Add wrapper functions in rt2x00queue.c to
start & stop queues. This control must be protected
using a mutex.
Queues can also be paused which will halt the flow
of packets between the driver and mac80211. This doesn't
require a mutex protection.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index b72f59ba4e1e..ac7c3d80300e 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -1073,6 +1073,58 @@ struct data_queue *rt2x00queue_get_queue(struct rt2x00_dev *rt2x00dev, | |||
1073 | struct queue_entry *rt2x00queue_get_entry(struct data_queue *queue, | 1073 | struct queue_entry *rt2x00queue_get_entry(struct data_queue *queue, |
1074 | enum queue_index index); | 1074 | enum queue_index index); |
1075 | 1075 | ||
1076 | /** | ||
1077 | * rt2x00queue_pause_queue - Pause a data queue | ||
1078 | * @queue: Pointer to &struct data_queue. | ||
1079 | * | ||
1080 | * This function will pause the data queue locally, preventing | ||
1081 | * new frames to be added to the queue (while the hardware is | ||
1082 | * still allowed to run). | ||
1083 | */ | ||
1084 | void rt2x00queue_pause_queue(struct data_queue *queue); | ||
1085 | |||
1086 | /** | ||
1087 | * rt2x00queue_unpause_queue - unpause a data queue | ||
1088 | * @queue: Pointer to &struct data_queue. | ||
1089 | * | ||
1090 | * This function will unpause the data queue locally, allowing | ||
1091 | * new frames to be added to the queue again. | ||
1092 | */ | ||
1093 | void rt2x00queue_unpause_queue(struct data_queue *queue); | ||
1094 | |||
1095 | /** | ||
1096 | * rt2x00queue_start_queue - Start a data queue | ||
1097 | * @queue: Pointer to &struct data_queue. | ||
1098 | * | ||
1099 | * This function will start handling all pending frames in the queue. | ||
1100 | */ | ||
1101 | void rt2x00queue_start_queue(struct data_queue *queue); | ||
1102 | |||
1103 | /** | ||
1104 | * rt2x00queue_stop_queue - Halt a data queue | ||
1105 | * @queue: Pointer to &struct data_queue. | ||
1106 | * | ||
1107 | * This function will stop all pending frames in the queue. | ||
1108 | */ | ||
1109 | void rt2x00queue_stop_queue(struct data_queue *queue); | ||
1110 | |||
1111 | /** | ||
1112 | * rt2x00queue_start_queues - Start all data queues | ||
1113 | * @rt2x00dev: Pointer to &struct rt2x00_dev. | ||
1114 | * | ||
1115 | * This function will loop through all available queues to start them | ||
1116 | */ | ||
1117 | void rt2x00queue_start_queues(struct rt2x00_dev *rt2x00dev); | ||
1118 | |||
1119 | /** | ||
1120 | * rt2x00queue_stop_queues - Halt all data queues | ||
1121 | * @rt2x00dev: Pointer to &struct rt2x00_dev. | ||
1122 | * | ||
1123 | * This function will loop through all available queues to stop | ||
1124 | * any pending frames. | ||
1125 | */ | ||
1126 | void rt2x00queue_stop_queues(struct rt2x00_dev *rt2x00dev); | ||
1127 | |||
1076 | /* | 1128 | /* |
1077 | * Debugfs handlers. | 1129 | * Debugfs handlers. |
1078 | */ | 1130 | */ |