summaryrefslogtreecommitdiff
path: root/cesar/hal/phy/maximus/src
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/hal/phy/maximus/src')
-rw-r--r--cesar/hal/phy/maximus/src/maximus_phy_ctrl.c87
-rw-r--r--cesar/hal/phy/maximus/src/maximus_tmdma.c4
2 files changed, 68 insertions, 23 deletions
diff --git a/cesar/hal/phy/maximus/src/maximus_phy_ctrl.c b/cesar/hal/phy/maximus/src/maximus_phy_ctrl.c
index b3c62e8f9f..9bde0efa47 100644
--- a/cesar/hal/phy/maximus/src/maximus_phy_ctrl.c
+++ b/cesar/hal/phy/maximus/src/maximus_phy_ctrl.c
@@ -2371,7 +2371,7 @@ phy_tx_fc10 (phy_t *ctx, u32 date, u32 fc_10)
/**
- * Set TX parameters.
+ * Set TX parameters, common function.
* \param ctx phy context
* \param fc_mode frame control mode
* \param short_ppdu true if no data symbols will be sent
@@ -2387,10 +2387,10 @@ phy_tx_fc10 (phy_t *ctx, u32 date, u32 fc_10)
*
* When modulation type is a ROBO mode, following arguments are ignored.
*/
-void
-phy_tx_param (phy_t *ctx, phy_fc_mode_t fc_mode, bool short_ppdu,
- phy_mod_t mod, phy_fecrate_t fecrate, phy_pb_size_t pb_size,
- phy_gil_t gil, uint tonemap_index)
+static void
+phy_tx_param_common (phy_t *ctx, phy_fc_mode_t fc_mode, bool short_ppdu,
+ phy_mod_t mod, phy_fecrate_t fecrate,
+ phy_pb_size_t pb_size, phy_gil_t gil, uint tonemap_index)
{
/* Set the fc_mode value of PHY context.
* Set the short_ppdu value of PHY context.
@@ -2476,21 +2476,44 @@ phy_tx_param (phy_t *ctx, phy_fc_mode_t fc_mode, bool short_ppdu,
}
+void
+phy_tx_param (phy_t *ctx, phy_fc_mode_t fc_mode, u32 mod_fecrate_pb_size,
+ phy_gil_t gil)
+{
+ phy_mod_t mod = BF_GET (PHY_COMBO_PARAMS__MOD, mod_fecrate_pb_size);
+ phy_fecrate_t fecrate = BF_GET (PHY_COMBO_PARAMS__FECRATE,
+ mod_fecrate_pb_size);
+ phy_pb_size_t pb_size = BF_GET (PHY_COMBO_PARAMS__PB_SIZE,
+ mod_fecrate_pb_size);
+ phy_tx_param_common (ctx, fc_mode, false, mod, fecrate, pb_size, gil, 0);
+}
+
+
+void
+phy_tx_param_short (phy_t *ctx, phy_fc_mode_t fc_mode)
+{
+ phy_tx_param_common (ctx, fc_mode, true, PHY_MOD_NONE, PHY_FEC_RATE_NONE,
+ PHY_PB_SIZE_NONE, PHY_GIL_NONE, 0);
+}
+
+
/**
* Set TX parameters for SOUND transmission.
* \param ctx phy context
* \param fc_mode frame control mode
* \param nb_pb number of SOUND PB
- * \param mod modulation type
- * \param fecrate TCC rate
- * \param pb_size PB size
+ * \param mod_fecrate_pb_size combined modulation type, TCC rate, PB size
* \param gil guard interval for third symbol and following symbols
*/
void
phy_tx_param_sound (phy_t *ctx, phy_fc_mode_t fc_mode, uint nb_pb,
- phy_mod_t mod, phy_fecrate_t fecrate,
- phy_pb_size_t pb_size, phy_gil_t gil)
+ u32 mod_fecrate_pb_size, phy_gil_t gil)
{
+ phy_mod_t mod = BF_GET (PHY_COMBO_PARAMS__MOD, mod_fecrate_pb_size);
+ phy_fecrate_t fecrate = BF_GET (PHY_COMBO_PARAMS__FECRATE,
+ mod_fecrate_pb_size);
+ phy_pb_size_t pb_size = BF_GET (PHY_COMBO_PARAMS__PB_SIZE,
+ mod_fecrate_pb_size);
/* Set the fc_mode value of PHY context.
* Set the nb_pb value of PHY context.
* Set the mod value of PHY context.
@@ -2753,7 +2776,7 @@ phy_rx_activate (phy_t *ctx, bool now, u32 date, bool pre_detection)
/**
- * Set parameter for frame payload reception.
+ * Set parameter for frame payload reception, common function.
* \param ctx phy context
* \param short_ppdu true if no data symbols will be received
* \param mod modulation type
@@ -2769,9 +2792,9 @@ phy_rx_activate (phy_t *ctx, bool now, u32 date, bool pre_detection)
* data.
*/
void
-phy_rx_prepare (phy_t *ctx, bool short_ppdu, phy_mod_t mod,
- phy_fecrate_t fecrate, phy_pb_size_t pb_size, phy_gil_t gil,
- uint tonemap_index, uint symbol_nb)
+phy_rx_prepare_common (phy_t *ctx, bool short_ppdu, phy_mod_t mod,
+ phy_fecrate_t fecrate, phy_pb_size_t pb_size,
+ phy_gil_t gil, uint tonemap_index, uint symbol_nb)
{
/* PBP prepares HW for reception.
* This function is called when a FC is received, in the 'rx_fc_cb'. */
@@ -2882,22 +2905,44 @@ phy_rx_prepare (phy_t *ctx, bool short_ppdu, phy_mod_t mod,
}
+void
+phy_rx_prepare (phy_t *ctx, u32 mod_fecrate_pb_size, phy_gil_t gil,
+ uint symbol_nb)
+{
+ phy_mod_t mod = BF_GET (PHY_COMBO_PARAMS__MOD, mod_fecrate_pb_size);
+ phy_fecrate_t fecrate = BF_GET (PHY_COMBO_PARAMS__FECRATE,
+ mod_fecrate_pb_size);
+ phy_pb_size_t pb_size = BF_GET (PHY_COMBO_PARAMS__PB_SIZE,
+ mod_fecrate_pb_size);
+ phy_rx_prepare_common (ctx, false, mod, fecrate, pb_size, gil, 0,
+ symbol_nb);
+}
+
+
+void
+phy_rx_prepare_short (phy_t *ctx)
+{
+ phy_rx_prepare_common (ctx, true, PHY_MOD_NONE, PHY_FEC_RATE_NONE,
+ PHY_PB_SIZE_NONE, PHY_GIL_NONE, 0, 0);
+}
+
+
/**
* Set parameter for SOUND payload reception.
* \param ctx phy context
- * \param mod modulation type
- * \param fecrate TCC rate
- * \param pb_size PB size
+ * \param mod_fecrate_pb_size combined modulation type, TCC rate, PB size
* \param gil guard interval for third symbol and following symbols
* \param symbol_nb number of expected symbols
- * \param end_date date at which the reception is done and chandata can be
- * retrieved
*/
void
-phy_rx_prepare_sound (phy_t *ctx, uint nb_pb, phy_mod_t mod,
- phy_fecrate_t fecrate, phy_pb_size_t pb_size,
+phy_rx_prepare_sound (phy_t *ctx, uint nb_pb, u32 mod_fecrate_pb_size,
phy_gil_t gil, uint symbol_nb)
{
+ phy_mod_t mod = BF_GET (PHY_COMBO_PARAMS__MOD, mod_fecrate_pb_size);
+ phy_fecrate_t fecrate = BF_GET (PHY_COMBO_PARAMS__FECRATE,
+ mod_fecrate_pb_size);
+ phy_pb_size_t pb_size = BF_GET (PHY_COMBO_PARAMS__PB_SIZE,
+ mod_fecrate_pb_size);
u32 end_date = phy_date (ctx) + 1; // TODO: remove this.
/* PBP prepares HW for reception.
* This function is called when a FC is received, in the 'rx_fc_cb'. */
diff --git a/cesar/hal/phy/maximus/src/maximus_tmdma.c b/cesar/hal/phy/maximus/src/maximus_tmdma.c
index a81cb87a0c..39439d8966 100644
--- a/cesar/hal/phy/maximus/src/maximus_tmdma.c
+++ b/cesar/hal/phy/maximus/src/maximus_tmdma.c
@@ -67,7 +67,6 @@ phy_set_tonemask (phy_t *ctx, u32 *tonemask, uint carrier_nb)
/**
* Transfer tone map to hardware using the TM DMA.
* \param ctx phy context
- * \param tonemap_index tonemap index where to store tonemap
* \param tonemap tonemap blocks first descriptor
* set errno to:
* - EINVAL if ctx or tonemap are null, or if arguments are out-of-range or incorrect
@@ -75,8 +74,9 @@ phy_set_tonemask (phy_t *ctx, u32 *tonemask, uint carrier_nb)
* The tonemap uses two blocks.
*/
void
-phy_set_tonemap (phy_t *ctx, uint tonemap_index, blk_t *tonemap)
+phy_set_tonemap (phy_t *ctx, blk_t *tonemap)
{
+ uint tonemap_index = 0;
/* Set the tonemap_index value of PHY context.
* Copy tonemap contents into PHY context. */