Skip to content

Commit 96a07ee

Browse files
authored
Mark more things unstable (#4811)
* esp-radio: Mark wifi::sta::eap unstable * Mark RxControlInfo unstable, RxControlInfo::from_raw is no longer public and mark csi, event and sniffer modules unstable * changelog * review * another review
1 parent bb034a4 commit 96a07ee

File tree

4 files changed

+24
-8
lines changed

4 files changed

+24
-8
lines changed

esp-radio/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3535
- `esp-alloc` dependency no longer enables default features (#4721)
3636
- `sys-logs` feature has been renamed to `print-logs-from-driver` and has been marked unstable (#4810)
3737
- Unstable features now require the `unstable` feature flag to be enabled (#4810)
38+
- `RxControlInfo` is unstable, `RxControlInfo::from_raw()` is no longer public (#4811)
39+
- `event`, `sniffer`, and `csi` modules are marked unstable (#4811)
3840

3941
### Fixed
4042

esp-radio/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,13 @@ pub mod wifi;
212212

213213
unstable_module! {
214214
#[cfg(feature = "esp-now")]
215+
#[cfg_attr(docsrs, doc(cfg(feature = "esp-now")))]
215216
pub mod esp_now;
216217
#[cfg(feature = "ble")]
218+
#[cfg_attr(docsrs, doc(cfg(feature = "ble")))]
217219
pub mod ble;
218220
#[cfg(feature = "ieee802154")]
221+
#[cfg_attr(docsrs, doc(cfg(feature = "ieee802154")))]
219222
pub mod ieee802154;
220223
}
221224

esp-radio/src/wifi/mod.rs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,18 @@ use crate::{
4242
},
4343
};
4444
pub mod ap;
45-
#[cfg(all(feature = "csi", feature = "unstable"))]
46-
pub mod csi;
47-
pub mod event;
45+
46+
unstable_module!(
47+
#[cfg(feature = "csi")]
48+
#[cfg_attr(docsrs, doc(cfg(feature = "csi")))]
49+
pub mod csi;
50+
pub mod event;
51+
#[cfg(feature = "sniffer")]
52+
#[cfg_attr(docsrs, doc(cfg(feature = "sniffer")))]
53+
pub mod sniffer;
54+
);
55+
4856
pub mod scan;
49-
#[cfg(all(feature = "sniffer", feature = "unstable"))]
50-
pub mod sniffer;
5157
pub mod sta;
5258

5359
pub(crate) mod os_adapter;
@@ -1111,6 +1117,7 @@ pub enum Bandwidth {
11111117
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
11121118
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
11131119
#[cfg(all(any(feature = "esp-now", feature = "sniffer"), feature = "unstable"))]
1120+
#[instability::unstable]
11141121
pub struct RxControlInfo {
11151122
/// Received Signal Strength Indicator (RSSI) of the packet, in dBm.
11161123
pub rssi: i32,
@@ -1169,6 +1176,7 @@ pub struct RxControlInfo {
11691176
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
11701177
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
11711178
#[cfg(all(any(feature = "esp-now", feature = "sniffer"), feature = "unstable"))]
1179+
#[instability::unstable]
11721180
pub struct RxControlInfo {
11731181
/// Received Signal Strength Indicator (RSSI) of the packet, in dBm.
11741182
pub rssi: i32,
@@ -1219,7 +1227,7 @@ impl RxControlInfo {
12191227
/// # Safety
12201228
/// When calling this, you must ensure, that `rx_cntl` points to a valid
12211229
/// instance of [wifi_pkt_rx_ctrl_t].
1222-
pub unsafe fn from_raw(rx_cntl: *const wifi_pkt_rx_ctrl_t) -> Self {
1230+
pub(super) unsafe fn from_raw(rx_cntl: *const wifi_pkt_rx_ctrl_t) -> Self {
12231231
#[cfg(not(esp32c6))]
12241232
let rx_control_info = unsafe {
12251233
RxControlInfo {

esp-radio/src/wifi/sta/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ use procmacros::BuilderLite;
99
use super::{AuthenticationMethod, Protocol, scan::ScanMethod};
1010
use crate::WifiError;
1111

12-
#[cfg(feature = "wifi-eap")]
13-
pub mod eap;
12+
unstable_module!(
13+
#[cfg(feature = "wifi-eap")]
14+
#[cfg_attr(docsrs, doc(cfg(feature = "wifi-eap")))]
15+
pub mod eap;
16+
);
1417

1518
/// Station configuration for a Wi-Fi connection.
1619
#[derive(BuilderLite, Clone, Eq, PartialEq, Hash)]

0 commit comments

Comments
 (0)