From 96245fc3048291b4ccea9eae8ebb882c1ec849e0 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 19 Apr 2003 08:25:18 +0000 Subject: Reporting LL support in CA_GET_CAP depending on actual FW version --- linux/drivers/media/dvb/ttpci/av7110.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c index 2e17388c8..11c2856ab 100644 --- a/linux/drivers/media/dvb/ttpci/av7110.c +++ b/linux/drivers/media/dvb/ttpci/av7110.c @@ -109,6 +109,7 @@ static int hw_sections = 1; int av7110_num = 0; +#define FW_CI_LL_SUPPORT(arm_app) (((arm_app) >> 16) & 0x8000) /**************************************************************************** * DEBI functions @@ -1817,7 +1818,7 @@ firmversion(av7110_t *av7110) av7110->arm_rtsl, av7110->arm_vid, av7110->arm_app); /* print firmware capabilities */ - if ((av7110->arm_app >> 16) & 0x8000) + if (FW_CI_LL_SUPPORT(av7110->arm_app)) printk ("DVB: AV711%d(%d) - firmware supports CI link layer interface\n", av7110->avtype, av7110->dvb_adapter->num); else @@ -3223,7 +3224,7 @@ int dvb_ca_ioctl(struct inode *inode, struct file *file, cap.slot_num=2; #ifdef NEW_CI - cap.slot_type=CA_CI_LINK|CA_DESCR; + cap.slot_type=(FW_CI_LL_SUPPORT(av7110->arm_app) ? CA_CI_LINK : CA_CI) | CA_DESCR; #else cap.slot_type=CA_CI|CA_DESCR; #endif @@ -3241,7 +3242,7 @@ int dvb_ca_ioctl(struct inode *inode, struct file *file, return -EINVAL; av7110->ci_slot[info->num].num = info->num; #ifdef NEW_CI - av7110->ci_slot[info->num].type = CA_CI_LINK; + av7110->ci_slot[info->num].type = FW_CI_LL_SUPPORT(av7110->arm_app) ? CA_CI_LINK : CA_CI; #else av7110->ci_slot[info->num].type = CA_CI; #endif -- cgit v1.2.3