/* * Minimum interval between two consecutive PREQs originated by the same * interface
*/ #define MESH_PREQ_MIN_INT 10 #define MESH_PERR_MIN_INT 100 #define MESH_DIAM_TRAVERSAL_TIME 50
#define MESH_RSSI_THRESHOLD 0
/* * A path will be refreshed if it is used PATH_REFRESH_TIME milliseconds * before timing out. This way it will remain ACTIVE and no data frames * will be unnecessarily held in the pending queue.
*/ #define MESH_PATH_REFRESH_TIME 1000 #define MESH_MIN_DISCOVERY_TIMEOUT (2 * MESH_DIAM_TRAVERSAL_TIME)
/* Default maximum number of established plinks per interface */ #define MESH_MAX_ESTAB_PLINKS 32
#define MESH_MAX_PREQ_RETRIES 4
#define MESH_SYNC_NEIGHBOR_OFFSET_MAX 50
#define MESH_DEFAULT_BEACON_INTERVAL 1000 /* in 1024 us units (=TUs) */ #define MESH_DEFAULT_DTIM_PERIOD 2 #define MESH_DEFAULT_AWAKE_WINDOW 10 /* in 1024 us units (=TUs) */
/* * check if basic rates are available otherwise use mandatory rates as * basic rates
*/ if (!setup->basic_rates) { struct ieee80211_supported_band *sband =
rdev->wiphy.bands[setup->chandef.chan->band];
if (setup->chandef.chan->band == NL80211_BAND_2GHZ) { int i;
/* * Older versions selected the mandatory rates for * 2.4 GHz as well, but were broken in that only * 1 Mbps was regarded as a mandatory rate. Keep * using just 1 Mbps as the default basic rate for * mesh to be interoperable with older versions.
*/ for (i = 0; i < sband->n_bitrates; i++) { if (sband->bitrates[i].bitrate == 10) {
setup->basic_rates = BIT(i); break;
}
}
} else {
setup->basic_rates = ieee80211_mandatory_rates(sband);
}
}
err = cfg80211_chandef_dfs_required(&rdev->wiphy,
&setup->chandef,
NL80211_IFTYPE_MESH_POINT); if (err < 0) return err; if (err > 0 && !setup->userspace_handles_dfs) return -EINVAL;
if (!cfg80211_reg_can_beacon(&rdev->wiphy, &setup->chandef,
NL80211_IFTYPE_MESH_POINT)) return -EINVAL;
int cfg80211_set_mesh_channel(struct cfg80211_registered_device *rdev, struct wireless_dev *wdev, struct cfg80211_chan_def *chandef)
{ int err;
/* * Workaround for libertas (only!), it puts the interface * into mesh mode but doesn't implement join_mesh. Instead, * it is configured via sysfs and then joins the mesh when * you set the channel. Note that the libertas mesh isn't * compatible with 802.11 mesh.
*/ if (rdev->ops->libertas_set_mesh_channel) { if (chandef->width != NL80211_CHAN_WIDTH_20_NOHT) return -EINVAL;
if (!netif_running(wdev->netdev)) return -ENETDOWN;
err = rdev_libertas_set_mesh_channel(rdev, wdev->netdev,
chandef->chan); if (!err)
wdev->u.mesh.chandef = *chandef;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.