Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134376
b: refs/heads/master
c: 547e4c2
h: refs/heads/master
v: v3
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Feb 9, 2009
1 parent acaff59 commit 3794134
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8c63c46d58c9dca6d0bfacfb41958c55d9b75ea0
refs/heads/master: 547e4c2e64d0be5e8491abb49ee6b0f0f8272de1
10 changes: 7 additions & 3 deletions trunk/drivers/net/wireless/ath9k/regd.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ const struct ieee80211_regdomain *ath9k_world_regdomain(struct ath_hal *ah)
}
}

/* Frequency is one where radar detection is required */
static bool ath9k_is_radar_freq(u16 center_freq)
{
return (center_freq >= 5260 && center_freq <= 5700);
}

/* Enable adhoc on 5 GHz if allowed by 11d */
static void ath9k_reg_apply_5ghz_adhoc_flags(struct wiphy *wiphy,
enum reg_set_by setby)
Expand Down Expand Up @@ -247,9 +253,7 @@ void ath9k_reg_apply_radar_flags(struct wiphy *wiphy)

for (i = 0; i < sband->n_channels; i++) {
ch = &sband->channels[i];
if (ch->center_freq < 5260)
continue;
if (ch->center_freq > 5700)
if (!ath9k_is_radar_freq(ch->center_freq))
continue;
/* We always enable radar detection/DFS on this
* frequency range. Additionally we also apply on
Expand Down

0 comments on commit 3794134

Please sign in to comment.