text: /*
   *         
   * 
   * 
   * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
   * 
   * Copyright 2007-2020 Broadcom Inc. All rights reserved.
   *         
   *     
   * DO NOT EDIT THIS FILE!
   */
  
  #include <phymod/phymod.h>
  #include <phymod/phymod_system.h>
  #include <phymod/phymod_cell.h>
  #include <phymod/phymod_cell_dispatch.h>
  
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  __phymod_cell__dispatch__t__ phymod_cell_Invalid_driver = {NULL};
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
  extern __phymod_cell__dispatch__t__ phymod_cell_null_cell_driver;
  #endif
  
  __phymod_cell__dispatch__t__* __phymod_cell__dispatch__[phymodDispatchTypeCount] = {
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
      &phymod_cell_Invalid_driver,
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  #ifdef PHYMOD_NULL_SUPPORT
      &phymod_cell_null_cell_driver,
  #endif
  
  };
  
  int phymod_cell_version_t_validate(phymod_cell_version_t phymod_cell_version)
  {        
      if(phymod_cell_version >= phymodCellVersionCount) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("Parameter is out of range")));
      }
          
      return PHYMOD_E_NONE;
      
  }
  
  int phymod_cell_speed_config_t_validate(const phymod_cell_speed_config_t* phymod_cell_speed_config)
  {        
      if(phymod_cell_speed_config == NULL) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("NULL parameter")));
      }
  
      if(PHYMOD_E_OK != phymod_cell_version_t_validate(phymod_cell_speed_config->version)) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("version validation failed")));
      }
  
  
          
      return PHYMOD_E_NONE;
      
  }
  
  int phymod_cell_speed_config_t_init(phymod_cell_speed_config_t* phymod_cell_speed_config)
  {        
      
      if(phymod_cell_speed_config == NULL){
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("phymod_cell_speed_config NULL parameter")));
      }
      PHYMOD_MEMSET(phymod_cell_speed_config, 0, sizeof(phymod_cell_speed_config_t));
      phymod_cell_speed_config->data_rate = 0;
      phymod_cell_speed_config->fec_type = 0;
      phymod_cell_speed_config->linkTraining = 0;
      phymod_cell_speed_config->flags = 0;
  
          
      return PHYMOD_E_NONE;
      
  }
  
  int phymod_phy_cell_speed_config_set(const phymod_phy_access_t* phy, const phymod_cell_speed_config_t* speed_config)
  {
  
      phymod_dispatch_type_t __type__;
      int __rv__;        
      
      if(PHYMOD_E_OK != phymod_cell_speed_config_t_validate(speed_config)) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("speed_config validation failed")));
      }
  
      /* Dispatch */
      PHYMOD_DRIVER_TYPE_GET(phy,&__type__);
      if(__type__ >= phymodDispatchTypeCount) { 
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("Driver is out of range")));
      }
  
      if(NULL != __phymod_cell__dispatch__[__type__]->f_phymod_phy_cell_speed_config_set) {
          PHYMOD_LOCK_TAKE(phy);
          __rv__ = __phymod_cell__dispatch__[__type__]->f_phymod_phy_cell_speed_config_set(phy, speed_config);
          PHYMOD_LOCK_GIVE(phy);
          PHYMOD_IF_ERR_RETURN(__rv__);
      } else { 
          return PHYMOD_E_UNAVAIL;
      }
          
      return PHYMOD_E_NONE;
      
  }
  
  
  int phymod_phy_cell_speed_config_get(const phymod_phy_access_t* phy, phymod_cell_speed_config_t* speed_config)
  {
  
      phymod_dispatch_type_t __type__;
      int __rv__;        
      
      if(speed_config == NULL) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("speed_config NULL parameter")));
      }
      if(PHYMOD_E_OK != phymod_cell_speed_config_t_validate(speed_config)) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("speed_config validation failed")));
      }
  
      /* Dispatch */
      PHYMOD_DRIVER_TYPE_GET(phy,&__type__);
      if(__type__ >= phymodDispatchTypeCount) { 
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("Driver is out of range")));
      }
  
      if(NULL != __phymod_cell__dispatch__[__type__]->f_phymod_phy_cell_speed_config_get) {
          PHYMOD_LOCK_TAKE(phy);
          __rv__ = __phymod_cell__dispatch__[__type__]->f_phymod_phy_cell_speed_config_get(phy, speed_config);
          PHYMOD_LOCK_GIVE(phy);
          PHYMOD_IF_ERR_RETURN(__rv__);
      } else { 
          return PHYMOD_E_UNAVAIL;
      }
          
      return PHYMOD_E_NONE;
      
  }
  
  
  int phymod_cell_autoneg_control_t_validate(const phymod_cell_autoneg_control_t* phymod_cell_autoneg_control)
  {        
      if(phymod_cell_autoneg_control == NULL) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("NULL parameter")));
      }
  
      switch(phymod_cell_autoneg_control->enable) {
          case 0:
          case 1:
              break;
          default:
              PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("enable not allowed value")));
              break;
      }
  
  
          
      return PHYMOD_E_NONE;
      
  }
  
  int phymod_cell_autoneg_control_t_init(phymod_cell_autoneg_control_t* phymod_cell_autoneg_control)
  {        
      
      if(phymod_cell_autoneg_control == NULL){
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("phymod_cell_autoneg_control NULL parameter")));
      }
      PHYMOD_MEMSET(phymod_cell_autoneg_control, 0, sizeof(phymod_cell_autoneg_control_t));
      phymod_cell_autoneg_control->flags = 0;
      phymod_cell_autoneg_control->enable = 0;
  
          
      return PHYMOD_E_NONE;
      
  }
  
  int phymod_phy_cell_autoneg_set(const phymod_phy_access_t* phy, const phymod_cell_autoneg_control_t* an)
  {
  
      phymod_dispatch_type_t __type__;
      int __rv__;        
      
      if(PHYMOD_E_OK != phymod_cell_autoneg_control_t_validate(an)) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("an validation failed")));
      }
  
      /* Dispatch */
      PHYMOD_DRIVER_TYPE_GET(phy,&__type__);
      if(__type__ >= phymodDispatchTypeCount) { 
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("Driver is out of range")));
      }
  
      if(NULL != __phymod_cell__dispatch__[__type__]->f_phymod_phy_cell_autoneg_set) {
          PHYMOD_LOCK_TAKE(phy);
          __rv__ = __phymod_cell__dispatch__[__type__]->f_phymod_phy_cell_autoneg_set(phy, an);
          PHYMOD_LOCK_GIVE(phy);
          PHYMOD_IF_ERR_RETURN(__rv__);
      } else { 
          return PHYMOD_E_UNAVAIL;
      }
          
      return PHYMOD_E_NONE;
      
  }
  
  
  int phymod_phy_cell_autoneg_get(const phymod_phy_access_t* phy, phymod_cell_autoneg_control_t* an, uint32_t* an_done)
  {
  
      phymod_dispatch_type_t __type__;
      int __rv__;        
      
      if(an == NULL) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("an NULL parameter")));
      }
      if(PHYMOD_E_OK != phymod_cell_autoneg_control_t_init(an)) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("an initialization failed")));
      }
  
      if(an_done == NULL) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("an_done NULL parameter")));
      }
      /* Dispatch */
      PHYMOD_DRIVER_TYPE_GET(phy,&__type__);
      if(__type__ >= phymodDispatchTypeCount) { 
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("Driver is out of range")));
      }
  
      if(NULL != __phymod_cell__dispatch__[__type__]->f_phymod_phy_cell_autoneg_get) {
          PHYMOD_LOCK_TAKE(phy);
          __rv__ = __phymod_cell__dispatch__[__type__]->f_phymod_phy_cell_autoneg_get(phy, an, an_done);
          PHYMOD_LOCK_GIVE(phy);
          PHYMOD_IF_ERR_RETURN(__rv__);
      } else { 
          return PHYMOD_E_UNAVAIL;
      }
          
      return PHYMOD_E_NONE;
      
  }
  
  
  int phymod_cell_autoneg_status_t_validate(const phymod_cell_autoneg_status_t* phymod_cell_autoneg_status)
  {        
      if(phymod_cell_autoneg_status == NULL) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("NULL parameter")));
      }
  
      if(PHYMOD_E_OK != phymod_cell_version_t_validate(phymod_cell_autoneg_status->version)) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("version validation failed")));
      }
  
  
          
      return PHYMOD_E_NONE;
      
  }
  
  int phymod_cell_autoneg_status_t_init(phymod_cell_autoneg_status_t* phymod_cell_autoneg_status)
  {        
      
      if(phymod_cell_autoneg_status == NULL){
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("phymod_cell_autoneg_status NULL parameter")));
      }
      PHYMOD_MEMSET(phymod_cell_autoneg_status, 0, sizeof(phymod_cell_autoneg_status_t));
      phymod_cell_autoneg_status->fec_type = 0;
  
          
      return PHYMOD_E_NONE;
      
  }
  
  int phymod_phy_cell_autoneg_status_get(const phymod_phy_access_t* phy, phymod_cell_autoneg_status_t* status)
  {
  
      phymod_dispatch_type_t __type__;
      int __rv__;        
      
      if(status == NULL) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("status NULL parameter")));
      }
      if(PHYMOD_E_OK != phymod_cell_autoneg_status_t_init(status)) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("status initialization failed")));
      }
  
      /* Dispatch */
      PHYMOD_DRIVER_TYPE_GET(phy,&__type__);
      if(__type__ >= phymodDispatchTypeCount) { 
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("Driver is out of range")));
      }
  
      if(NULL != __phymod_cell__dispatch__[__type__]->f_phymod_phy_cell_autoneg_status_get) {
          PHYMOD_LOCK_TAKE(phy);
          __rv__ = __phymod_cell__dispatch__[__type__]->f_phymod_phy_cell_autoneg_status_get(phy, status);
          PHYMOD_LOCK_GIVE(phy);
          PHYMOD_IF_ERR_RETURN(__rv__);
      } else { 
          return PHYMOD_E_UNAVAIL;
      }
          
      return PHYMOD_E_NONE;
      
  }
  
  
  int phymod_cell_autoneg_ability_t_validate(phymod_cell_autoneg_ability_t phymod_cell_autoneg_ability)
  {        
      if(phymod_cell_autoneg_ability >= phymodCellAnAbility_Count) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("Parameter is out of range")));
      }
          
      return PHYMOD_E_NONE;
      
  }
  
  int phymod_cell_autoneg_advert_ability_t_validate(const phymod_cell_autoneg_advert_ability_t* phymod_cell_autoneg_advert_ability)
  {        
      if(phymod_cell_autoneg_advert_ability == NULL) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("NULL parameter")));
      }
  
      if(PHYMOD_E_OK != phymod_cell_autoneg_ability_t_validate(phymod_cell_autoneg_advert_ability->ability)) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("ability validation failed")));
      }
  
  
          
      return PHYMOD_E_NONE;
      
  }
  
  int phymod_cell_autoneg_advert_ability_t_init(phymod_cell_autoneg_advert_ability_t* phymod_cell_autoneg_advert_ability)
  {        
      
      if(phymod_cell_autoneg_advert_ability == NULL){
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("phymod_cell_autoneg_advert_ability NULL parameter")));
      }
      PHYMOD_MEMSET(phymod_cell_autoneg_advert_ability, 0, sizeof(phymod_cell_autoneg_advert_ability_t));
      phymod_cell_autoneg_advert_ability->ability = 0;
      phymod_cell_autoneg_advert_ability->medium = 0;
  
          
      return PHYMOD_E_NONE;
      
  }
  
  int phymod_cell_autoneg_advert_abilities_t_validate(const phymod_cell_autoneg_advert_abilities_t* phymod_cell_autoneg_advert_abilities)
  {        
      if(phymod_cell_autoneg_advert_abilities == NULL) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("NULL parameter")));
      }
  
      if(PHYMOD_E_OK != phymod_cell_autoneg_advert_ability_t_validate(phymod_cell_autoneg_advert_abilities->autoneg_abilities)) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("autoneg_abilities validation failed")));
      }
  
  
          
      return PHYMOD_E_NONE;
      
  }
  
  int phymod_cell_autoneg_advert_abilities_t_init(phymod_cell_autoneg_advert_abilities_t* phymod_cell_autoneg_advert_abilities)
  {        
      
      if(phymod_cell_autoneg_advert_abilities == NULL){
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("phymod_cell_autoneg_advert_abilities NULL parameter")));
      }
      PHYMOD_MEMSET(phymod_cell_autoneg_advert_abilities, 0, sizeof(phymod_cell_autoneg_advert_abilities_t));
      phymod_cell_autoneg_advert_abilities->num_abilities = 0;
  
          
      return PHYMOD_E_NONE;
      
  }
  
  int phymod_phy_cell_autoneg_advert_ability_set(const phymod_phy_access_t* phy, const phymod_cell_autoneg_advert_abilities_t* an_advert_abilities)
  {
  
      phymod_dispatch_type_t __type__;
      int __rv__;        
      
      if(PHYMOD_E_OK != phymod_cell_autoneg_advert_abilities_t_validate(an_advert_abilities)) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("an_advert_abilities validation failed")));
      }
  
      /* Dispatch */
      PHYMOD_DRIVER_TYPE_GET(phy,&__type__);
      if(__type__ >= phymodDispatchTypeCount) { 
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("Driver is out of range")));
      }
  
      if(NULL != __phymod_cell__dispatch__[__type__]->f_phymod_phy_cell_autoneg_advert_ability_set) {
          PHYMOD_LOCK_TAKE(phy);
          __rv__ = __phymod_cell__dispatch__[__type__]->f_phymod_phy_cell_autoneg_advert_ability_set(phy, an_advert_abilities);
          PHYMOD_LOCK_GIVE(phy);
          PHYMOD_IF_ERR_RETURN(__rv__);
      } else { 
          return PHYMOD_E_UNAVAIL;
      }
          
      return PHYMOD_E_NONE;
      
  }
  
  
  int phymod_phy_cell_autoneg_advert_ability_get(const phymod_phy_access_t* phy, phymod_cell_autoneg_advert_abilities_t* an_advert_abilities)
  {
  
      phymod_dispatch_type_t __type__;
      int __rv__;        
      
      if(an_advert_abilities == NULL) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("an_advert_abilities NULL parameter")));
      }
      if(PHYMOD_E_OK != phymod_cell_autoneg_advert_abilities_t_validate(an_advert_abilities)) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("an_advert_abilities validation failed")));
      }
  
      /* Dispatch */
      PHYMOD_DRIVER_TYPE_GET(phy,&__type__);
      if(__type__ >= phymodDispatchTypeCount) { 
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("Driver is out of range")));
      }
  
      if(NULL != __phymod_cell__dispatch__[__type__]->f_phymod_phy_cell_autoneg_advert_ability_get) {
          PHYMOD_LOCK_TAKE(phy);
          __rv__ = __phymod_cell__dispatch__[__type__]->f_phymod_phy_cell_autoneg_advert_ability_get(phy, an_advert_abilities);
          PHYMOD_LOCK_GIVE(phy);
          PHYMOD_IF_ERR_RETURN(__rv__);
      } else { 
          return PHYMOD_E_UNAVAIL;
      }
          
      return PHYMOD_E_NONE;
      
  }
  
  
  int phymod_phy_cell_autoneg_remote_advert_ability_get(const phymod_phy_access_t* phy, phymod_cell_autoneg_advert_abilities_t* an_advert_abilities)
  {
  
      phymod_dispatch_type_t __type__;
      int __rv__;        
      
      if(an_advert_abilities == NULL) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("an_advert_abilities NULL parameter")));
      }
      if(PHYMOD_E_OK != phymod_cell_autoneg_advert_abilities_t_validate(an_advert_abilities)) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("an_advert_abilities validation failed")));
      }
  
      /* Dispatch */
      PHYMOD_DRIVER_TYPE_GET(phy,&__type__);
      if(__type__ >= phymodDispatchTypeCount) { 
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("Driver is out of range")));
      }
  
      if(NULL != __phymod_cell__dispatch__[__type__]->f_phymod_phy_cell_autoneg_remote_advert_ability_get) {
          PHYMOD_LOCK_TAKE(phy);
          __rv__ = __phymod_cell__dispatch__[__type__]->f_phymod_phy_cell_autoneg_remote_advert_ability_get(phy, an_advert_abilities);
          PHYMOD_LOCK_GIVE(phy);
          PHYMOD_IF_ERR_RETURN(__rv__);
      } else { 
          return PHYMOD_E_UNAVAIL;
      }
          
      return PHYMOD_E_NONE;
      
  }
  
  
  int phymod_phy_cell_link_status_get(const phymod_phy_access_t* phy, uint32_t* link_status)
  {
  
      phymod_dispatch_type_t __type__;
      int __rv__;        
      
      if(link_status == NULL) {
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("link_status NULL parameter")));
      }
      /* Dispatch */
      PHYMOD_DRIVER_TYPE_GET(phy,&__type__);
      if(__type__ >= phymodDispatchTypeCount) { 
          PHYMOD_RETURN_WITH_ERR(PHYMOD_E_PARAM, (_PHYMOD_MSG("Driver is out of range")));
      }
  
      if(NULL != __phymod_cell__dispatch__[__type__]->f_phymod_phy_cell_link_status_get) {
          PHYMOD_LOCK_TAKE(phy);
          __rv__ = __phymod_cell__dispatch__[__type__]->f_phymod_phy_cell_link_status_get(phy, link_status);
          PHYMOD_LOCK_GIVE(phy);
          PHYMOD_IF_ERR_RETURN(__rv__);
      } else { 
          return PHYMOD_E_UNAVAIL;
      }
          
      return PHYMOD_E_NONE;
      
  }
  
  
  