diff options
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/cfg80211.h | 2 | ||||
| -rw-r--r-- | include/net/regulatory.h | 21 |
2 files changed, 15 insertions, 8 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 8c9ba44fb7cf..bfa9a0c7b2d7 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
| @@ -151,6 +151,7 @@ enum ieee80211_channel_flags { | |||
| 151 | * @dfs_state: current state of this channel. Only relevant if radar is required | 151 | * @dfs_state: current state of this channel. Only relevant if radar is required |
| 152 | * on this channel. | 152 | * on this channel. |
| 153 | * @dfs_state_entered: timestamp (jiffies) when the dfs state was entered. | 153 | * @dfs_state_entered: timestamp (jiffies) when the dfs state was entered. |
| 154 | * @dfs_cac_ms: DFS CAC time in milliseconds, this is valid for DFS channels. | ||
| 154 | */ | 155 | */ |
| 155 | struct ieee80211_channel { | 156 | struct ieee80211_channel { |
| 156 | enum ieee80211_band band; | 157 | enum ieee80211_band band; |
| @@ -165,6 +166,7 @@ struct ieee80211_channel { | |||
| 165 | int orig_mag, orig_mpwr; | 166 | int orig_mag, orig_mpwr; |
| 166 | enum nl80211_dfs_state dfs_state; | 167 | enum nl80211_dfs_state dfs_state; |
| 167 | unsigned long dfs_state_entered; | 168 | unsigned long dfs_state_entered; |
| 169 | unsigned int dfs_cac_ms; | ||
| 168 | }; | 170 | }; |
| 169 | 171 | ||
| 170 | /** | 172 | /** |
diff --git a/include/net/regulatory.h b/include/net/regulatory.h index b07cdc9fa454..75fc1f5a948d 100644 --- a/include/net/regulatory.h +++ b/include/net/regulatory.h | |||
| @@ -155,6 +155,7 @@ struct ieee80211_reg_rule { | |||
| 155 | struct ieee80211_freq_range freq_range; | 155 | struct ieee80211_freq_range freq_range; |
| 156 | struct ieee80211_power_rule power_rule; | 156 | struct ieee80211_power_rule power_rule; |
| 157 | u32 flags; | 157 | u32 flags; |
| 158 | u32 dfs_cac_ms; | ||
| 158 | }; | 159 | }; |
| 159 | 160 | ||
| 160 | struct ieee80211_regdomain { | 161 | struct ieee80211_regdomain { |
| @@ -172,14 +173,18 @@ struct ieee80211_regdomain { | |||
| 172 | #define DBM_TO_MBM(gain) ((gain) * 100) | 173 | #define DBM_TO_MBM(gain) ((gain) * 100) |
| 173 | #define MBM_TO_DBM(gain) ((gain) / 100) | 174 | #define MBM_TO_DBM(gain) ((gain) / 100) |
| 174 | 175 | ||
| 175 | #define REG_RULE(start, end, bw, gain, eirp, reg_flags) \ | 176 | #define REG_RULE_EXT(start, end, bw, gain, eirp, dfs_cac, reg_flags) \ |
| 176 | { \ | 177 | { \ |
| 177 | .freq_range.start_freq_khz = MHZ_TO_KHZ(start), \ | 178 | .freq_range.start_freq_khz = MHZ_TO_KHZ(start), \ |
| 178 | .freq_range.end_freq_khz = MHZ_TO_KHZ(end), \ | 179 | .freq_range.end_freq_khz = MHZ_TO_KHZ(end), \ |
| 179 | .freq_range.max_bandwidth_khz = MHZ_TO_KHZ(bw), \ | 180 | .freq_range.max_bandwidth_khz = MHZ_TO_KHZ(bw), \ |
| 180 | .power_rule.max_antenna_gain = DBI_TO_MBI(gain),\ | 181 | .power_rule.max_antenna_gain = DBI_TO_MBI(gain), \ |
| 181 | .power_rule.max_eirp = DBM_TO_MBM(eirp), \ | 182 | .power_rule.max_eirp = DBM_TO_MBM(eirp), \ |
| 182 | .flags = reg_flags, \ | 183 | .flags = reg_flags, \ |
| 184 | .dfs_cac_ms = dfs_cac, \ | ||
| 183 | } | 185 | } |
| 184 | 186 | ||
| 187 | #define REG_RULE(start, end, bw, gain, eirp, reg_flags) \ | ||
| 188 | REG_RULE_EXT(start, end, bw, gain, eirp, 0, reg_flags) | ||
| 189 | |||
| 185 | #endif | 190 | #endif |
