diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00link.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00link.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00link.c b/drivers/net/wireless/rt2x00/rt2x00link.c index 917831689ccd..fe951dc9bacf 100644 --- a/drivers/net/wireless/rt2x00/rt2x00link.c +++ b/drivers/net/wireless/rt2x00/rt2x00link.c | |||
@@ -219,6 +219,7 @@ static void rt2x00lib_antenna_diversity_eval(struct rt2x00_dev *rt2x00dev) | |||
219 | static void rt2x00lib_antenna_diversity(struct rt2x00_dev *rt2x00dev) | 219 | static void rt2x00lib_antenna_diversity(struct rt2x00_dev *rt2x00dev) |
220 | { | 220 | { |
221 | struct link_ant *ant = &rt2x00dev->link.ant; | 221 | struct link_ant *ant = &rt2x00dev->link.ant; |
222 | unsigned int flags = ant->flags; | ||
222 | 223 | ||
223 | /* | 224 | /* |
224 | * Determine if software diversity is enabled for | 225 | * Determine if software diversity is enabled for |
@@ -226,13 +227,13 @@ static void rt2x00lib_antenna_diversity(struct rt2x00_dev *rt2x00dev) | |||
226 | * Always perform this check since within the link | 227 | * Always perform this check since within the link |
227 | * tuner interval the configuration might have changed. | 228 | * tuner interval the configuration might have changed. |
228 | */ | 229 | */ |
229 | ant->flags &= ~ANTENNA_RX_DIVERSITY; | 230 | flags &= ~ANTENNA_RX_DIVERSITY; |
230 | ant->flags &= ~ANTENNA_TX_DIVERSITY; | 231 | flags &= ~ANTENNA_TX_DIVERSITY; |
231 | 232 | ||
232 | if (rt2x00dev->default_ant.rx == ANTENNA_SW_DIVERSITY) | 233 | if (rt2x00dev->default_ant.rx == ANTENNA_SW_DIVERSITY) |
233 | ant->flags |= ANTENNA_RX_DIVERSITY; | 234 | flags |= ANTENNA_RX_DIVERSITY; |
234 | if (rt2x00dev->default_ant.tx == ANTENNA_SW_DIVERSITY) | 235 | if (rt2x00dev->default_ant.tx == ANTENNA_SW_DIVERSITY) |
235 | ant->flags |= ANTENNA_TX_DIVERSITY; | 236 | flags |= ANTENNA_TX_DIVERSITY; |
236 | 237 | ||
237 | if (!(ant->flags & ANTENNA_RX_DIVERSITY) && | 238 | if (!(ant->flags & ANTENNA_RX_DIVERSITY) && |
238 | !(ant->flags & ANTENNA_TX_DIVERSITY)) { | 239 | !(ant->flags & ANTENNA_TX_DIVERSITY)) { |
@@ -240,6 +241,9 @@ static void rt2x00lib_antenna_diversity(struct rt2x00_dev *rt2x00dev) | |||
240 | return; | 241 | return; |
241 | } | 242 | } |
242 | 243 | ||
244 | /* Update flags */ | ||
245 | ant->flags = flags; | ||
246 | |||
243 | /* | 247 | /* |
244 | * If we have only sampled the data over the last period | 248 | * If we have only sampled the data over the last period |
245 | * we should now harvest the data. Otherwise just evaluate | 249 | * we should now harvest the data. Otherwise just evaluate |