Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lede-mikrotik
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johannes Rudolph
lede-mikrotik
Commits
b9489c59
Commit
b9489c59
authored
16 years ago
by
Florian Fainelli
Browse files
Options
Downloads
Patches
Plain Diff
Correctly set b/g rate tables for mac80211, thanks sn9
SVN-Revision: 12445
parent
701d82cc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
package/acx-mac80211/patches/002-rate_definitions.patch
+108
-0
108 additions, 0 deletions
package/acx-mac80211/patches/002-rate_definitions.patch
with
108 additions
and
0 deletions
package/acx-mac80211/patches/002-rate_definitions.patch
0 → 100644
+
108
−
0
View file @
b9489c59
diff --git a/common.c b/common.c
index c3a288d..9c607de 100644
--- a/common.c
+++ b/common.c
@@ -1451,60 +1451,66 @@
void acx_free_modes(acx_device_t * adev)
// adev->modes = NULL;
}
-/*
-#define RATETAB_ENT(_rate, _rateid, _flags) \
- { \
- .rate = (_rate), \
- .val = (_rateid), \
- .val2 = (_rateid), \
- .flags = (_flags), \
- }
-*/
-
static struct ieee80211_rate acx_rates[] = {
{ .bitrate = 10, .hw_value = 0, .flags = IEEE80211_RATE_SHORT_PREAMBLE },
{ .bitrate = 20, .hw_value = 1, .flags = IEEE80211_RATE_SHORT_PREAMBLE },
{ .bitrate = 55, .hw_value = 2, .flags = IEEE80211_RATE_SHORT_PREAMBLE },
{ .bitrate = 110, .hw_value = 3, .flags = IEEE80211_RATE_SHORT_PREAMBLE },
- { .bitrate = 60, .hw_value = 4, },
- { .bitrate = 90, .hw_value = 5, },
- { .bitrate = 120, .hw_value = 6, },
- { .bitrate = 180, .hw_value = 7, },
- { .bitrate = 240, .hw_value = 8, },
- { .bitrate = 360, .hw_value = 9, },
- { .bitrate = 480, .hw_value = 10, },
- { .bitrate = 540, .hw_value = 11, },
+ { .bitrate = 60, .hw_value = 4, .flags = 0 },
+ { .bitrate = 90, .hw_value = 5, .flags = 0 },
+ { .bitrate = 120, .hw_value = 6, .flags = 0 },
+ { .bitrate = 180, .hw_value = 7, .flags = 0 },
+ { .bitrate = 240, .hw_value = 8, .flags = 0 },
+ { .bitrate = 360, .hw_value = 9, .flags = 0 },
+ { .bitrate = 480, .hw_value = 10, .flags = 0 },
+ { .bitrate = 540, .hw_value = 11, .flags = 0 },
};
+#define CHAN4G(_channel, _freq, _flags) { \
+ .band = IEEE80211_BAND_2GHZ, \
+ .center_freq = (_freq), \
+ .hw_value = (_channel), \
+ .flags = (_flags), \
+ .max_antenna_gain = 0, \
+ .max_power = 30, \
+}
static struct ieee80211_channel channels[] = {
- { .center_freq = 2412, .hw_value = 1, },
- { .center_freq = 2417, .hw_value = 2, },
- { .center_freq = 2422, .hw_value = 3, },
- { .center_freq = 2427, .hw_value = 4, },
- { .center_freq = 2432, .hw_value = 5, },
- { .center_freq = 2437, .hw_value = 6, },
- { .center_freq = 2442, .hw_value = 7, },
- { .center_freq = 2447, .hw_value = 8, },
- { .center_freq = 2452, .hw_value = 9, },
- { .center_freq = 2457, .hw_value = 10, },
- { .center_freq = 2462, .hw_value = 11, },
- { .center_freq = 2467, .hw_value = 12, },
- { .center_freq = 2472, .hw_value = 13, },
- { .center_freq = 2484, .hw_value = 14, },
+ CHAN4G(1, 2412, 0),
+ CHAN4G(2, 2417, 0),
+ CHAN4G(3, 2422, 0),
+ CHAN4G(4, 2427, 0),
+ CHAN4G(5, 2432, 0),
+ CHAN4G(6, 2437, 0),
+ CHAN4G(7, 2442, 0),
+ CHAN4G(8, 2447, 0),
+ CHAN4G(9, 2452, 0),
+ CHAN4G(10, 2457, 0),
+ CHAN4G(11, 2462, 0),
+ CHAN4G(12, 2467, 0),
+ CHAN4G(13, 2472, 0),
+ CHAN4G(14, 2484, 0),
};
+#undef CHAN4G
+
+#define acx_b_ratetable (acx_rates + 0)
+#define acx_b_ratetable_size 4
+#define acx_g_ratetable (acx_rates + 0)
+#define acx_g_ratetable_size 12
static struct ieee80211_supported_band g_band_2GHz = {
+ .band = IEEE80211_BAND_2GHZ,
.channels = channels,
.n_channels = ARRAY_SIZE(channels),
- .bitrates = acx_rates,
- .n_bitrates = 12,
+ .bitrates = acx_b_ratetable,
+ .n_bitrates = acx_g_ratetable_size,
};
static struct ieee80211_supported_band b_band_2GHz = {
+ .band = IEEE80211_BAND_2GHZ,
.channels = channels,
.n_channels = ARRAY_SIZE(channels),
- .bitrates = acx_rates,
- .n_bitrates = 4,
+ .bitrates = acx_g_ratetable,
+ .n_bitrates = acx_b_ratetable_size,
};
int acx_setup_modes(acx_device_t * adev)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment